What you need to change
- Nothing, to keep working — existing v1 calls keep working. You can move at your own pace.
- New capabilities are optional — filters, audience generation, dataset descriptions, survey question discovery and workflow skills can be adopted one at a time.
- Real changes — when you move a call to v2, check Argument and response changes.
Endpoint mapping
All v2 endpoints are under
https://api.globalwebindex.com/v2/spark-api/. The new v2 endpoints are listed in the tool mapping below.
Tool mapping
Argument and response changes
v1POST /generic takes a single string prompt. v2 POST /insights/generate takes prompts[] (1–10 short prompts per request) and returns one result per prompt.
Custom clients: build every request from the published v2 API reference schemas for the endpoints you call. Do not reuse v1 request shapes or hardcode argument shapes from these guides.
Suggested migration checklist
- Keep your existing integration running.
- Point a test client at one v2 endpoint, for example
GET /v2/spark-api/datasets, with your current API token. - Move discovery calls from
POST /v1/spark-api/generictoPOST /v2/spark-api/insights/generate, sendingprompts[]and readingresults[]. - Call
POST /v2/spark-api/global-filtersfirst and passlocation_codesandwave_codesto audience and insight calls. See Step 2: Structuring a Query. - Use
POST /v2/spark-api/audiences/searchorPOST /v2/spark-api/audiences/generatewhen you need an audience, store its ID, and pass it inenforced_audiencesinstead ofdocked_audiences. - Replace
chat_idfollow-ups with newPOST /insights/generatecalls that reuse the same audience IDs and codes. - Update error handling to read problem details
typeand per-promptresults[].error.
What stays the same
- API token and authentication: send the same token as
Authorization: Bearer YOUR_API_KEY. See Authorization - v1 routes remain available; existing v1 calls are unchanged

