ChangelogNew

Ask ChatGPT and Gemini from a precise location

Answers
Playground showing a ChatGPT answer for coffee shops near SoHo, New York, with the distance to each café

Set payload.location on CHATGPT and GEMINI tasks to get the answer a user at that place sees.

What you get

  • Answers for a neighborhood: local recommendations come from around the point you send, such as a station, a store or a street corner.
  • location in every located result: the coordinates the answer was asked from.
  • The same control in the Playground: type a place or coordinates in Location (optional), beside the country button.

How it works

Questions like “a good dentist nearby” or “where to eat lunch” depend on where the user is. ChatGPT and Gemini answer them for the user’s location, so the same prompt brings different clinics in Gangnam and in Busan. Set payload.location to a point inside the task’s country, and querying.ai asks the engine as a user standing there.

Send the point as latitude and longitude in decimal degrees, as in the request below. Map apps show these numbers for any spot you pick, and the Playground finds them for a place name. Each result carries the same point back as location.

Location works on CHATGPT, GEMINI, GOOGLE, AIMODE and GOOGLE_SERP tasks. The API checks the engine the moment you submit and returns LOCATION_UNSUPPORTED for any other engine, so every task that runs answers for the place you chose.

Where it helps

  • Check whether AI recommends your clinic, restaurant or store to people in its own neighborhood.
  • Ask the same question from several neighborhoods or cities to see where competitors lead.
  • Track each branch of a chain from its own address, with one prompt set per location.

Send a request

Send the request with your API key in the Authorization header.

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 coffee shops near me for working on a laptop",
      "country": "US",
      "location": { "latitude": 40.72288, "longitude": -73.99875 }
    }
  }'

Request fields

taskTypestringRequired
The engine to run, such as CHATGPT or GOOGLE.
payload.promptstringRequired
The question, written the way a user types it into the chat. Up to 100,000 characters.
payload.countrystring
Two-letter country code of the market to ask from, such as US, KR or JP. Default US.
payload.locationobject
A point inside country, as latitude (-90 to 90) and longitude (-180 to 180) in decimal degrees, such as {"latitude": 37.4979, "longitude": 127.0276}. The engine answers as a user standing there. For CHATGPT, GEMINI, GOOGLE, AIMODE and GOOGLE_SERP.
webhook.urlstring
An HTTPS address on your server. The finished task is posted there the moment it completes.
idempotencyKeystring
Your own ID for the request. Each key creates one task per account, so a retried send stays a single task.

Response

A finished task looks like this, trimmed for length.

JSON
{
  "success": true,
  "task": {
    "id": "e5aba119-a26e-4f82-a965-35c9234a428b",
    "taskType": "CHATGPT",
    "status": "COMPLETED",
    "createdAt": "2026-10-02T15:41:03.858Z"
  },
  "credits": { "creditsToCharge": 2, "creditsCharged": 2 },
  "response": {
    "text": "Here are several **nearby cafés that look particularly suitable for laptop work**, based on current local listings and work-friendly details:\n\n- The Lost Draft — **0.2 km away**. Laptop-friendly, with Wi-Fi, comfortable seating, and larger tables.\n…",
    "sources": [
      {
        "position": 1,
        "url": "https://awifiplace.com/cities/new-york",
        "label": "Best Coffee Shops to Work in New York (2026) | 103 Cafes with WiFi",
        "attribution": "A Wifi.Place"
      }
    ],
    "searchQueries": [
      "best coffee shops for laptop work near me wifi outlets"
    ],
    "location": { "latitude": 40.72288, "longitude": -73.99875 }
  }
}
task.statusstring
QUEUED, PROCESSING, then COMPLETED with the answer or FAILED with error.
credits.creditsChargedinteger
Credits charged for the finished task. A failed task charges 0.
response.textstring
The answer as plain text.
response.locationobject
The point the answer used, as you sent it: latitude and longitude.
response.sourcesarray
The pages the answer cites, in the engine’s order, each with position, url and label.
response.searchQueriesarray
The web searches the engine ran to write the answer.

Receive the result

The request returns the task right away with status QUEUED. Poll GET /v1/async/task/{id} until status is COMPLETED or FAILED, or add webhook.url and the finished task arrives at your server with the same task, credits and response. Results stay available for 24 hours after a task finishes.

curl https://api.querying.ai/v1/async/task/$TASK_ID \
  -H "Authorization: Bearer $QUERYING_API_KEY"

Errors

LOCATION_UNSUPPORTEDHTTP 422
payload.location works on CHATGPT, GEMINI, GOOGLE, AIMODE and GOOGLE_SERP. Other engines return this code when you submit.

Pricing

A located task costs the same as any other task on its engine: 2 credits for ChatGPT and 1 credit for Gemini, per completed task.

More updates

Stay in the loop

Get new product updates in your inbox.

RSS feed