Newer Version Available
Bulk API Limits
Note the following Bulk API limits.
- API usage limits
- Bulk API use is subject to the standard API usage limits. Each HTTP request counts as one call for the purposes of calculating usage limits.
- Batch content
- Each batch must contain exactly one CSV, XML, or JSON file containing records for a single object, or the batch is not processed and stateMessage is updated. Use the Enterprise WSDL for the correct format for object records.
- Batch Allocation
- You can submit up to 15,000 batches per rolling 24-hour period. You can’t create batches associated with a job that is more than 24 hours old. If a batch is submitted to a closed job, the batch will not be created, however it will still count against the batch allocation as a submitted batch.
- Batch lifespan
- Batches and jobs that are older than 7 days are removed from the queue if they are in a terminal state (completed or failed). The seven days are measured from the youngest batch associated with a job, or the age of the job if there are no batches. You can’t create batches associated with a job that is more than 24 hours old.
- Batch size
- For binary content limits, see General Limits.
- Batch processing time
- Batches are processed in chunks. The chunk size depends on the API version. In API version 20.0 and earlier, the chunk size is 100 records. In API version 21.0 and later, the chunk size is 200 records. There’s a 5-minute limit for processing each chunk. Also, if it takes longer than 10 minutes to process a whole batch, the Bulk API places the remainder of the batch back in the queue for later processing. If the Bulk API continues to exceed the 10-minute limit on subsequent attempts, the batch is placed back in the queue and reprocessed up to 10 times before the batch is permanently marked as failed.
- Even if the batch failed, some records could have completed successfully. If you get a timeout error when processing a batch, split your batch into smaller batches, and try again.
- Compression
- The only valid compression value is gzip. Compression is optional, but recommended. Compression doesn’t affect the character limits defined in Batch size.
- Job abort
- Any user with correct permission can abort a job. Only the user who created a job can close it.
- Job close
- Only the user who created a job can close it. Any user with correct permission can abort a job.
- Job content
- Each job can specify one operation and one object. Batches associated with this job contain records of one object. Optionally, you can specify serial processing mode, which is used only when previously submitted asynchronous jobs have accidentally produced contention because of locks. Use only when advised by Salesforce.
- Job external ID
- You can't edit the value of an external ID field in JobInfo. When specifying an external ID, the operation must be upsert. If you try to use it with create or update, an error is generated.
- Job lifespan
- Batches and jobs that are older than 7 days are removed from the queue if they are in a terminal state (completed or failed). The seven days are measured from the youngest batch associated with a job, or the age of the job if there are no batches. You can’t create batches associated with a job that is more than 24 hours old.
- Job open time
- The maximum time that a job can remain open is 24 hours. The Bulk API doesn't support clients that, for example, post one batch every hour for many hours.
- Job status in job history
- After a job has completed, the job status and batch result sets are available for seven days after which this data is deleted permanently.
- Job status change
- When you submit a POST body with a change in job status, you can only specify the status field value. If operation or entity field values are specified, an error occurs.
- Portal users
- Regardless of whether the “API Enabled” profile permission is granted, portal users (Customer Portal, Self-Service portal, and Partner Portal) can't access Bulk API.
- SOQL
-
Bulk API does not support queries with any of the following:
- GROUP BY, OFFSET, or TYPEOF clauses
- Aggregate functions such as COUNT()
- Date functions in GROUP BY clauses (date functions in WHERE clauses are supported)
- Compound address fields or compound geolocations fields
- Limits Specific to Ingest Jobs
-
- Limits Specific to Query Jobs
-
Item Bulk API Limit Number of attempts to query 15 attempts at 10 minutes each to process the batch. There is also a 2-minute limit on the time to process the query. If more than 15 attempts are made for the query, an error message of “Tried more than fifteen times” is returned. If the query takes more than 2 minutes to process, a QUERY_TIMEOUT error is returned. Number of retrieved files 15 files. If the query returns more than 15 files, add filters to the query to return less data. Bulk batch sizes are not used for bulk queries. Results lifespan 7 days Maximum retrieved file size 1 GB Number of batches that can be submitted per 24-hour rolling window You can submit up to 15,000 batches per rolling 24-hour period. This allocation is shared between Bulk API and Bulk API 2.0, so every batch that is processed in Bulk API or Bulk API 2.0 counts towards this allocation. Total query results that can be generated per 24 hour rolling window N/A - General Limits
-
Item Bulk API Limit Batch and job lifespan Batches and jobs that are older than seven days are removed from the queue if they are in a terminal state (completed or failed) regardless of job status. The seven days are measured from the youngest batch associated with a job, or the age of the job if there are no batches. You can’t create batches associated with a job that is more than 24 hours old. Batch processing time Batches are processed in chunks. The chunk size depends on the API version. In API version 20.0 and earlier, the chunk size is 100 records. In API version 21.0 and later, the chunk size is 200 records. There’s a 5-minute limit for processing each chunk. Also, if it takes longer than 10 minutes to process a whole batch, the Bulk API places the remainder of the batch back in the queue for later processing. If the Bulk API continues to exceed the 10-minute limit on subsequent attempts, the batch is placed back in the queue and reprocessed up to 10 times before the batch is permanently marked as failed. Binary content - The length of any file name can’t exceed 512 bytes.
- A zip file can’t exceed 10 MB.
- The total size of the unzipped content can’t exceed 20 MB.
- A maximum of 1,000 files can be contained in a zip file. Directories don’t count toward this total.
Maximum time that a job can remain open 24 hours. - See Also
- For a comparison with Bulk API 2.0 limits, see the Salesforce Developer Limits and Allocations Quick Reference.