Skip to main content
The Spark API exposes POST /v1/spark-api/generic, a lightweight way to pull summarised audience insights into your own tools. It is not a general-purpose chat API: results are most reliable when each request uses a carefully structured prompt (clear audience definition, a specific question, and optional dataset or timeframe scope). See Structuring a Query before you wire open text boxes to this endpoint. For free-form chat, copilots, and agents, use Agent Spark (beta) on the Agentic API instead.

What is the Spark API?

The generic endpoint lets you programmatically query GWI’s insight engine when you control how the question is phrased. It allows:
  • Template-driven or form-backed queries that map to Spark’s expected prompt shape
  • Fast access to summarised insight bullets plus sources metadata in one JSON response
  • A bridge from a fixed business question to GWI data, without managing variables or wave logic in your code

Use cases

  • Scheduled or batch jobs that run the same shaped prompt on a cadence (campaign dashboards, weekly briefs)
  • Internal tools where the UI collects audience, question, and scope fields and builds the prompt for the user
  • Content and research pipelines with reviewed prompt templates, not raw user chat
  • Automated reporting when persona, market, and topic are known in advance
Avoid pointing arbitrary user chat at /v1/spark-api/generic. Loose wording usually produces weak insights. Prefer Agent Spark when users type freely or agents iterate on a thread.

Key features

  • REST API for querying pre-processed, summarised insights
  • Natural language or keyword-based querying (e.g. “Gen Z in the UK”)
  • Returns insight text + metadata (e.g., audience matched, underlying data)
  • Optional request fields on POST /v1/spark-api/generic: chat_id for follow-ups (still requires well-formed prompts), dataset_code or dataset_codes, docked_audiences, and limit (1–20)
  • Conversational streaming via Agent Spark (beta) when structured generic prompts are not enough

Outputs

  • JSON object with a message, an insights array (each insight has id and text), a chat_id, and a sources object
  • sources includes topics, audiences, datasets, locations, and waves used to produce the answer
  • Supports caching for repeated queries