BigQuery query via REST jobs.query

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

Steps

  1. Obtain a short-lived OAuth2 access token for a service account with bigquery.jobs.create and bigquery.tables.getData permissions.
  2. POST to https://bigquery.googleapis.com/bigquery/v2/projects/{projectId}/queries with body {"query": "SELECT ...", "useLegacySql": false, "timeoutMs": 30000}.
  3. If the response jobComplete is true, rows are returned inline; if false, use the returned jobReference.jobId to poll jobs.getQueryResults.
  4. Call GET /bigquery/v2/projects/{projectId}/queries/{jobId}?timeoutMs=10000 in a loop until jobComplete is true, then paginate through rows using pageToken if present.
  5. Parse the schema field from the response alongside rows; each row is an array of f objects with a v value field matching the schema columns in order.

Known gotchas

Related routes

BigQuery load job from GCS
cloud.google.com · 5 steps · unrated
Run a SuiteQL query against NetSuite via the REST API
docs.oracle.com/en/cloud/saas/netsuite · 6 steps · unrated
Query worker data from Oracle HCM Cloud using the REST API
docs.oracle.com · 5 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