Stay organized with collections
Save and categorize content based on your preferences.
Version 4.0.25.14 (latest)
Run an URL encoded query.
This requires the caller to encode the specifiers for the query into the URL query part using
Looker-specific syntax as explained below.
Generally, you would want to use one of the methods that takes the parameters as json in the POST body
for creating and/or running queries. This method exists for cases where one really needs to encode the
parameters into the URL of a single 'GET' request. This matches the way that the Looker UI formats
'explore' URLs etc.
The parameters here are very similar to the json body formatting except that the filter syntax is
tricky. Unfortunately, this format makes this method not currently callable via the 'Try it out!' button
in this documentation page. But, this is callable when creating URLs manually or when using the Looker SDK.
Again, it is generally easier to use the variant of this method that passes the full query in the POST body.
This method is available for cases where other alternatives won't fit the need.
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
Request
GET
/queries/models/{model_name}/views/{view_name}/run/{result_format}
[[["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 2025-08-20 UTC."],[],[],null,["# Run Url Encoded Query\n\nVersion 4.0.25.14 (latest)\n\n### Run an URL encoded query.\n\nThis requires the caller to encode the specifiers for the query into the URL query part using\nLooker-specific syntax as explained below.\n\nGenerally, you would want to use one of the methods that takes the parameters as json in the POST body\nfor creating and/or running queries. This method exists for cases where one really needs to encode the\nparameters into the URL of a single 'GET' request. This matches the way that the Looker UI formats\n'explore' URLs etc.\n\nThe parameters here are very similar to the json body formatting except that the filter syntax is\ntricky. Unfortunately, this format makes this method not currently callable via the 'Try it out!' button\nin this documentation page. But, this is callable when creating URLs manually or when using the Looker SDK.\n\nHere is an example inline query URL: \n\n https://looker.mycompany.com:19999/api/4.0/queries/models/thelook/views/inventory_items/run/json?fields=category.name,inventory_items.days_in_inventory_tier,products.count&f[category.name]=socks&sorts=products.count+desc+0&limit=500&query_timezone=America/Los_Angeles\n\nWhen invoking this endpoint with the Ruby SDK, pass the query parameter parts as a hash. The hash to match the above would look like: \n\n query_params =\n {\n fields: \"category.name,inventory_items.days_in_inventory_tier,products.count\",\n :\"f[category.name]\" =\u003e \"socks\",\n sorts: \"products.count desc 0\",\n limit: \"500\",\n query_timezone: \"America/Los_Angeles\"\n }\n response = ruby_sdk.run_url_encoded_query('thelook','inventory_items','json', query_params)\n\nAgain, it is generally easier to use the variant of this method that passes the full query in the POST body.\nThis method is available for cases where other alternatives won't fit the need.\n\nSupported formats:\n\nRequest\n-------\n\nGET /queries/models/{model_name}/views/{view_name}/run/{result_format} \nDatatype \nDescription \nRequest \nHTTP Request \npath \nHTTP Path \nExpand HTTP Path definition... \nmodel_name \nstring \nModel name \nview_name \nstring \nView name \nresult_format \nstring \nFormat of result\n\nResponse\n--------\n\n### 200: Query\n\nDatatype \nDescription \n(string) \nstring \n\n### 400: Bad Request\n\nDatatype \nDescription \n(object) \n[Error](/looker/docs/reference/looker-api/latest/types/Error) \nmessage \n*lock* \nstring \nError details \ndocumentation_url \n*lock* \nstring \nDocumentation link\n\n### 404: Not Found\n\nDatatype \nDescription \n(object) \n[Error](/looker/docs/reference/looker-api/latest/types/Error) \nmessage \n*lock* \nstring \nError details \ndocumentation_url \n*lock* \nstring \nDocumentation link\n\n### 422: Validation Error\n\nDatatype \nDescription \n(object) \n[ValidationError](/looker/docs/reference/looker-api/latest/types/ValidationError) \nmessage \n*lock* \nstring \nError details \nerrors \n[ValidationErrorDetail](/looker/docs/reference/looker-api/latest/types/ValidationErrorDetail)\\[\\] \nExpand ValidationErrorDetail definition... \nfield \n*lock* \nstring \nField with error \ncode \n*lock* \nstring \nError code \nmessage \n*lock* \nstring \nError info message \ndocumentation_url \n*lock* \nstring \nDocumentation link \ndocumentation_url \n*lock* \nstring \nDocumentation link\n\n### 429: Too Many Requests\n\nDatatype \nDescription \n(object) \n[Error](/looker/docs/reference/looker-api/latest/types/Error) \nmessage \n*lock* \nstring \nError details \ndocumentation_url \n*lock* \nstring \nDocumentation link\n\nExamples\n--------\n\n### C#\n\n\n### Go\n\n\n### Kotlin\n\n\n### TypeScript\n\n\n### Python\n\n\n### Swift"]]