Run Query
Stay organized with collections
Save and categorize content based on your preferences.
Version 4.0.26.18 (latest)
Run a saved query.
This runs a previously saved query. You can use this on a query that was generated in the Looker UI
or one that you have explicitly created using the API. You can also use a query 'id' from a saved 'Look'.
The 'result_format' parameter specifies the desired structure and format of the response.
Supported formats:
result_format
Description
json
Plain json
json_bi
(RECOMMENDED) Row data plus metadata describing the fields, pivots, table calcs, and other aspects of the query. See JsonBi type for schema
json_detail
(LEGACY) Row data plus metadata describing the fields, pivots, table calcs, and other aspects of the query
csv
Comma separated values with a header
txt
Tab separated values with a header
html
Simple html
md
Simple markdown
xlsx
MS Excel spreadsheet
sql
Returns the generated SQL rather than running the query
png
A PNG image of the visualization of the query
jpg
A JPG image of the visualization of the query
Note: Streaming queries only write results to the cache when using the json_detail format. Queries in other formats only populate the cache if they cannot be streamed (such as when table calculations or row totals are present). Once cached, all result formats can retrieve results from the cache.
Request
GET
/queries/{query_id}/run/{result_format}
Datatype
Description
Request
HTTP Request
path
HTTP Path
Expand HTTP Path definition...
query_id
string
Id of query
result_format
string
Format of result
query
HTTP Query
Expand HTTP Query definition...
limit
integer
Row limit (may override the limit in the saved query).
apply_formatting
boolean
Apply model-specified formatting to each result.
apply_vis
boolean
Apply visualization options to results.
cache
boolean
Get results from cache if available.
image_width
integer
Render width for image formats.
image_height
integer
Render height for image formats.
generate_drill_links
boolean
Generate drill links (only applicable to 'json_detail' format.
force_production
boolean
Force use of production models even if the user is in development mode. Note that this flag being false does not guarantee development models will be used.
cache_only
boolean
Retrieve any results from cache even if the results have expired.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2026-09-22 UTC."],[],[]]