Skip to main content

What you need to change

  1. Nothing, to keep working — existing v1 calls keep working. You can move at your own pace.
  2. New capabilities are optional — filters, audience generation, dataset descriptions, survey question discovery and workflow skills can be adopted one at a time.
  3. 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

v1 POST /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

  1. Keep your existing integration running.
  2. Point a test client at one v2 endpoint, for example GET /v2/spark-api/datasets, with your current API token.
  3. Move discovery calls from POST /v1/spark-api/generic to POST /v2/spark-api/insights/generate, sending prompts[] and reading results[].
  4. Call POST /v2/spark-api/global-filters first and pass location_codes and wave_codes to audience and insight calls. See Step 2: Structuring a Query.
  5. Use POST /v2/spark-api/audiences/search or POST /v2/spark-api/audiences/generate when you need an audience, store its ID, and pass it in enforced_audiences instead of docked_audiences.
  6. Replace chat_id follow-ups with new POST /insights/generate calls that reuse the same audience IDs and codes.
  7. Update error handling to read problem details type and per-prompt results[].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