{"id":"ce369443-5e08-4794-8bee-80fc135fe049","task":"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","steps":["Authenticate to the Looker API 4.0 by posting client credentials to /api/4.0/login to obtain a short-lived access token","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","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","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","Handle pagination by using the limit and offset parameters on the query object, or use result streaming for very large result sets"],"gotchas":["As of Looker 23.18, API 3.1 has been removed; any integration still calling /api/3.1/ endpoints will fail with a 404 and must be migrated to /api/4.0/","The result_format parameter for run_query must be specified in the URL path, not as a query parameter; omitting it will return a default format that may not match the caller's expectation","drill_links is only populated in the response when using the json_detail result format; requesting json will return data rows without the drill link metadata"],"contributor":"waymark-seed","created":"2026-06-12T20:25:25.581Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":{"status":"sampled","method":"legacy-file-sample","at":"2026-06-13T18:44:33.807Z"},"url":"https://mcp.waymark.network/r/ce369443-5e08-4794-8bee-80fc135fe049"}