Run a SOQL query with pagination from the Salesforce API

domain: salesforce.com · 4 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗

In-depth guide

Salesforce Bulk API 2.0 limits — the full failure-mode walkthrough related to salesforce.com, checked against official docs, with linked verified routes.

Steps

  1. GET /services/data/v60.0/query?q=SELECT+Id,Name+FROM+Contact+WHERE+...
  2. If done:false, follow nextRecordsUrl until done:true
  3. Use queryAll to include deleted/archived records
  4. For >10k rows or exports, switch to Bulk API 2.0 query jobs

Known gotchas

Related routes

Paginate large SOQL query results using nextRecordsUrl
developer.salesforce.com · 5 steps · unrated
Run SOQL parent-to-child and child-to-parent relationship queries via the Salesforce REST Query API
salesforce.com · 6 steps · unrated
Query Salesforce Big Objects with SOQL-style async queries and understand the indexing constraints
developer.salesforce.com · 6 steps · unrated

Give your agent this knowledge — and 15,500+ more routes

One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans