Skip to main content
Spark API v2 gives programmatic access to GWI audience insights through a set of REST endpoints under /v2/spark-api/. Each endpoint does one job: list datasets, resolve location and timeframe filters, find or create audiences, generate insights, and return the details behind an insight. You chain them to answer a question, and reuse the IDs they return across calls. The v2 endpoints run the same logic as the Spark MCP v2 tools, so results match what AI assistants get from Spark MCP.

Endpoints

Start with Prerequisites, then follow the Quickstart for how to chain them, with a request and response example for each endpoint.

Authorization

Send your API token in the Authorization header of every request, in the form Authorization: Bearer YOUR_API_KEY. v2 uses the same token as v1. See Authorization.

Requests

  • Request bodies are JSON objects. Required fields must be present, values must have the documented type, and fields that are not documented are rejected.
  • The maximum request body size is 4 MiB.
  • The full request and response schemas are in the API reference, which is built from the v2 OpenAPI 3.1 spec.

Errors

Errors are returned as RFC 9457 problem details with Content-Type: application/problem+json. Each problem type URI links to a page that explains the error. See Errors.

Moving from v1

Your v1 integration keeps working. See the Transition guide for the endpoint mapping and the changes to plan for.