Salesforce Query Job Results API

Operations for retrieving the results of completed query jobs as CSV data.

Operations 1

GET /query/{jobId}/results Salesforce Get Query Job Results #

Documentation

Specifications

Schemas & Data

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/salesforce-query-job-results-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no email required.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

salesforce-query-job-results-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Salesforce Bulk API 2.0 Query Job Results API
  description: 'Salesforce Bulk API 2.0 is a simplified, REST-based interface for bulk data operations that improves on the original Bulk API. It uses a straightforward job model and supports CSV format for ingest and query jobs, enabling processing of millions of records asynchronously.

    '
  version: v63.0
  contact:
    name: Salesforce Developers
    url: https://developer.salesforce.com/
  license:
    name: Salesforce Developer Terms
    url: https://www.salesforce.com/company/legal/agreements/
servers:
- url: https://{instance}.salesforce.com/services/data/v{version}/jobs
  description: Salesforce Bulk API 2.0 jobs endpoint
  variables:
    instance:
      default: yourInstance
      description: 'The Salesforce instance identifier (e.g., na1, eu3, or a My Domain subdomain like mycompany).

        '
    version:
      default: '63.0'
      description: 'The Salesforce API version number (e.g., 63.0). Use the latest supported version for new integrations.

        '
security:
- BearerAuth: []
tags:
- name: Query Job Results
  description: 'Operations for retrieving the results of completed query jobs as CSV data.

    '
paths:
  /query/{jobId}/results:
    get:
      operationId: getQueryJobResults
      summary: Salesforce Get Query Job Results
      description: 'Returns the results of a completed query job as CSV data. The results may be paginated; check for a Sforce-Locator response header to retrieve subsequent pages by passing the locator value as a query parameter. Only available after the job reaches JobComplete state.

        '
      tags:
      - Query Job Results
      parameters:
      - $ref: '#/components/parameters/jobId'
      - name: maxRecords
        in: query
        required: false
        description: 'Maximum number of records to return in this response. Defaults to 50000. Use with the locator parameter to paginate through large result sets.

          '
        schema:
          type: integer
          default: 50000
        example: 10
      - name: locator
        in: query
        required: false
        description: 'A locator token from the Sforce-Locator response header of a previous request to retrieve the next page of results.

          '
        schema:
          type: string
        example: example_value
      responses:
        '200':
          description: 'CSV data containing query results. Check the Sforce-Locator response header for a locator token to retrieve subsequent pages.

            '
          headers:
            Sforce-Locator:
              description: 'Locator token for the next page of results. Pass this value as the locator query parameter in subsequent requests. If this header is absent or has value "null", no more pages remain.

                '
              schema:
                type: string
            Sforce-NumberOfRecords:
              description: Number of records returned in this response.
              schema:
                type: integer
          content:
            text/csv:
              schema:
                type: string
                description: 'CSV data containing the query results. The first row is a header row with field API names.

                  '
              examples:
                Getqueryjobresults200Example:
                  summary: Default getQueryJobResults 200 response
                  x-microcks-default: true
                  value: example_value
        '401':
          description: Unauthorized. Invalid or expired OAuth token.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                Getqueryjobresults401Example:
                  summary: Default getQueryJobResults 401 response
                  x-microcks-default: true
                  value:
                    message: example_value
                    errorCode: example_value
                    fields:
                    - example_value
        '404':
          description: Job not found or job has not reached JobComplete state.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                Getqueryjobresults404Example:
                  summary: Default getQueryJobResults 404 response
                  x-microcks-default: true
                  value:
                    message: example_value
                    errorCode: example_value
                    fields:
                    - example_value
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
components:
  schemas:
    Error:
      type: object
      description: An error response from the Salesforce Bulk API 2.0.
      properties:
        message:
          type: string
          description: Human-readable description of the error.
          example: example_value
        errorCode:
          type: string
          description: Salesforce error code identifying the type of error.
          example: example_value
        fields:
          type: array
          description: List of field names related to the error, if applicable.
          items:
            type: string
          example: []
  parameters:
    jobId:
      name: jobId
      in: path
      required: true
      description: The unique identifier of the Bulk API 2.0 job.
      schema:
        type: string
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: 'OAuth 2.0 Bearer token obtained from the Salesforce OAuth 2.0 token endpoint. Include this token in the Authorization header as "Bearer {access_token}".

        '