AI Search Data API Quickstart
Get an API key, submit a Gemini prompt and collect the answer with polling or webhooks. Start your querying.ai integration step by step.
curl -X POST https://api.querying.ai/v1/async/task \-H "Authorization: Bearer $QUERYING_API_KEY" \-H "Content-Type: application/json" \-d '{"taskType": "CHATGPT","payload": { "prompt": "Best running shoes for flat feet in 2026", "country": "US" },"webhook": { "url": "https://yours.app/hooks/querying" }}'{"task": { "id": "753c5cb2-ceda-4219-9c27-c59e9a1803ac", "status": "COMPLETED" },"response": {"model": "gpt-6","text": "# Best running shoes for flat feet in 2026\n\nIf you have …","entities": [{ "name": "Brooks Adrenaline GTS 25", "type": "product" },{ "name": "ASICS GEL-Kayano 33", "type": "product" },…],"sources": [{"position": 1,"url": "https://www.runnersworld.com/gear/a25750345/running-shoes-flat-feet/","cited": true},…],"searchQueries": ["best running shoes for flat feet 2026 stability shoes reviews updates"],"durationMs": 34886}}1. Prepare your API key
Create a free account and generate a key in the dashboard. Store it in the server environment variable QUERYING_API_KEY and use it only from your server. New accounts start with 500 credits before adding a payment method.
2. Submit a prompt
The command submits a Gemini prompt with a US market setting. Write the prompt in the language you want; it is sent as written. Use task.id from the accepted response in the next step.
curl -X POST https://api.querying.ai/v1/async/task \
-H "Authorization: Bearer $QUERYING_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"taskType": "GEMINI",
"payload": {
"prompt": "best wireless earbuds for commuting",
"country": "US"
}
}'3. Collect the completed result
Replace TASK_ID with the accepted ID. If QUEUED or PROCESSING, check again after a delay; when COMPLETED, read response. When FAILED, read the error details. Public polling must occur within 24 hours of completion.
curl https://api.querying.ai/v1/async/task/TASK_ID \
-H "Authorization: Bearer $QUERYING_API_KEY"4. Receive results with a webhook
Add webhook.url to the submission JSON to receive terminal results on your server. Prepare an HTTPS receiver with the documented signature verification. Delivery makes up to 5 attempts: the initial request and 4 retries with backoff. Deduplicate redeliveries by task.id.
{
"taskType": "GEMINI",
"payload": {
"prompt": "best wireless earbuds for commuting",
"country": "US"
},
"webhook": {
"url": "https://your-server.example.com/querying-webhook"
}
}5. Add engines and scheduled measurement
Check each engine’s taskType, prompt/query input and response schema before expanding. When a request hits insufficient credits or concurrency limits, resolve the cause and then retry. To track brand visibility over time, save a consistent prompt set in Monitors.
What teams run on querying.ai
Every number below comes from querying.ai's own public boards: the 15 category monitors of the AI Index and the Model Tracker.
GEO & AEO Monitoring
Track how AI search surfaces mention your brand, products, and competitors across engines, countries, and prompts.
Learn moreCompetitive Intelligence
See what AI engines recommend in your market: which brands get cited and which products surface.
Learn moreAgency Dashboards
Monitor dozens of clients across engines and regions simultaneously with batch APIs and webhooks.
Learn moreResearch & Analysis
Study AI search behavior across markets with structured data for academic research, content strategy, and SEO.
Learn moreExplore related capabilities
Start with 500 free credits
Run your first task in the Playground, or call the API with your key.


