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 10,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 seven days are removed from the queue 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 size
-
- Batches for data loads can consist of a single CSV, XML, or JSON file that is no larger than 10 MB.
- A batch can contain a maximum of 10,000 records.
- A batch can contain a maximum of 10,000,000 characters for all the data in a batch.
- A field can contain a maximum of 32,000 characters.
- A record can contain a maximum of 5,000 fields.
- A record can contain a maximum of 400,000 characters for all its fields.
- A batch must contain some content or an error occurs.
- For binary content limits, see Binary content.
- 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. To get batch results to see which records, if any, were processed, see Get Batch Results. If you get a timeout error when processing a batch, split your batch into smaller batches, and try again.
- 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.
- Compression
- The only valid compression value is gzip. Compression is optional, but strongly 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 seven days are removed from the queue 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.
- 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.
- query Limits
- Bulk API query has the following
limitations:
-
Bulk API query doesn’t support the following SOQL:
- COUNT
- ROLLUP
- SUM
- GROUP BY CUBE
- OFFSET
- Nested SOQL queries