Collect a live ChatGPT or Gemini web answer · GEO API
Execute one custom prompt against the ChatGPT or Gemini web interface. Returns answer evidence, cited sources, and separate brand-name/domain observations. This is a single unpersonalized sample; repeated runs may differ. 30 credits ($0.03) per successful response, including no-answer results. Credits are reserved before collection; errors are not charged. May take up to 120 seconds. Gemini does not support force_web_search. Use a client timeout of at least 150 seconds. No conversation history or recommendation rank is inferred.
Using ChatGPT, Claude Code or another client? See the setup steps
curl -X POST https://api.unifapi.com/geo/answers \ -H "Authorization: Bearer $UNIFAPI_KEY" \ -H "Content-Type: application/json"
Parameters
- X-Unifapi-Max-Creditsheader
- Optional maximum credit budget for this request. The gateway validates the required reservation before collection and rejects a lower cap without charging. Unused reserved credits are released after settlement. Omit to use your available balance.
- The parameter for this GEO operation. Use the URL-visible slug or id described in the docs.
- The parameter for this GEO operation. Use the URL-visible slug or id described in the docs.
This operation is part of the GEO API in the generative engine optimization category. It uses the same Bearer token, request tracing, error model, and billing envelope as every UnifAPI endpoint, so agents can switch between platforms without custom per-vendor glue code.
Use it when a workflow needs GEO public data but should still keep one API key, one account balance, and one predictable JSON contract across social, live public-data sources.
Common agent workflows
- Fetch canonical public GEO content for summarization, ranking, monitoring, or enrichment.
- Attach engagement, author, media, and source metadata to an agent workflow.
- Give an AI agent a stable GEO data source without building a per-platform integration.
- Normalize GEO responses into the same UnifAPI envelope used across the catalog.
Unified envelope, platform-native fields
- Lookup responses return one canonical object in `data` with stable identifiers, source URLs where available, and platform-specific metadata normalized into predictable JSON.
- The `billing.records_charged` field reports the charged billable-record quantity for the successful response.
- A not-found or invalid-input condition uses the unified UnifAPI error shape, so callers do not need special handling for each source platform.
Response status codes
Billing
This operation charges 30 credits per billable record, with a 30 credits ($0.03) operation minimum. Public responses include billing metadata with credits charged, records charged, and remaining workspace balance. Incorrect Credit deductions caused by platform failures can be restored as billing corrections.
Errors and retries
Authentication, validation, rate-limit, not-found, and provider errors use the unified UnifAPI error format. Agents should log `request_id`, retry only retryable failures, and treat invalid API keys, disabled keys, and expired keys as the same public `unauthorized` error type.
Fields in the data object
A successful Collect a live ChatGPT or Gemini web answer call returns one data object with these fields (12 of 17 shown — the docs list the full schema).
- enginestring
- surfacestring
- measurementstring
- promptstring
- locationstring
- languagestring
- search_modestring
- modelstring | null
- Model reported by the answer interface, or null when unavailable.
- observed_atstring | null
- statusstring
- answerstring | null
- sourcesobject[]
- Sources cited or relied on in the final answer. Retrieved search results are excluded.
Agents & Skills built on GEO
You rarely call Collect a live ChatGPT or Gemini web answer by hand. These prebuilt agents and skills already read GEO data inside Claude or Codex — start from one of them, or call this endpoint yourself.
Try it free in the browser
Agents
More GEO operations
Combine endpoints from the same platform, then join the results with other UnifAPI categories without changing authentication or response parsing.
Search AI Mode generative results
Run one live AI Mode search for generative answer evidence, cited sources, and target-domain visibility.
Get AI search volume for keywords
Look up generative-AI search volume and monthly trend for up to 1000 keywords in a location and language.
Aggregate LLM mention metrics by dimension
Aggregate LLM mentions of a domain or keyword across platform, location, language, source/search-result domains, and brand entities.
Compare LLM mentions across labeled groups
Aggregate and compare LLM mention metrics across several labeled target groups for side-by-side share-of-voice analysis.
Get monthly AI mention history
Return a monthly time series of AI mention counts and estimated AI search volume for a keyword or domain, from the indexed corpus for Google AI Overviews or US-English ChatGPT. This is not a replay of your custom prompt panel. Corpus coverage can change; estimated AI search volume is not observed traffic. Date windows start on 2025-08-01 and span at most 366 days. Monthly history costs a minimum of 500 credits ($0.50). The maximum credits are reserved before collection; unused credits are released. Failed requests are not charged. Allow at least 150 seconds for the response.
List domains most cited in LLM answers
Rank the domains most frequently cited as sources in LLM answers for a target domain or keyword, with per-dimension breakdowns.