Loading

Analyze Total API Requests Consumption and Limits in Salesforce

發佈日期: Sep 16, 2025
描述

Notes:

  • The API limit count depends on the organization type and edition. Refer to API Request Limits for more information.
  • SOAP API and REST API calls (which include Bulk API calls) are counted against an organization's API call limit.
解決方案

Check API limits and Consumption

Salesforce Lightning

To get information about total API limit and consumption for your org, any of the following can be used:

I. Company Information

  1. Go to Setup -> Company Information
  2. View the value for 'API Requests, Last 24 Hours' - It will display the total API limit consumed for the last 24 hours and will also display your Org's daily limit based on licenses.

II.  System Overview

  1. Go to Setup.
  2. In Quick Find, search for System Overview.
  3. From here, you will find the API REQUESTS, LAST 24 HOURS. This displays how many API calls you've made in the last 24 hours, including today. For example, if you are viewing this on Monday at 2:30 PM, it will show you the calls made since Sunday at 2:30 PM.

III. Limits Info Header in API Responses

The limits info header returned in SOAP and REST API responses also provides information about the API calls made in last 24 hours and the daily API request limit.

SOAP API Response example:

<limitInfo> <current>700</current> <limit>15000</limit> <type>API REQUESTS</type></limitInfo>

REST API Response example:

Sforce-Limit-Info: api-usage=25/5000; 

 

IV. REST API Limits Resource:

GET request to resource /services/data/vXX.X/limits/ returns information for all limits in the Org. Response include 'DailyApiRequests' which provides information about usage for last 24 hours and daily limit. Example:

"DailyApiRequests":{
"Max":106200
"Remaining":105482
}

 

The above will help you to check daily API Request limits and the total consumption for your Org. Also, API Usage Notification can be defined to send notification at certain thresholds of API limits consumption. Once you have information about total API limits and consumption for your Org, you will want to look into API requests consuming these Limits. 

API Total Usage Event Log Files

To gain visibility into the API Requests contributing to the API Usage Limits for the Org, use the 'API Total Usage' EventType available under Event Monitoring. Developer, Enterprise, Unlimited and Performance edition Orgs have access to 'API Total Usage' Event Log Files with 1-day data retention at no additional Cost. For more information about Event Monitoring, visit Event Monitoring Trailhead Module.

API Total usage event contains details about Platform SOAP API, Platform REST API, and Bulk API requests. Therefore it can be used to monitor general API consumption.

To Generate Event Log Files for API Total Usage:

  1. Ensure that 'Generate Event Log Files' setting is toggled On. Go to Setup -> under Quick Find Box, search and click on 'Event Monitoring Settings' -> Check that 'Generate Event Log Files' is toggled ON.
  2. Accessing Event Log Files requires View Event Log Files and API Enabled user permissions except for Users with View All Data permission. 

After the above steps have been completed, use Event Log File Browser or REST API to fetch Log Files for API Total Usage Event.

In Event Log File Browser, log files for API Total Usage events will be available. These files can be downloaded in CSV format to get information about API requests. Each Line in the Log File represents an API request and the field values in log line provide further details about the API request. Information about what each of these Fields represent can be checked at API Total Usage Event Type Fields

Considerations:

  • Event Log Files for each Event Types are generated for two Interval Types - Hourly and Daily. Log Files for each interval type are generated after some time of the actual Event Happening. For more information about Event Log File Generation, visit https://developer.salesforce.com/docs/atlas.en-us.256.0.api_rest.meta/api_rest/using_resources_event_log_files.htm
  •  It is recommended to use the Daily Log Files for complete data, as hourly log files might be missing some event log data especially during site switches, instance refreshes, or unplanned system outages.
  • If you wish to increase retention time for Event Log Files from the default 1-day retention, Event Monitoring add-on purchase will be required. Event Monitoring license provides capabilities like Event Monitoring Analytics App which offer greater insights into API requests. Please contact your Account Executive for more information on the same.


Salesforce Classic

For complete and accurate information about API limits and consumption, it is recommended to use the methods mentioned above in the Lightning section of this Article as there are certain limitations with API Usage data available in Salesforce Classic. 

    View your Org's API calls via the 'API Usage last 7 days' report

    Available in:

    • Enterprise, Performance, and Unlimited Edition (Salesforce Classic Only). 
    • Also available in Professional Edition with additional cost (and with request to enable the API to Account executive). For more information, see Salesforce editions with API Access.


    Permissions required:

    • The 'View Setup and Configuration' permission must appear on your profile to see this report.
    • For non-admin users to view this report, the 'Modify all' permission must appear on your profile to see this report.


    The 'API Usage last 7 days' report shows you the calls made by User and date for the last 7 days, including today. 

    How to view the 'API Usage Last 7 Days' report

    1. Click Reports.
    2. Click Administrative Reports.
    3. Click API Usage Last 7 days.
     

    Notes:

    • Report data resets daily at 12:00 AM Greenwich Mean Time (GMT) or UTC. 
    • API Usage Last 7 days may not appear by 'Find a folder' search.
    • API calls issued by certain Salesforce-authored connected apps (e.g. the Salesforce Mobile App) do not count against an org's entitled API request limit. However, in "API Calls Made Within Last 7 Days" report, please note calls made by the Salesforce mobile app as well.
    • Due to an internal bug not all API calls under API usage are included in this report, for example few of the BULK API calls are not included in this report, for more accurate details utilize system overview page or Limits Rest resource. 

    In Pardot, you can check the API requests data in API Usage Statistics page. 

    1. Click the gear icon and select Settings
    2. Click the Usage and Limits tab.
    3. Click the number of daily API requests.
    4. Select a date to view API request statistics. 

    What data is available on API Usage Statistics page in Pardot? 

    • Graphical Data
    • Number of API calls made on a selected date
    • Calls by module
    • Calls by Action
    • Tabular Data
    • Hourly API requests made
    • Username: who have made API requests
    • Module
    • Action
    • Uses Deprecated Authorization
    • Total successful API requests

    Reduce your usage of API calls

    There are different approaches to reduce the amount of API calls consumed by a given API client, which include (but are not limited to) the following:
     

    • Caching on the client side.
    • Sending cumulative changes, rather than incremental changes (for example, use Composite Resources in REST API).
    • Resort to the Bulk API to mass upload/update records, instead of using the REST API to upload/update the same records.

     

    Increase your total API Request Allocations

    Please refer to the Increasing Total API Request Allocations section in the API Request Limits and Allocations page.


    See also:
    Increase your organization's API limit

    Sandbox API Calls Limit higher than Production
    其他資源

    Salesforce Support YouTube video:
    Understanding API Limits

    知識文章編號

    000385367

     
    正在載入
    Salesforce Help | Article