ChangelogNew

Every Gemini source comes with a confidence level

Gemini
A Gemini answer on wireless earbuds next to its JSON result

Capture what the Gemini app answers to any prompt in your market, with the web sources behind the answer and a confidence level for each.

What you get

  • text: the full Gemini answer, with markdown when you request it.
  • sources: the web pages Gemini grounds its answer in, with URL and title.
  • confidence_level on each source: how strongly Gemini links that source to its answer, so you can weight citations.

How it works

Each task asks the consumer Gemini app your prompt from the country you set and returns the answer your customers see there. Gemini blends what it knows with what it finds on the web, and the source list shows exactly which pages back the answer.

Send Gemini the same prompts you send to ChatGPT and Perplexity to compare which brands each engine recommends and which pages each one trusts.

Where it helps

  • Track how Gemini describes your brand and your competitors.
  • Weight citations by confidence to find the sources that carry the most weight in your category.
  • Compare Gemini with the other engines on one prompt set.

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": "GEMINI",
    "payload": {
      "prompt": "Search the web and recommend 3 wireless earbuds for commuting. Compare noise cancellation and battery life in a short table, with source links. Keep the answer under 180 words.",
      "country": "US",
      "include": { "markdown": true }
    }
  }'

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.
payload.include.markdownboolean
true adds markdown: the answer with its headings, lists, tables and links.
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": "40b806b8-c057-4003-934e-98ab5fef2cef",
    "taskType": "GEMINI",
    "status": "COMPLETED",
    "createdAt": "2026-09-10T02:34:15.665Z"
  },
  "credits": { "creditsToCharge": 1, "creditsCharged": 1 },
  "response": {
    "markdown": "Here are 3 top wireless earbuds for commuting:\n\n* **[Bose QuietComfort Ultra Wireless Noise Cancelling Earbuds](…)**: The best choice for commuting, offering unmatched noise cancellation to block …\n…",
    "sources": [
      {
        "position": 3,
        "url": "https://google.com/search?q=EarFun+Air+Pro+4+Wireless+In-ear+headphones&…"
      },
      {
        "position": 5,
        "url": "https://google.com/search?q=Anker+Soundcore+Liberty+5+True+Wireless+Bluetooth+Earbuds&…"
      }
    ]
  }
}
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.markdownstring
The answer with its formatting: headings, lists, tables and links.
response.sourcesarray
The pages the answer cites, in the engine’s order, each with position, url and label.

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"

Pricing

Each completed Gemini task uses 1 credit.

More updates

Stay in the loop

Get new product updates in your inbox.

RSS feed