---
title: "POST /query/_apl?format=tabular"
method: POST
path: "/query/_apl?format=tabular"
tags: ["query"]
---

# POST /query/_apl?format=tabular

`POST /query/_apl?format=tabular`

## Request

- Base URL: `https://{axiom-domain}/v1`
- URL: `https://{axiom-domain}/v1/query/_apl?format=tabular`
- Auth: OAuth 2
  - Authorization code: `https://accounts.google.com/o/oauth2/v2/auth`
  - Token URL: `https://www.googleapis.com/oauth2/v4/token` scopes: `query|read`
- TypeScript: <https://skmtc.dev/axiom/apis/axiom-query/docs/query/_apl%3Fformat=tabular/post.ts> (a function with typed inputs; its response is checked against the schema)

Runs an APL query against datasets in this edge deployment and returns the result in the requested `format`. Returns `429` when an organization, token, or user query cost limit is exhausted.

## Query parameters

- `format` 'legacy' | 'tabular' | 'tabular-rows', required
- `nocache` boolean
- `saveAsKind` string
- `id` string
- `streaming-duration` string
- `apl-source` string
- `apl-source-id` string
- `totals` boolean

## Request body

- APLRequestWithOptions
  - `apl` string, required: APL query string
  - `cursor` string: Pagination cursor
  - `defaultLimit` integer: The default limit to use when no limit is specified in the query.
  - `defaultOrder` object[]: The default order to use when no order is specified in the query.
    - `desc` boolean
    - `field` string
  - `endTime` string: End time for the query range
  - `includeCursor` boolean: Include cursor in response
  - `includeCursorField` boolean: Defines if the _cursor field should be projected in the result
  - `libraries` string[]
  - `maxBinAutoGroups` integer: Maximum number of groups to automatically bin into
  - `queryOptions` QueryOptions
    - `against` string
    - `againstStart` string
    - `againstTimestamp` string
    - `aggChartOpts` string
    - `caseSensitive` string
    - `containsTimeFilter` string
    - `datasets` string
    - `displayNull` string
    - `editorContent` string
    - `endColumn` string
    - `endLineNumber` string
    - `endTime` string
    - `integrationsFilter` string
    - `nanosecondPrecision` string
    - `openIntervals` string
    - `overlayCharts` string
    - `queryObject` string
    - `quickRange` string
    - `resolution` string
    - `resultsHistogram` string
    - `selection` string
    - `shownColumns` string
    - `startColumn` string
    - `startLineNumber` string
    - `startTime` string
    - `timeSeriesVariant` string
    - `timeSeriesView` string
  - `startTime` string: start and end time for the query, these must be specified as RFC3339 strings or using relative time expressions (e.g. now-1h, now-1d, now-1w, etc)
  - `variables` object: Variables is an optional set of additional variables that are inserted into the APL

## Response `200`

Query result in the requested `format`.

- AplResult: APL query result (streaming binary data)

## Other responses

- `429`: Query limit exceeded. Returned when an org, token, or user query budget is exhausted. The body names the tripped scope with its limit, usage, and reset.
- `default`: User or system error

## Changes

- **2026-10-16** `16be903874f4`: 3 warning, 1 info
  - the optional response header `X-QueryLimit-Limit` removed for the status `200`
  - the optional response header `X-QueryLimit-Remaining` removed for the status `200`
  - the optional response header `X-QueryLimit-Reset` removed for the status `200`
  - added the non-success response with the status `429`

[Operation history](https://skmtc.dev/axiom/apis/axiom-query/changes/query/_apl%3Fformat=tabular/post.md)

---

[API](https://skmtc.dev/axiom/apis/axiom-query.md) - [All operations](https://skmtc.dev/axiom/apis/axiom-query/llms.txt) - [OpenAPI document](https://skmtc.dev/axiom/apis/axiom-query/revisions/16be903874f4?raw)
