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 place you name, such as a station, a district or a street address.
  • location in every located result: the place the answer used, its coordinates and the kind of place it matched.
  • The same control in the Playground: type the place 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 place inside the task’s country, and querying.ai asks the engine as a user standing there.

Write the place the way people there write it, up to 200 characters: “강남역”, “Gangnam-gu, Seoul” or a full street address. For a name that several cities share, add the district or city. The result records what was applied:

  • location.query: the text you sent.
  • location.name: the place it matched, written the way the market writes it.
  • location.latitude and location.longitude: the point the engine answered for.
  • location.precision: the kind of place matched, such as railway, suburb or city.

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": "SoHo, New York"
    }
  }'

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.locationstring
A place inside country, such as a station, district or street address, up to 200 characters. 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": {
      "name": "SoHo, Manhattan, New York County, New York, 10012, United States",
      "query": "SoHo, New York",
      "latitude": 40.72288,
      "longitude": -73.99875,
      "precision": "neighbourhood"
    }
  }
}
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 place the answer used: query, name, latitude, longitude and precision.
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.
LOCATION_NOT_FOUNDHTTP 422
The place in payload.location is unknown inside country. Add the district or city and send again.
LOCATION_LOOKUP_UNAVAILABLEHTTP 503
Place lookup is briefly unavailable. Send the same request again: places found before return at once.

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