Execute a Looker API 4.0 query programmatically by creating a query object and calling run_query with a desired result format

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

Steps

  1. Authenticate to the Looker API 4.0 by posting client credentials to /api/4.0/login to obtain a short-lived access token
  2. POST to /api/4.0/queries with a JSON body specifying the model, view (Explore), fields array, filters object, and limit to create a query object and receive a query id in the response
  3. GET or POST to /api/4.0/queries/{query_id}/run/{result_format} where result_format is one of json, json_detail, csv, txt, html, or xlsx to retrieve results synchronously
  4. For long-running queries, use the async path: POST to /api/4.0/query_tasks with the query body to create a query task, then poll GET /api/4.0/query_tasks/{query_task_id}/results until status is complete
  5. Handle pagination by using the limit and offset parameters on the query object, or use result streaming for very large result sets

Known gotchas

Related routes

Run a SOQL query with pagination from the Salesforce API
salesforce.com · 4 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