cURL
curl --request POST \ --url https://api.globalwebindex.com/v1/spark-api/mcp \ --header 'Authorization: <api-key>' \ --header 'Content-Type: application/json' \ --data ' { "jsonrpc": "2.0", "id": "req-123", "method": "tools/call", "params": { "name": "chat_gwi", "arguments": { "prompt": "What marketing channels work best for Audi drivers in the US?" } } } '
{ "jsonrpc": "2.0", "id": "<string>", "result": { "content": [ { "type": "text", "text": "<string>" } ], "isError": true } }
This endpoint handles both MCP tools through JSON-RPC:
1. chat_gwi - Query audience insights
2. explore_insight_gwi - Get detailed statistics
Format: Bearer YOUR_TOKEN
JSON-RPC request for either chat_gwi or explore_insight_gwi tool
JSON-RPC version
2.0
Unique request identifier
"req-123"
Method name for MCP tool calls
tools/call
Show child attributes
Tool name
chat_gwi
Natural language question about audience behavior, preferences, or market insights. Be specific about the audience, market, or behavior you're interested in.
"What marketing channels work best for Audi drivers in the US?"
Optional. Include this to continue a previous conversation. Use the chat_id returned from a previous chat_gwi response.
"chat_abc123"
Successful response with insights
Request identifier echoed back
text
Formatted response containing insights and metadata
Indicates if the response is an error
Was this page helpful?