AnswerLine Sign in Start free

API reference

Base URL https://api.answerline.dev. Generated from the OpenAPI document; field names and error codes here are the contract.

POST /v1/monitor/chatgpt

Extract structured data from ChatGPT — answer text, cited sources, shopping cards, brand entities, and ads — for any prompt across supported regions

Body

FieldTypeDescription
prompt * string The prompt to send to ChatGPT
country * string Country/region code for localized response
include object Optional flags for including additional response formats
include.html boolean Include a URL to the full HTML of the response
include.markdown boolean Include markdown-formatted response in the result
include.rawResponse boolean Include ChatGPT's raw response payload
include.searchQueries boolean Include the query fan-out ChatGPT used to generate the response
include.ads boolean Include ads displayed in ChatGPT response
include.shopping boolean Include shopping cards and inline products with pricing and offers. Adds +2 credits to the base cost (shared with rawResponse, searchQueries, and ads — enabling any one or any combination adds the same +2).
legacy boolean Serve ChatGPT's legacy desktop interface instead of the default mobile-web one. The legacy interface streams the answer as an event stream, so `result.model`, `result.searchQueries` and `result.mapSearchQueries` are populated. Best-effort and temporary: OpenAI controls which interface it serves and can retire the legacy one at any time, so a request can still come back in the mobile-web shape. Handle both. Defaults to false.
disableWebSearch boolean Do not force ChatGPT's web search. answerline returns the answer ChatGPT gives on its own, which uses web search only when ChatGPT decides to, so `result.sources`, `result.citationPills` and `result.searchQueries` are often empty. Defaults to false: web search is forced on every request.
state string State code for sub-country geo-targeting (e.g., "CA"). Only valid with country "US".

Responses

200 successful ChatGPT monitoring response
400 Bad Request - Validation error
401 Unauthorized - Authentication error
403 Forbidden - Insufficient permissions or credits
404 Not Found - Route not found
409 Conflict - Resource conflict
429 Too Many Requests
499 Client Closed Request - Request was canceled
500 Internal Server Error
502 Bad Gateway - External service error

POST /v1/monitor/gemini · coming soon

Extract structured data from Google Gemini — generated answer text and cited sources for any prompt, with Markdown and HTML export formats

Body

FieldTypeDescription
prompt * string The prompt to send to Gemini
country * string Country/region code for localized response
include object Optional flags for including additional response formats
include.markdown boolean Include markdown-formatted response in the result
include.html boolean Include HTML-formatted response in the result
include.rawResponse boolean Include raw streaming response events
state string State code for sub-country geo-targeting (e.g., "CA"). Only valid with country "US".

Responses

200 successful Gemini monitoring response
400 Bad Request - Validation error
401 Unauthorized - Authentication error
403 Forbidden - Insufficient permissions or credits
404 Not Found - Route not found
409 Conflict - Resource conflict
429 Too Many Requests
499 Client Closed Request - Request was canceled
500 Internal Server Error
502 Bad Gateway - External service error

POST /v1/monitor/grok · coming soon

Extract structured data from Grok — answer text and cited sources, including X/Twitter references — for any prompt across supported regions

Body

FieldTypeDescription
prompt * string The prompt to send to Grok
country * string Country/region code for localized response
include object Optional flags for including additional response formats
include.markdown boolean Include markdown-formatted response in the result
include.html boolean Include HTML-formatted response in the result
include.rawResponse boolean Include raw streaming response events
state string State code for sub-country geo-targeting (e.g., "CA"). Only valid with country "US".

Responses

200 successful Grok monitoring response
400 Bad Request - Validation error
401 Unauthorized - Authentication error
403 Forbidden - Insufficient permissions or credits
404 Not Found - Route not found
409 Conflict - Resource conflict
429 Too Many Requests
499 Client Closed Request - Request was canceled
500 Internal Server Error
502 Bad Gateway - External service error

POST /v1/monitor/google · coming soon

Extract structured data from Google Search including organic results, People Also Ask, related searches, and optional AI Overview

Body

