LLM Response
Query ChatGPT, Claude, Gemini, or Perplexity individually and get their structured response. See exactly what each AI says when asked about your business or keywords.
When to use this
You want to ask ChatGPT "who is the best plumber in Austin" and see the actual answer — then do the same with Claude, Gemini, and Perplexity. Compare how each AI talks about your business.
/v1/ai/llm-responseParameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| prompt | string | Yes | The prompt to send to the LLM (max 500 chars) |
| platform | string | Yes | "chat_gpt", "claude", "gemini", or "perplexity" |
| web_search | boolean | No | Let the model search the web before answering, so it can cite sources. Without it, ChatGPT, Claude and Gemini answer from training data and usually return no sources on local-business questions — and can state confidently that an open business has closed. Not accepted on perplexity, whose models always search. Changes the price: 24 credits on chat_gpt, 27 on gemini, 40 on claude, priced from what searching actually costs us. |
| force_web_search | boolean | No | Require the search rather than leaving it to the model's judgement. Requires web_search: true. Accepted on claude, and on chat_gpt for non-GPT-5 models only. Not available on gemini or perplexity, where a search can be permitted but never compelled. In our testing it changed which sources came back more than what the answer said. |
| search_country | string | No | ISO 3166-1 alpha-2 country to search from, e.g. "US". Accepted on chat_gpt, claude and perplexity; not on gemini. |
| search_city | string | No | City to search from, e.g. "Wichita" — grounds the search where your customer actually is. Accepted on chat_gpt and claude only. |
| fresh | boolean | No | Bypass the cached answer and run the request again. Always billed; the response reports cached: false. Use when sampling the same prompt to measure how the answer varies. |
| model | string | No | Pin a specific model (e.g. "gpt-4o", "claude-sonnet-5", "claude-opus-5", "gemini-2.5-flash", "sonar"). Defaults to the newest standard-tier model we support for the platform, at 8 credits — leave it unset unless you need a fixed model for reproducibility, or want a top-end one. Pinning changes the price: standard-tier models cost 8 credits, premium (Opus-class) 20, frontier (Fable-class) 40. A model we don't recognise is billed at the frontier rate. An unsupported value returns a 400 listing the models the platform currently accepts, and the model actually used is always echoed back in the response's model field. |
Example Request
curl -X POST https://api.localseodata.com/v1/ai/llm-response \
-H "Authorization: Bearer sk_live_your_key" \
-H "Content-Type: application/json" \
-d '{
"prompt": "Who is the best plumber in Austin, Texas?",
"platform": "chat_gpt"
}'Example Response
{
"status": "success",
"credits_used": 8,
"data": {
"platform": "chat_gpt",
"prompt": "Who is the best plumber in Austin, Texas?",
"response_text": "Based on reviews and ratings, some of the best plumbers in Austin include ABC Plumbing (4.9 stars, 500+ reviews), Radiant Plumbing (4.8 stars), and Stan's Heating & AC (4.7 stars)...",
"model": "gpt-4.1-mini-2025-04-14",
"sources": [
{ "url": "https://yelp.com/...", "title": "Best Plumbers in Austin", "domain": "yelp.com", "position": 1 },
{ "url": "https://abcplumbing.com", "title": "ABC Plumbing Austin", "domain": "abcplumbing.com", "position": 2 }
],
"fan_out_queries": [
"best plumber austin reviews",
"emergency plumber austin tx",
"cheapest plumber in austin"
]
}
}Response Fields
| Field | Type | Description |
|---|---|---|
| response_text | string | The full response from the LLM |
| model | string | Which model version was used (e.g. gpt-4.1-mini-2025-04-14) |
| web_search_used | boolean | Whether the model actually searched the web, as reported by the platform. Requesting a search does not guarantee one ran — on gemini in particular the model can decline — so check this before reading an empty sources array as a finding. |
| sources | array | Pages the LLM cited, deduplicated ({url, title, domain, position}). position is the order the model cited them, starting at 1, counted after duplicate pages are collapsed. domain is resolved from the URL and reported without a www prefix, so it groups cleanly across endpoints. On Gemini, url is a Google grounding redirect rather than a direct link — it resolves to the cited page when followed, and domain is the real source either way. |
| fan_out_queries | array | Follow-up queries the LLM suggested |
Notes
- Query each LLM individually to see how they recommend (or ignore) your business.
- fan_out_queries show what users commonly ask next — use these for content planning.
- sources come from the citations a model attaches when it searches the web, so how full this array is depends on the platform. perplexity searches as part of answering, so sources are populated on essentially every call. chat_gpt, claude and gemini answer from training data unless the question makes them reach for the web — on local business prompts they usually don't, so expect sources to be empty there. That is the model's behaviour, not a gap in the response.
- On gemini, domain is the registrable domain and never the subdomain. Google's grounding data returns a redirect URL plus a title carrying the bare domain, and the subdomain is not transmitted at all — a client hosted at orangecounty.example.com is reported as example.com. Match on the registrable domain when you track a client whose site lives on a subdomain, or those citations will not match. chat_gpt, claude and perplexity return the full hostname, as does /v1/ai/scraper on gemini.
- Web search support differs by platform, and asking for something a platform does not offer returns a 400 saying what it does. claude takes all four search parameters. chat_gpt takes all four, except that GPT-5 models drop force_web_search. gemini takes web_search only — a search can be permitted but never compelled, and cannot be geographically scoped. perplexity takes search_country only and cannot be switched off.
- perplexity is the value option for citation work. Its models search on every call at no extra charge, and in our testing it returned 19 citations across 10 distinct domains for one local query — more sources and more diverse ones than a search-enabled claude call that cost eight times as much. If you are measuring which domains get cited, start there.
- If you want citations for ChatGPT or Gemini without paying the search price, /v1/ai/scraper returns a sources array for those two platforms at 4 credits, less than this endpoint costs.
- We send your prompt and the model name, and leave sampling settings at each platform's own defaults — which differ between platforms, and are not all low. The same prompt therefore returns different wording run to run, by a different amount on each platform. If you track whether a brand gets mentioned over time, expect day-to-day movement that reflects sampling rather than any change in what the model thinks, and note that comparing one platform's trend against another's is affected by this too. Repeat a prompt a few times on day one to see how much movement is normal for the platforms you track, before reading a single day's change as a signal.
- Supports: chat_gpt, claude, gemini, perplexity. Run all 4 to see the full picture.