Looker · Schema

Query

A query defines a data request against a LookML model. Queries are immutable once created and contain the model, view, fields, filters, sorts, and limit needed to generate SQL and retrieve results.

AnalyticsBI PlatformBusiness IntelligenceData AnalyticsData Visualization

Properties

Name Type Description
id integer Unique numeric identifier for this query
model string LookML model name
view string LookML explore (view) name
fields array List of field names to include in the query results (e.g. orders.count, users.created_date)
pivots array List of field names to pivot on
fill_fields array Fields to fill missing date values for
filters object Key-value map of filter expressions. Keys are field names and values are Looker filter expressions.
filter_expression string Custom filter expression using Looker filter syntax
sorts array Sort order for results. Each item is a field name optionally followed by asc or desc.
limit string Maximum number of rows to return (as string)
column_limit string Maximum number of columns for pivoted results
total boolean Whether to include row totals
row_total string Row total display setting
subtotals array Fields to subtotal on
dynamic_fields string JSON string of dynamic field definitions
vis_config object Visualization configuration object
query_timezone string Timezone for date/time calculations
client_id string Client-generated hash of the query for caching
slug string Short unique URL slug for this query
share_url string Shareable URL for this query
url string Relative URL for this query in the Looker UI
has_table_calculations boolean Whether this query has table calculations
View JSON Schema on GitHub

JSON Schema

looker-query-schema.json Raw ↑
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "Query",
  "type": "object",
  "description": "A query defines a data request against a LookML model. Queries are immutable once created and contain the model, view, fields, filters, sorts, and limit needed to generate SQL and retrieve results.",
  "properties": {
    "id": {
      "type": "integer",
      "description": "Unique numeric identifier for this query"
    },
    "model": {
      "type": "string",
      "description": "LookML model name"
    },
    "view": {
      "type": "string",
      "description": "LookML explore (view) name"
    },
    "fields": {
      "type": "array",
      "description": "List of field names to include in the query results (e.g. orders.count, users.created_date)"
    },
    "pivots": {
      "type": "array",
      "description": "List of field names to pivot on"
    },
    "fill_fields": {
      "type": "array",
      "description": "Fields to fill missing date values for"
    },
    "filters": {
      "type": "object",
      "description": "Key-value map of filter expressions. Keys are field names and values are Looker filter expressions."
    },
    "filter_expression": {
      "type": "string",
      "description": "Custom filter expression using Looker filter syntax"
    },
    "sorts": {
      "type": "array",
      "description": "Sort order for results. Each item is a field name optionally followed by asc or desc."
    },
    "limit": {
      "type": "string",
      "description": "Maximum number of rows to return (as string)"
    },
    "column_limit": {
      "type": "string",
      "description": "Maximum number of columns for pivoted results"
    },
    "total": {
      "type": "boolean",
      "description": "Whether to include row totals"
    },
    "row_total": {
      "type": "string",
      "description": "Row total display setting"
    },
    "subtotals": {
      "type": "array",
      "description": "Fields to subtotal on"
    },
    "dynamic_fields": {
      "type": "string",
      "description": "JSON string of dynamic field definitions"
    },
    "vis_config": {
      "type": "object",
      "description": "Visualization configuration object"
    },
    "query_timezone": {
      "type": "string",
      "description": "Timezone for date/time calculations"
    },
    "client_id": {
      "type": "string",
      "description": "Client-generated hash of the query for caching"
    },
    "slug": {
      "type": "string",
      "description": "Short unique URL slug for this query"
    },
    "share_url": {
      "type": "string",
      "description": "Shareable URL for this query"
    },
    "url": {
      "type": "string",
      "description": "Relative URL for this query in the Looker UI"
    },
    "has_table_calculations": {
      "type": "boolean",
      "description": "Whether this query has table calculations"
    }
  }
}

Work with this as data

Every JSON Schema here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for schemas

4 MCP tools reach this
  • find_json_schemasBrowse and filter every JSON Schema in the catalog.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This JSON Schema
curl "https://apis.io/api/v1/json-schemas/looker-query"
All schemas
curl "https://apis.io/api/v1/json-schemas?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.