What’s the Difference Between Bulk API 2.0 and Bulk API?

Although Bulk API 2.0’s predecessor, “Bulk API”, is available, use Bulk API 2.0 instead of Bulk API if you want a more streamlined workflow. Bulk API 2.0 provides a simple interface to load large amounts of data into your Salesforce org and to perform bulk queries on your org data. Its design is more consistent and better integrated with other Salesforce APIs. Bulk API 2.0 also has the advantage of future innovation.

Bulk API 2.0 allows for:

  • Less client-side code writing.
  • Easy-to-monitor job status.
  • Automatic retry of failed records.
  • Support for parallel processing.
  • Fewer calls are required to complete ingest or query workflows.
  • Easier batch management.

Here’s an example of the Bulk API 2.0 query workflow:

Bulk API 2.0 query workflow

Bulk API’s query workflow is more complex - requiring the creation of batches and iterating through the retrieval of result sets:

Bulk API query workflow

Bulk API 2.0’s ingest workflow is the same for insert, update, delete, hard delete, and upsert operations. You:

  1. Create a job
  2. Upload job data
  3. Set job state to UploadComplete
  4. Get results

If the feature set and limits are a unique match to your project requirements, use Bulk API.

This table shows a basic feature set comparison between Bulk API 2.0 and Bulk API.

FeatureBulk API 2.0Bulk API
Ingest Availability41.0 and later16.0 and later
Query Availability47.0 and later21.0 and later
AuthenticationSupports all OAuth 2.0 flows supported by other Salesforce REST APIs.None. Requires a special X-SFDC-Session header fetched with SOAP API’s login() call.
Ingest Data FormatCSVCSV, XML, JSON, and binary attachment processing
Feed TrackingDisabled during the operationDisabled during the operation
Large File BatchingSimplifies uploading large amounts of data by breaking the data into batches and providing parallelism automatically. Upload a CSV file with your record data and check back when the results are ready. All results are returned from one endpoint.Large files must be batched manually, either with custom code or by hand.
Support for big objects
  • Ingest
  • Query
  • Ingest
  • Query
Query Job OptimizationAutomatically performs PK chunking.PK chunking is manually invoked and configured.
Query Results RetrievalAll in a single endpoint.Iterate through the retrieval of individual result sets.
Daily Upload LimitsLimits by total records uploaded per day. Available to clients via REST API /limits endpoint.Limits by quantity of batches per day
Data Loader CompatibilityYesYes

For a detailed comparison of Bulk API 2.0 and Bulk API limits, see Bulk API and Bulk API 2.0 Limits and Allocations.