Skip to content
Join the waitlist

Developers

API Reference

Read your workspace from your own code: sites, pages, queries, decisions with their evidence, the changes made, their outcomes and reports. Every figure keeps its kind.

By QueryRev AI Published Updated 4 min read

  • Version 1.0.0
  • Read-only
  • JSON over HTTPS

Key takeaways

  • Every request is a GET with an API key in the Authorization header; keys are made in Workspace → API.
  • Requests a minute depend on the plan of the account that is billed; over the limit the answer is 429 with Retry-After.
  • Lists are paged by cursor: pass next_cursor back unchanged, with the same filters.
  • Every figure carries its kind. Known, Influenced, Modeled and Incremental figures are never added together or merged.

Overview

The API is JSON over HTTPS, versioned by its path (/api/v1) and read-only: every endpoint is a GET, and nothing it does changes a site, a workspace or a setting. Changes to a website go through your policy in the app, never through the API.

A key reads one workspace, with a role no higher than the person who made it. Revenue fields follow the key’s revenue-view level, which every answer states in meta.revenue_view.

Base address
https://app.queryrev.com/api/v1
A first request
# The sites the key can readcurl "https://app.queryrev.com/api/v1/sites" \  -H "Authorization: Bearer $QUERYREV_API_KEY"

Authentication

Make a key in Workspace → API. It is shown once, when it is made: copy it then. The workspace keeps only a hash and a short prefix to tell keys apart, with the day each key was last used. A key may have an end date, and it can be revoked at any time.

Send the key in the Authorization header of every request, as a bearer token. Keep it on your server: a key in a browser page or a public repository can be read by anyone.

The header
Authorization: Bearer qr_live_…

A request with no key is refused with missing_api_key. A key that is wrong, revoked or past its end date gets one answer, invalid_api_key, so the answer never says which of the three it was. Both are 401.

Rate limits

Requests are counted in one-minute windows for the account that is billed: an agency’s client workspaces count against the agency. Every key of the account shares the same room, so more keys or more workspaces never make more of it.

Requests a minute, by plan
  • Core
    60
  • Growth
    60
  • Scale
    120
  • Agency
    120
  • Agency Pro
    300
  • Enterprise
    Set in the contract

Every answer to a key carries X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset.

The headers of a limited answer
  • X-RateLimit-Limit
    Requests a minute the workspace's plan allows.
  • X-RateLimit-Remaining
    Requests left in the current one-minute window.
  • X-RateLimit-Reset
    When the current window ends, in seconds since the epoch.
  • Retry-After
    Seconds to wait before the next request.

Over the limit the answer is 429 with the code rate_limited and a Retry-After header: wait that many seconds, then try again. A network whose requests were refused (401 or 403) 60 times in a minute is answered 429 with Retry-After before any key is read.

A workspace with no subscription reads at the smallest plan’s rate. One that is read-only, because a payment is overdue or the subscription was canceled or ended, still reads at its plan’s rate. A suspended workspace is refused with 403 and plan_unavailable.

Pagination

Every list answers data, next_cursor and meta. limit sets the rows of a page, 50 unless you ask for another number, up to the endpoint’s maximum. To read the next page, send next_cursor back as cursor, unchanged, with the same filters. On the last page next_cursor is null.

Pages are cut by the list’s own order and a unique id, so a page never repeats or skips a row while data changes. A cursor belongs to the list it came from: used on another endpoint, with other filters, or altered, it is refused with invalid_cursor.

The shape of a list
{  "data": [ … ],  "next_cursor": "eyJ2IjoxLCJlIjoic2l0ZXMiLCJmIjoiIn0",  "meta": { "revenue_view": "full" }}
Read every page (Node)
const base = 'https://app.queryrev.com/api/v1/decisions';const headers = { Authorization: `Bearer ${process.env.QUERYREV_API_KEY}` };let cursor = null;for (;;) {  const url = cursor === null ? base : `${base}?cursor=${encodeURIComponent(cursor)}`;  const answer = await fetch(url, { headers });  if (answer.status === 429) {    const seconds = Number(answer.headers.get('Retry-After') ?? '1');    await new Promise((done) => setTimeout(done, seconds * 1000));    continue;  }  if (!answer.ok) throw new Error((await answer.json()).error.code);  const page = await answer.json();  for (const decision of page.data) console.log(decision.number, decision.state);  if (page.next_cursor === null) break;  cursor = page.next_cursor;}

Errors

A refusal answers one shape: an error with a stable code and a fixed message. The message is the same words for the same code and never carries anything of the request or the server, so code your handling on code. invalid_parameter also names the parameter.

An error answer
{  "error": {    "code": "invalid_parameter",    "message": "A parameter of this request is not valid.",    "parameter": "limit"  }}
Every error code, with its status and its message
  • missing_api_key
    401
    Send your API key as "Authorization: Bearer <key>".
  • invalid_api_key
    401
    This API key is not valid. It may be wrong, revoked or expired.
  • plan_unavailable
    403
    The API is not available for this workspace right now.
  • not_found
    404
    Nothing was found for this request.
  • method_not_allowed
    405
    The API is read-only: use GET.
  • invalid_parameter
    400
    A parameter of this request is not valid.
  • invalid_cursor
    400
    The cursor is not valid. Use the next_cursor of a previous answer, unchanged.
  • rate_limited
    429
    Too many requests. Wait for the time in Retry-After and try again.
  • unavailable
    503
    The API cannot answer right now. Try again shortly.
  • internal_error
    500
    Something went wrong on our side. Try again shortly.

429 and 503 are worth trying again after a wait; 500 is a fault on our side and is also safe to retry. The others need a change to the request or the key.

Figures and their kinds

A number never leaves the API bare. Each figure is an object with its kind, the kind’s name (kind_label), its unit, the period it covers, its flags and its confidence, as the app shows it. Kinds are never merged: do not add or compare figures of different kinds. How each kind is measured.

The kinds a figure can have, and its shape for each
  • known
    One value.
  • influenced
    One value.
  • modeled
    A range: low and high, never a value.
  • incremental
    A value with low and high around it, and base_kind, the kind of the series it was measured on.
  • ga4_reported
    One value.
  • your_estimate
    One value.
  • observed_sample
    One value, with confidence.sample_count.
  • imported
    One value.
A Modeled figure
{  "kind": "modeled",  "kind_label": "Modeled",  "unit": "currency_per_year",  "low": 6500,  "high": 7300,  "currency": "USD",  "period": null,  "flags": [],  "confidence": {    "basis": "range_from_inputs",    "sample_count": null  }}

Endpoints

Webhooks

A webhook sends a signed POST to your server when something happens in the workspace: a decision made or moved, a change applied or rolled back, an outcome classified, a report generated, a Search Integrity alert. Endpoints are added in Workspace → API.

MCP server

The @queryrev/mcp package is a read-only MCP server over this API, for an MCP client on your computer. It has one tool for each endpoint, named on the endpoint’s page, and returns each answer unchanged, figures and kinds included. It takes your key from the QUERYREV_API_KEY environment variable only.

The server in a client’s settings
{  "mcpServers": {    "queryrev": {      "command": "npx",      "args": [        "-y",        "@queryrev/mcp"      ],      "env": {        "QUERYREV_API_KEY": "qr_live_your_key_here"      }    }  }}

Cite this page

A suggested citation. Its link goes to this page, whose address does not change.

QueryRev AI. “API Reference.” QueryRev AI, 7 Nov 2026. https://queryrev.com/docs/api

Related