Jepto
Developer Docs
Developer docs

Jepto API

Query every connected source for every client from your own code, with the same fields and numbers as Jepto reports.

The Jepto API gives your code the same data Jepto reports use: every connected source, for every client, through one set of field names and one query format. You don’t call each platform’s API, manage its tokens or reconcile its formats. You send one query and get rows back, keyed by the field names you asked for.

You can use it as a REST API or a GraphQL API. Both have the same operations, the same sign-in and the same request JSON, and both return the same numbers. Use whichever suits your stack.

REST APIhttps://data.jepto.com. JSON request bodies over HTTPS. See REST API.
GraphQL APIhttps://api.jepto.com/graphql. Typed operations and inputs. See GraphQL API.

The same data model is also available to AI assistants and agents through Jepto MCP. See MCP.

Operations

OperationRESTGraphQLRequest JSON
List the clients you can accessGET /clientsclientsnone
List a client’s fieldsPOST /schemaanalyticsSchemaclientId, source, fieldType
Run a queryPOST /queryanalyticsQueryclientId, query
Get a long-running query’s resultPOST /query/resultanalyticsQueryResultqueryId

The request JSON is the REST request body and, unchanged, the GraphQL variables. The API is read-only: it doesn’t change reports, budgets, data sources or anything on the ad platforms.

‍

Quickstart

Four steps from sign-in to rows, shown with curl for both APIs.

1Get a tokenOAuth 2.0 with PKCE
2List clientsFind the clientId
3Read the schemaFind field names
4Run a queryGet rows back

1. Get a token

Sign in with your Jepto account and copy the access_token. Authentication has a ready-made Python script and a Postman setup. Both APIs take the same token.

Terminal
export JEPTO_TOKEN="eyJraWQiOi..."

2. List your clients

REST
curl https://data.jepto.com/clients \
  -H "Authorization: Bearer $JEPTO_TOKEN"
GraphQL
curl -X POST https://api.jepto.com/graphql \
  -H "Authorization: Bearer $JEPTO_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"query": "{ clients { clientId name domain } }"}'

Both return the same list. REST returns { "clients": [ … ] } and GraphQL returns { "data": { "clients": [ … ] } }:

clients
[
  {
    "clientId": "a1b2c3d4e5f6a7b8",
    "name": "Homer’s Donuts",
    "domain": "homersdonuts.com"
  }
]

3. Read the schema

REST
curl -X POST https://data.jepto.com/schema \
  -H "Authorization: Bearer $JEPTO_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "clientId": "a1b2c3d4e5f6a7b8",
    "source": "googleAds",
    "fieldType": "metrics"
  }'
GraphQL: request.json
{
  "query": "query ($clientId: ID!, $source: String, $fieldType: FieldType) {
    analyticsSchema(clientId: $clientId, source: $source, fieldType: $fieldType) {
      sources { type label }
      metrics { name label type aggregation }
    }
  }",
  "variables": {
    "clientId": "a1b2c3d4e5f6a7b8",
    "source": "googleAds",
    "fieldType": "metrics"
  }
}
GraphQL
curl -X POST https://api.jepto.com/graphql \
  -H "Authorization: Bearer $JEPTO_TOKEN" \
  -H "Content-Type: application/json" \
  -d @request.json
Schema (shortened)
{
  "sources": [
    {
      "dataSourceId": "a1b2c3d4e5f6g7h8",
      "type": "googleAds",
      "label": "Google Ads"
    }
  ],
  "metrics": [
    {
      "name": "googleAds.spend",
      "label": "Cost (spend)",
      "kind": "metric",
      "type": "number",
      "aggregation": "sum"
    },
    {
      "name": "googleAds.clicks",
      "label": "Clicks",
      "kind": "metric",
      "type": "number",
      "aggregation": "sum"
    }
  ],
  "dimensions": []
}

4. Run a query

Spend and clicks by campaign for the last 30 complete days, highest spend first. Save the request JSON as body.json. It’s the REST body as is, and the variables of the GraphQL request:

body.json
{
  "clientId": "a1b2c3d4e5f6a7b8",
  "query": {
    "measures": ["googleAds.spend", "googleAds.clicks"],
    "dimensions": ["googleAds.campaignName"],
    "timeDimensions": [
      {
        "dimension": "googleAds.date",
        "dateRange": [
          "30DaysAgo",
          "yesterday"
        ]
      }
    ],
    "order": [
      {
        "member": "googleAds.spend",
        "direction": "desc"
      }
    ],
    "limit": 100,
    "total": true
  }
}
REST
curl -X POST https://data.jepto.com/query \
  -H "Authorization: Bearer $JEPTO_TOKEN" \
  -H "Content-Type: application/json" \
  -d @body.json
GraphQL: request.json
{
  "query": "query ($clientId: ID!, $query: AnalyticsQueryInput!) {
    analyticsQuery(clientId: $clientId, query: $query) {
      queryId status data total
    }
  }",
  "variables": <contents of body.json>
}
GraphQL
curl -X POST https://api.jepto.com/graphql \
  -H "Authorization: Bearer $JEPTO_TOKEN" \
  -H "Content-Type: application/json" \
  -d @request.json
Result
{
  "queryId": "qry_a1b2c3d4e5f6a7b8",
  "status": "COMPLETE",
  "data": [
    {
      "googleAds.campaignName": "Brand | Search",
      "googleAds.spend": 1840.5,
      "googleAds.clicks": 2210
    },
    {
      "googleAds.campaignName": "Donuts Near Me | Search",
      "googleAds.spend": 1312.75,
      "googleAds.clicks": 1486
    }
  ],
  "total": 2,
  "annotation": {
    "measures": {
      "googleAds.spend": {
        "label": "Spend"
      },
      "googleAds.clicks": {
        "label": "Clicks"
      }
    },
    "dimensions": {
      "googleAds.campaignName": {
        "label": "Campaign Name"
      }
    },
    "segments": {},
    "timeDimensions": {}
  },
  "lastRefreshTime": "2026-11-24T03:12:45.123456Z",
  "cacheStatus": "computed"
}

Both APIs return this result. In GraphQL it’s under data.analyticsQuery, and data and annotation are JSON strings to parse. Most queries finish in under a second when the data is cached, and in a few seconds when Jepto has to fetch from the platform. A query still running after about 25 seconds returns status: "RUNNING" and a queryId to collect later. See Queries → Response.

‍

Concepts

TermDefinition
AccountYour Jepto workspace. A token belongs to one user in one account.
ClientOne business in the account, identified by a clientId of exactly 16 lowercase hexadecimal characters, for example a1b2c3d4e5f6a7b8. Every data query is for one client. A schema request can also use "all_clients" to list the fields of every client together.
SourceA connected platform for a client, such as googleAds or googleAnalytics4. A client can have several.
FieldA metric (a number to aggregate) or a dimension (a value to group or filter by). Its name is the key you use in queries, for example googleAds.campaignName.
QueryA JSON object listing measures, dimensions, timeDimensions, filters, order and paging. The format is based on the open-source Cube query format, with the differences listed in Queries.
AccessA token sees what its user sees in the Jepto app: the same clients and the same permissions.

‍

Reference

  • Authentication: get, send, refresh and revoke tokens.
  • Data Model: how fields, sources, unified and custom fields fit together, and how a query runs.
  • Data Queries: examples, then every query key, date token, granularity, filter operator and response field.
  • MCP: the same data model through Jepto MCP for AI assistants and agents.
  • REST API and GraphQL API: endpoints, operations, status codes and the type definitions.
  • Errors and Limits: error codes, timeouts, caching, limits and retries.