---
title: "Run a reporting query (GET)"
method: GET
path: "/apidata"
tags: ["API"]
---

# Run a reporting query (GET)

`GET /apidata`

## Request

- Base URL: `https://api3.mountain.com`
- URL: `https://api3.mountain.com/apidata`
- Auth: none declared
- TypeScript: <https://skmtc.dev/mountain/apis/mntn-ai-ops-reporting-api/docs/apidata/get.ts> (a function with typed inputs; its response is checked against the schema)

Validates the API `key`, resolves the advertiser, and executes a reporting query. Prefer **POST /apidata** when sending a large **`filter`** object.

## Query parameters

- `query` GetRequest, required: GET /apidata query parameters. Use **GET /apilist** to discover valid column identifiers (for `data`, `sum`, and `filter`).
  - `key` string, required: Advertiser API key (required on every request).
  - `data` string, required: Column selection: comma-separated identifiers **or** a JSON array string whose elements use the same shapes as **POST /apidata** `data`. Use **GET /apilist** to discover valid column identifiers (for `data`, `sum`, and `filter`).
  - `sum` string[]
  - `filter` Filter: Optional JSON **object** that restricts which rows are returned. Use the same shape for **POST** `filter` and **GET** `filter` (URL-encoded). **Filter types — column predicates:** Each property key is a column identifier (`table.column`). The value can be: - **Operator object:** keys are operator names and values are comparison values (for example `{"equals": "Live"}`, `{"in": ["a","b"]}`). - **Scalar** (string or number): shorthand for `equals`. - **Array:** shorthand for membership (`in`). **Filter types — logical groups:** Properties named `AND`, `OR`, or `NOT` hold a nested object that follows the same rules (more column predicates and/or nested `AND` / `OR` / `NOT`). **Operator keys** (allowed keys inside an operator object): `equals`, `not`, `in`, `notIn`, `lt`, `lte`, `gt`, `gte`, `contains`, `notContains`, `startsWith`, `endsWith`, `hasAny`. Use **GET /apilist** to discover valid column identifiers (for `data`, `sum`, and `filter`).
  - `begin` string, required: start date of the query
  - `end` string: end date of the query
  - `format` 'human' | 'json' | 'csv' | 'excel': defines the content type of the response
  - `formatdata` boolean: when set to true, the values in the response data will be each be formatted
  - `fullname` boolean
  - `limit` integer: when set, the number of rows returned will be limited to this number
  - `offset` integer: when set, the query will skip this number of rows. Used for pagination
  - `sort` string[]: when set, data will be returned sorted by this column and direction
  - `ids` integer[]
  - `accountTypes` integer[]
  - `filters` union[]
    - union
      - And: Optional JSON **object** that restricts which rows are returned. Use the same shape for **POST** `filter` and **GET** `filter` (URL-encoded). **Filter types — column predicates:** Each property key is a column identifier (`table.column`). The value can be: - **Operator object:** keys are operator names and values are comparison values (for example `{"equals": "Live"}`, `{"in": ["a","b"]}`). - **Scalar** (string or number): shorthand for `equals`. - **Array:** shorthand for membership (`in`). **Filter types — logical groups:** Properties named `AND`, `OR`, or `NOT` hold a nested object that follows the same rules (more column predicates and/or nested `AND` / `OR` / `NOT`). **Operator keys** (allowed keys inside an operator object): `equals`, `not`, `in`, `notIn`, `lt`, `lte`, `gt`, `gte`, `contains`, `notContains`, `startsWith`, `endsWith`, `hasAny`. Use **GET /apilist** to discover valid column identifiers (for `data`, `sum`, and `filter`).
      - Not: Optional JSON **object** that restricts which rows are returned. Use the same shape for **POST** `filter` and **GET** `filter` (URL-encoded). **Filter types — column predicates:** Each property key is a column identifier (`table.column`). The value can be: - **Operator object:** keys are operator names and values are comparison values (for example `{"equals": "Live"}`, `{"in": ["a","b"]}`). - **Scalar** (string or number): shorthand for `equals`. - **Array:** shorthand for membership (`in`). **Filter types — logical groups:** Properties named `AND`, `OR`, or `NOT` hold a nested object that follows the same rules (more column predicates and/or nested `AND` / `OR` / `NOT`). **Operator keys** (allowed keys inside an operator object): `equals`, `not`, `in`, `notIn`, `lt`, `lte`, `gt`, `gte`, `contains`, `notContains`, `startsWith`, `endsWith`, `hasAny`. Use **GET /apilist** to discover valid column identifiers (for `data`, `sum`, and `filter`).
      - Or: Optional JSON **object** that restricts which rows are returned. Use the same shape for **POST** `filter` and **GET** `filter` (URL-encoded). **Filter types — column predicates:** Each property key is a column identifier (`table.column`). The value can be: - **Operator object:** keys are operator names and values are comparison values (for example `{"equals": "Live"}`, `{"in": ["a","b"]}`). - **Scalar** (string or number): shorthand for `equals`. - **Array:** shorthand for membership (`in`). **Filter types — logical groups:** Properties named `AND`, `OR`, or `NOT` hold a nested object that follows the same rules (more column predicates and/or nested `AND` / `OR` / `NOT`). **Operator keys** (allowed keys inside an operator object): `equals`, `not`, `in`, `notIn`, `lt`, `lte`, `gt`, `gte`, `contains`, `notContains`, `startsWith`, `endsWith`, `hasAny`. Use **GET /apilist** to discover valid column identifiers (for `data`, `sum`, and `filter`).
      - Value: Optional JSON **object** that restricts which rows are returned. Use the same shape for **POST** `filter` and **GET** `filter` (URL-encoded). **Filter types — column predicates:** Each property key is a column identifier (`table.column`). The value can be: - **Operator object:** keys are operator names and values are comparison values (for example `{"equals": "Live"}`, `{"in": ["a","b"]}`). - **Scalar** (string or number): shorthand for `equals`. - **Array:** shorthand for membership (`in`). **Filter types — logical groups:** Properties named `AND`, `OR`, or `NOT` hold a nested object that follows the same rules (more column predicates and/or nested `AND` / `OR` / `NOT`). **Operator keys** (allowed keys inside an operator object): `equals`, `not`, `in`, `notIn`, `lt`, `lte`, `gt`, `gte`, `contains`, `notContains`, `startsWith`, `endsWith`, `hasAny`. Use **GET /apilist** to discover valid column identifiers (for `data`, `sum`, and `filter`).
        - `field` string
        - `operator` 'EQUALS' | 'NOT' | 'IN' | 'NOT_IN' | 'LT' | 'LTE' | 'GT' | 'GTE' | 'CONTAINS' | 'NOT_CONTAINS' | 'STARTS_WITH' | 'ENDS_WITH' | 'HAS_ANY'
        - `value` object

