Bulk API 2.0 and Bulk API Developer Guide
Summer '25 (API version 64.0)
Spring '25 (API version 63.0)
Winter '25 (API version 62.0)
Summer '24 (API version 61.0)
Spring '24 (API version 60.0)
Winter '24 (API version 59.0)
Summer '23 (API version 58.0)
Spring '23 (API version 57.0)
Winter '23 (API version 56.0)
Summer '22 (API version 55.0)
Spring '22 (API version 54.0)
Winter '22 (API version 53.0)
Summer '21 (API version 52.0)
Spring '21 (API version 51.0)
Winter '21 (API version 50.0)
Summer '20 (API version 49.0)
Spring '20 (API version 48.0)
Winter '20 (API version 47.0)
Summer '19 (API version 46.0)
Spring '19 (API version 45.0)
Winter '19 (API version 44.0)
Summer '18 (API version 43.0)
Spring '18 (API version 42.0)
Winter '18 (API version 41.0)
Summer '17 (API version 40.0)
Spring '17 (API version 39.0)
Winter '17 (API version 38.0)
Summer '16 (API version 37.0)
Spring '16 (API version 36.0)
Winter '16 (API version 35.0)
Summer '15 (API version 34.0)
Spring '15 (API version 33.0)
Winter '15 (API version 32.0)
Summer '14 (API version 31.0)
Spring '14 (API version 30.0)
No Results
Search Tips:
- Please consider misspellings
- Try different search keywords
How Bulk API Works
How Bulk Queries Are Processed
Use Bulk Query
PK Chunking
Walk Through a Bulk Query Sample
Walk Through a Bulk Query Sample Using PK Chunking
Limits
Map Data Fields
Bulk API End-of-Life Policy
Bulk API Query
Use bulk query to efficiently query large data sets and reduce the number of API
requests. A bulk query can retrieve up to 15 GB of data, divided into 15 files of 1 GB each. The
data formats supported are CSV, XML, and JSON.
Bulk API query limits are described in Bulk API and Bulk API 2.0 Limits and Allocations in the Salesforce Developer Limits and Allocations Quick Reference
-
How Bulk Queries Are Processed
The bulk query workflow begins when you create a bulk query job and add one or more batches to the query job. When a bulk query is processed, Salesforce attempts to execute the query. If the query doesn’t execute within the standard 2-minute timeout limit, the job fails and a QUERY_TIMEOUT error is returned. In this case, rewrite a simpler query, and resubmit the batch. -
Use Bulk Query
When you add a batch to a bulk query job, the Content-Type in the header for the request must be text/csv, application/xml, or application/json, depending on the content type specified when the job was created. The actual SOQL statement supplied for the batch is in plain text format. -
PK Chunking
Use the primary key (PK) chunking request header to enable automatic PK chunking for a bulk query job. PK chunking splits bulk queries on large tables into chunks based on the record IDs, or primary keys, of the queried records. -
Walk Through a Bulk Query Sample
This code sample uses cURL to query several account records. -
Walk Through a Bulk Query Sample Using PK Chunking
This code sample uses cURL to perform a bulk query with PK chunking enabled on several account records.