FieldTypeDescription
query string The search query to execute on Google. Required unless you supply 'url' instead — the two are mutually exclusive.
url string A complete Google web search URL to run instead of building the request from 'query' and the targeting fields. Must be an absolute http(s) URL on a Google web search host (google.com, google.co.uk, www.google.de, ...), with the path '/search' and a non-empty 'q'. Mutually exclusive with 'query', 'location', 'uule' and 'pages' — the URL owns those values. answerline applies a fixed set of query parameters — 'q', 'gl', 'hl', 'uule', 'num' (read as result depth), 'start', 'tbs' and 'safe' — and drops anything else. URLs carrying 'tbm' are rejected, because they target a Google vertical with its own endpoint and pricing (use POST /v1/monitor/google/news for tbm=nws).
country string ISO 3166-1 alpha-2 country code for localized search results. Required in the standard request shape. When you supply 'url' instead, country is derived from the URL's 'gl' — pass it explicitly to override that, or when the URL has no 'gl'.
gl string Alternative to `country`, using Google's own parameter name for the result geography. Same ISO 3166-1 alpha-2 codes, accepted in either case (`us` or `US`), and must be a country the endpoint supports — see `GET /v1/countries`. Provide `country` or `gl`; sending both with different values is a `400`.
hl string Interface language, as Google's own `hl` parameter (e.g. `en`, `de`, `pt-BR`). Free-form and case-insensitive — Google owns the list of codes. Overrides the language answerline derives from the country, so the interface language and the result geography can differ.
location string Google canonical location name for geo-targeted results, in comma-separated format: 'City,Region,Country' (see https://developers.google.com/google-ads/api/reference/data/geotargets for all ~100,000 supported locations). Use alongside 'country' for city-level precision. Mutually exclusive with 'uule' — provide one or the other, not both. Cannot be combined with 'url'.
uule string Pre-encoded Google UULE string for precise geo-targeting. Use this when you have a pre-built UULE value instead of a location name. Mutually exclusive with 'location' — provide one or the other, not both. Cannot be combined with 'url'; put 'uule' in the URL's query string instead.
device "desktop" | "mobile" | "ios" | "android" Device the search is run from. 'desktop' returns the desktop SERP; 'ios' (Safari on iPhone), 'android' (Chrome on Android) and 'mobile' (alias for 'android') all return the mobile SERP.
pages integer Number of search results pages to scrape (1-10). Cannot be combined with 'url' — in that shape, depth comes from the URL's 'num' (rounded up to whole pages of 10, capped at 10 pages).
include object Optional flags for including additional response data
include.html boolean Include raw HTML response from Google search
include.aioverview object Include Google AI Overview in the response
include.paaAioverview boolean Hydrate AI-Overview-type People Also Ask items with markdown content and sources. No additional credit cost beyond the +2 AI Overview add-on; each hydrated item adds one scraper fetch (typically 1-2 per page), so responses take longer.
include.googleGoto boolean Ignored since 8th September 2026. Every redirect link now ships as `redirectLink` beside its destination, so both are returned without this flag. Requests still sending it behave as if it were absent.

Responses

200 successful Google monitoring response
400 Bad Request - Invalid parameters
401 Unauthorized - Invalid or missing API key
403 Forbidden - Insufficient credits or access denied
404 Not Found - Route not found
409 Conflict - Resource conflict
429 Too Many Requests
499 Client Closed Request - Request was canceled
500 Internal Server Error
502 Bad Gateway - External service error

POST /v1/monitor/google/goto

Resolve one Google redirect link to its destination URL. Send the `redirectLink` that ships beside every resolved link on a [Google Search](/api-reference/endpoint/monitor-google), [Google News](/api-reference/endpoint/monitor-google-news), or [AI Mode](/api-reference/endpoint/monitor-aimode) response, and the response gives you the URL it points to. Charges no credits, does not use a concurrency slot, and counts against the per-second rate limit like any other call. Each request resolves one link, and Google gets at most 10 seconds to answer.

Body

FieldTypeDescription
url * string The Google redirect link to resolve, as an absolute URL. Must be a `google.com` or `www.google.com` link with a `/goto` or `/url` path — the form shipped as `redirectLink` beside every resolved link on Google Search, Google News, and AI Mode responses.

Responses

200 The destination the redirect link points to
400 Bad Request - The url is missing, malformed, or is not a google.com /goto or /url link
401 Unauthorized - Invalid or missing API key
429 Too Many Requests
500 Internal Server Error
502 Bad Gateway - Google did not answer with a redirect, or the request to Google failed

POST /v1/monitor/google/news · coming soon

Extract structured news articles from Google News including titles, links, snippets, sources, dates, and thumbnails

Body

FieldTypeDescription
query * string The search query to execute on Google News
country string ISO 3166-1 alpha-2 country code for localized news results
gl string Alternative to `country`, using Google's own parameter name for the result geography. Same ISO 3166-1 alpha-2 codes, accepted in either case (`us` or `US`), and must be a country the endpoint supports — see `GET /v1/countries`. Provide `country` or `gl`; sending both with different values is a `400`.
hl string Interface language, as Google's own `hl` parameter (e.g. `en`, `de`, `pt-BR`). Free-form and case-insensitive — Google owns the list of codes. Overrides the language answerline derives from the country, so the interface language and the result geography can differ.
device "desktop" | "mobile" | "ios" | "android" Device the search is run from. 'desktop' returns the desktop news SERP; 'ios' (Safari on iPhone), 'android' (Chrome on Android) and 'mobile' (alias for 'android') all return the mobile news SERP.
pages integer Number of news results pages to scrape (1-10)
include object Optional flags for including additional response data
include.html boolean Include raw HTML response from Google News

Responses

200 successful Google News monitoring response
400 Bad Request - Invalid parameters
401 Unauthorized - Invalid or missing API key
403 Forbidden - Insufficient credits or access denied
404 Not Found - Route not found
409 Conflict - Resource conflict
429 Too Many Requests
499 Client Closed Request - Request was canceled
500 Internal Server Error
502 Bad Gateway - External service error

POST /v1/monitor/copilot · coming soon

Extract structured data from Microsoft Copilot about your brand, products, or any topic across various regions

Body

FieldTypeDescription
prompt * string The prompt to send to Copilot
country * string Country/region code for localized response
include object Optional flags for including additional response formats
include.html boolean Include a URL to the full HTML of the response
include.markdown boolean Include markdown-formatted response in the result
include.rawResponse boolean Include raw streaming response events
state string State code for sub-country geo-targeting (e.g., "CA"). Only valid with country "US".

Responses

200 successful Copilot monitoring response
400 Bad Request - Validation error
401 Unauthorized - Authentication error
403 Forbidden - Insufficient permissions or credits
404 Not Found - Route not found
409 Conflict - Resource conflict
429 Too Many Requests
499 Client Closed Request - Request was canceled
500 Internal Server Error
502 Bad Gateway - External service error

POST /v1/monitor/perplexity · coming soon

Extract structured data from Perplexity AI about your brand, products, or any topic across various regions

Body

FieldTypeDescription
prompt * string The prompt to send to Perplexity
country * string Country/region code for localized response
include object Optional flags for including additional response formats
include.html boolean Include a URL to the full HTML of the response
include.markdown boolean Include markdown-formatted response in the result
include.rawResponse boolean Include raw streaming response events
state string State code for sub-country geo-targeting (e.g., "CA"). Only valid with country "US".

Responses

200 successful Perplexity monitoring response
400 Bad Request - Validation error
401 Unauthorized - Authentication error
403 Forbidden - Insufficient permissions or credits
404 Not Found - Route not found
409 Conflict - Resource conflict
429 Too Many Requests
499 Client Closed Request - Request was canceled
500 Internal Server Error
502 Bad Gateway - External service error

POST /v1/monitor/aimode · coming soon

Extract structured data from AI Mode about your brand, products, or any topic across various regions

Body

FieldTypeDescription
prompt * string The prompt to send to AI Mode
country string Country/region code for localized response
gl string Alternative to `country`, using Google's own parameter name for the result geography. Same ISO 3166-1 alpha-2 codes, accepted in either case (`us` or `US`), and must be a country the endpoint supports — see `GET /v1/countries`. Provide `country` or `gl`; sending both with different values is a `400`.
hl string Interface language, as Google's own `hl` parameter (e.g. `en`, `de`, `pt-BR`). Free-form and case-insensitive — Google owns the list of codes. Overrides the language answerline derives from the country, so the interface language and the result geography can differ.
location string Google canonical location name for geo-targeted results, in comma-separated format: 'City,Region,Country' (see https://developers.google.com/google-ads/api/reference/data/geotargets for all ~100,000 supported locations). Use alongside 'country' for city-level precision. Mutually exclusive with 'uule' — provide one or the other, not both.
uule string Pre-encoded Google UULE string for precise geo-targeting. Use this when you have a pre-built UULE value instead of a location name. Mutually exclusive with 'location' — provide one or the other, not both.
device "desktop" | "mobile" Device type for search results
include object Optional flags for including additional response formats
include.html boolean Include a URL to the full HTML of the response
include.markdown boolean Include markdown-formatted response in the result
include.expandProducts boolean Fetch merchant offers for the product clusters in the response and return them as 'result.productResults'. Clusters are deduplicated across shopping cards and inline products, and expansion covers at most 6 per scrape. Charges +1 credit per cluster returned, to a maximum of +6. Off by default.
include.googleGoto boolean Ignored since 8th September 2026. Every redirect link now ships as `redirectLink` beside its destination, so both are returned without this flag. Requests still sending it behave as if it were absent.

Responses

200 successful AI Mode monitoring response
400 Bad Request - Validation error
401 Unauthorized - Authentication error
403 Forbidden - Insufficient permissions or credits
404 Not Found - Route not found
409 Conflict - Resource conflict
429 Too Many Requests
499 Client Closed Request - Request was canceled
500 Internal Server Error
502 Bad Gateway - External service error

GET /v1/countries

Returns a list of all supported ISO 3166-1 alpha-2 country codes. Can be filtered by model to get countries available for specific AI providers.

ParameterInTypeDescription
model query "aimode" | "aioverview" | "chatgpt" | "copilot" | "gemini" | "google" | "grok" | "perplexity" Filter countries available for a specific model

Responses

200 List of supported country codes
400 Bad Request - Invalid model parameter
401 Unauthorized - Authentication error
404 Not Found - Route not found
429 Too Many Requests - API key rate limit exceeded
500 Internal Server Error

POST /v1/async/task

Submit an asynchronous task for background processing. Returns a task ID that you can use to poll for results or receive via webhook.

Body

FieldTypeDescription
taskType * "AIMODE" | "GOOGLE" | "GOOGLE_NEWS" | "GEMINI" | "CHATGPT" | "COPILOT" | "PERPLEXITY" | "GROK" The AI provider to use for this task.
payload * object Provider-specific request payload. Must include at least `prompt` (or `query` for Google Search).
priority integer Task priority level (1-10). Higher numbers are processed first. Defaults to 1.
idempotencyKey string Unique string to prevent duplicate task creation. Must be unique across your account.
webhook object Webhook configuration for task completion notification.
webhook.url * string URL to receive the webhook POST request when the task completes.

Responses

200 Task created successfully. Returns task ID and initial status.
401 Unauthorized - Authentication error
403 Forbidden - Insufficient permissions, or the credit balance does not cover this task's cost
409 Conflict - Task with this idempotencyKey already exists
422 Validation Error - Invalid request body
429 Queue Limit Exceeded - Organization has reached maximum queued tasks
500 Internal Server Error

POST /v1/async/task/batch

Submit up to 500 async tasks in one request. Each task is validated independently, so one invalid task does not block the rest. Returns per-task results.

Responses

200 Batch processed. Check the summary and individual results for per-task success or failure.
401 Unauthorized - Authentication error
422 Validation Error - Request body is not a valid array or is empty
429 Queue Limit Exceeded - The entire batch is rejected because it would exceed your organization's queue capacity
500 Internal Server Error

GET /v1/async/task/{taskId}

Poll the status and result of an asynchronous task by ID. Returns the task state and, once complete, the full structured result payload.

ParameterInTypeDescription
taskId * path string The ID of the task to fetch.

Responses

200 Successful response with the task status and result if completed.
401 Unauthorized - Authentication error
404 Not Found - Task not found
429 Too Many Requests - API key rate limit exceeded
500 Internal Server Error

GET /v1/async/status

Get organization-wide async queue metrics including queued and processing task counts, and concurrency usage.

Responses

200 Successful response with queue metrics.
401 Unauthorized - Authentication error
429 Too Many Requests - API key rate limit exceeded
500 Internal Server Error

DELETE /v1/async/queue

Deletes every task still in the `QUEUED` state for the authenticated organization, letting you drain a pending backlog in one call instead of opening a support request. Tasks that are already `PROCESSING` are in-flight on a worker and are left untouched, as are `COMPLETED` and `FAILED` tasks. Queued tasks have not been charged, so clearing them does not affect your credit balance. The call is safe to repeat — if the queue is already empty it simply returns `cleared: 0`.

Responses

200 Queue cleared. Returns the number of queued tasks that were removed.
401 Unauthorized - Authentication error
429 Too Many Requests - API key rate limit exceeded
500 Internal Server Error

GET /v1/credits

Read your organization's current credit balance and billing cycle. Lets you observe your balance programmatically — including from async-only workloads — without making a sync /v1/monitor/* request just to inspect the X-Credits-Remaining header. The authoritative check is enforced when each task is charged.

Responses

200 Current credit balance and billing cycle.
401 Unauthorized - Authentication error
429 Too Many Requests - API key rate limit exceeded
500 Internal Server Error

GET /v1/states

Returns a list of US states supported for state-level geo-targeting. Only US is currently supported — other country values return an empty array.

ParameterInTypeDescription
country * query string ISO 3166-1 alpha-2 country code. Only "US" returns results.

Responses

200 List of supported states
400 Bad Request — missing or invalid country parameter
401 Unauthorized - Authentication error
429 Too Many Requests - API key rate limit exceeded
500 Internal Server Error