## Response `200`

Report data in the requested format

- JsonDataResponse: Response format when format=json is specified
  - `report-name` string: Name of the report
  - `publisher-name` string: Name of the advertiser or 'Grouped Advertisers'
  - `begin` string: Start date/time of the data range
  - `end` string: End date/time of the data range
  - `columns` object[]: Metadata about each column in the response
    - `table` string: Table name in lowercase
    - `name` string: Column name in lowercase
    - `friendly` string: User-friendly column name
    - `alias` string: Column alias (if applicable)
    - `help` string: Column description
    - `format` string: Data format type (date, number, text, percentage, etc.)
    - `icon` string: Icon type for UI display
    - `friendly-suffix` string: Suffix for display (e.g., '%' for percentages)
    - `target_direction_negative` boolean: Whether lower values are better
  - `rows` object[]: Array of data rows, each containing column name-value pairs

## Other responses

- `400`: Invalid request parameters
- `401`: Unauthorized
- `403`: Forbidden
- `404`: Not Found
- `413`: Payload Too Large — the query exceeds server memory limits. Use the asynchronous /batch endpoint for large requests. See [Batch docs](https://api3.mountain.com/docs#batch/description/overview).
- `500`: Internal server error
- `504`: Gateway Timeout — the query exceeded the synchronous request time limit.

---

[API](https://skmtc.dev/mountain/apis/mntn-ai-ops-reporting-api.md) - [All operations](https://skmtc.dev/mountain/apis/mntn-ai-ops-reporting-api/llms.txt) - [OpenAPI document](https://skmtc.dev/mountain/apis/mntn-ai-ops-reporting-api/revisions/826e4445c45e?raw)
