APIEndpoint 23 of 40AI Optimization / LLM Research / Prompt Testing

AI LLM Response API

Query any LLM and get the raw, untransformed response.

ChatGPT, Claude, Gemini, and Perplexity each see your business differently. Sometimes you need the literal output — the full text an LLM generates for a specific prompt — to understand how it thinks about you. Not metrics, not mentions, not aggregations. Just the raw response. Your agent asks one question four ways (ChatGPT, Claude, Gemini, Perplexity) and gets back exactly what each LLM says. 8 credits ($0.04) per response — no session costs, no subscription.

POST /v1/ai/llm-response · 8 credits / call

POST /v1/ai/llm-response~3s · 1 credit
Claude · raw response"who are the best plumbers in austin?"

Based on Google reviews and local rankings, the highest-rated plumbers in Austin include ABC Plumbing (4.8 / 542 reviews), Roto-Rooter, and Mr. Rooter. Same-day service is offered by several providers.

Cited sources

ABC Plumbing — Austin, TXabcplumbing.com
Top 10 Plumbers in Austinyelp.com
Austin's Best-Rated Plumbershomeadvisor.com
▌ Ask your agent

These prompts are the new LLM research workflow.

Connect Local SEO Data as an MCP server once (60 seconds, below). Then your agent queries LLMs for you. Replace bracketed queries with your own.

Cross-LLM business perception

Ask ChatGPT, Claude, Gemini, and Perplexity: 'Who is the best plumber in Austin, Texas?' Show me the exact text each AI returns and tell me which ones mention [mycompany.com] and which ones don't.

Competitive framing analysis

Query all four LLMs with: 'What are the differences between [mycompany.com] and [competitor.com]?' Extract verbatim how each AI compares us. Which LLM frames us most favorably?

Prompt engineering testing

Test the same question across ChatGPT, Claude, Gemini, and Perplexity to see which LLM gives the most useful answer for [your use case]. Show me the raw responses so I can decide which LLM to use for production.

Citation and source tracking

Ask ChatGPT and Claude: 'Where should I find [service type] near me in [location]?' Show me the exact sources each LLM cites. What high-authority sites do these LLMs trust for my industry?

Real response

What you get back

Live response from POST /v1/ai/llm-response for a plumbing query across ChatGPT and Claude.

response · application/json~8-12s · 8 credits per response
{
  "status": "success",
  "credits_used": 8,
  "data": {
    "platform": "chat_gpt",
    "prompt": "Who is the best plumber in Austin, Texas?",
    "response_text": "Some highly-rated plumbers in Austin, Texas include: ABC Plumbing (4.9 stars, 680 reviews on Google) — known for 24/7 emergency service and same-day availability. ProFlow Services (4.8 stars, 420 reviews) specializes in water heater and drain repairs with competitive pricing. Stan's Plumbing & HVAC (4.7 stars, 310 reviews) has been in business since 1995 and serves the greater Austin metro area. For emergency situations, ABC Plumbing is often recommended first due to their rapid response time. All three are licensed and insured.",
    "model": "gpt-4.1-mini-2025-04-14",
    "sources": [
      { "url": "https://www.google.com/maps/search/plumbers+austin", "title": "Google Maps - Plumbers Austin", "domain": "google.com" },
      { "url": "https://www.yelp.com/search?find_desc=plumbers&find_loc=Austin%2C+TX", "title": "Yelp - Plumbers in Austin", "domain": "yelp.com" },
      { "url": "https://abcplumbing.com", "title": "ABC Plumbing Austin", "domain": "abcplumbing.com" }
    ],
    "fan_out_queries": [
      "best emergency plumber austin",
      "plumber austin reviews",
      "cheapest plumber austin tx",
      "plumber austin same day service"
    ]
  }
}
Returns

Raw output for research, testing, and competitive analysis

Full response text

The complete, untransformed LLM answer

response_text is the full text an LLM generated for your prompt. Not a summary, not parsed data, not a snippet — the entire response. This is what the LLM actually wrote. Use this for prompt engineering, competitive framing analysis, and understanding how each AI 'thinks' about your business.

Model identification

Which model version responded

model field shows which LLM version generated the response (e.g. gpt-4.1-mini-2025-04-14, claude-sonnet-4-20250514, gemini-2.5-flash). Model versions change — knowing which version gave which answer is critical for reproducibility and A/B testing.

Citation sources

URLs the LLM cited in its response

sources array contains every URL the LLM referenced when writing its response. These are the authorities each LLM trusts for your industry — direct link-building targets. Source citations vary by LLM — Claude cites more thoroughly than ChatGPT; Perplexity cites real-time sources ChatGPT can't access.

Follow-up suggestions

Natural next questions for the user

fan_out_queries are follow-up questions the LLM suggests based on the response. These reveal what the LLM thinks users would ask next — invaluable for content strategy and understanding user intent through the LLM's eyes.

Built for

What AI-native operators ship with this

Prompt engineering and testing

Before deploying a prompt to production, test it against all four LLMs. See which phrasing gets the best response from ChatGPT vs Claude. Which LLM understands your intent most accurately. Then lock in the best performer.

For prompt engineers

Competitive positioning research

Ask each LLM how they compare you vs competitors. Extract the verbatim framing from ChatGPT, Claude, Gemini, and Perplexity. Understand the competitive narrative each LLM has learned. Identify gaps in how you're positioned and what content closes them.

For agencies

Citation audits and link research

Extract every source URL each LLM cited when answering your keyword. ChatGPT and Claude cite different authorities. Gemini and Perplexity cite even more. Aggregate all sources across all LLMs to build your link-building target list — these are the high-authority sites LLMs trust.

AI Top Sources API

Content gap analysis

Run the same prompt against all four LLMs. Which topics does ChatGPT mention that Claude doesn't? Which sources does Gemini cite that no other LLM references? Close content gaps by addressing the topics and viewpoints LLMs expect.

For content teams
vs. the alternatives

Why not just ask ChatGPT directly?

Testing LLMs manually across ChatGPT, Claude, Gemini, and Perplexity is slow and unrepeatable — you can't automate it, you can't track changes, and you can't run 100 different prompts across 4 LLMs at scale. Competitors either charge per-token-used or lock you into dashboards. We charge $0.04 per response — unlimited prompts, all four LLMs, structured JSON output, agent-ready. Here's how the options stack up.

ApproachCost per responseLLMs testedOutput formatAgent-ready
Manual testing (ChatGPT web, Claude web, Gemini web)$0 but ~5 min per promptWhatever you test manuallyCopy-paste textNo
OpenAI API direct$0.0005–0.003 per 1k tokensChatGPT onlyToken-based, raw textREST only
Anthropic Claude API direct$0.003–0.030 per 1k tokensClaude onlyToken-based, raw textREST only
Google Gemini API direct$0.075–0.30 per 1k tokensGemini onlyToken-based, raw textREST only
Profound AI research$499–2000/mo (~$16–65 per prompt)10+ platformsDashboard aggregationDashboard-first
Anthropic Batch API$0.0001–0.001 per 1k tokens (50% discount)Claude onlyToken-basedAsync REST
Local SEO Data AI LLM Response API$0.04 per responseChatGPT, Claude, Gemini, PerplexityStructured JSON + raw responseNative MCP, agent-first
Connect in 60 seconds

Use it from your agent

Two integration surfaces: MCP for clients that speak MCP, REST API for everything else.

Direct MCP integration

Drop-in support in Claude Desktop, OpenClaw, Hermes Agent, and any MCP-aware client.

Add to your client's MCP config (e.g. claude_desktop_config.json):

{
  "mcpServers": {
    "localseodata": {
      "url": "https://mcp.localseodata.com",
      "headers": {
        "Authorization": "Bearer sk_live_..."
      }
    }
  }
}

REST API

For Perplexity Computer, ChatGPT Custom GPTs, custom agents, and any platform that calls REST endpoints directly.

Base URL:

api.localseodata.com

See the docs for endpoint reference and auth.

Quickstart

Your first call in three lines

Core parameters: `prompt` (the question or instruction, max 2000 characters) and `platform` (chat_gpt, claude, gemini, or perplexity). One call returns the full response text, model version, cited sources, and follow-up query suggestions. Each response costs 8 credits (~$0.04).

terminal · curl
POST /v1/ai/llm-response
curl -X POST https://api.localseodata.com/v1/ai/llm-response \
  -H "Authorization: Bearer sk_live_..." \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "Who is the best plumber in Austin, Texas?",
    "platform": "chat_gpt"
  }'
Pricing for this endpoint

$0.04 per LLM response

Pay-as-you-go starts at $5. No monthly minimums. No subscription required. Funds never expire.

Free tier
50
credits on signup (6 responses)
Starter · $5
125
credits, no expiration
Per-call cost
$0.04
per LLM response
FAQ

Common questions

What is the AI LLM Response API?+
A REST endpoint that returns the raw, complete response from ChatGPT, Claude, Gemini, or Perplexity for any prompt you provide. You send a question, you get back exactly what the LLM said — the full text, the model version, the sources it cited, and follow-up queries it suggests. One call costs 8 credits (~$0.04). This is different from mention tracking, visibility scoring, or SERP analysis — you're getting the literal LLM output for research, prompt engineering, competitive analysis, and content planning.
Why would I need the raw LLM response?+
Four reasons. First, prompt engineering: test the same prompt across ChatGPT, Claude, Gemini, and Perplexity to see which LLM understands your intent best and which phrasing gets the most useful response. Second, competitive positioning: ask each LLM the same question and see how they frame your business vs competitors — the verbatim text reveals the narrative each LLM has learned. Third, citation research: extract every source each LLM cites when answering your keyword — these are link-building targets. Fourth, content gaps: identify topics and sources LLMs mention that your website doesn't address. The raw response is the primary source for all downstream analysis.
How is this different from OpenAI, Anthropic, or Google API direct?+
When you call OpenAI API, Anthropic API, or Google Gemini API directly, you pay per token: ChatGPT costs $0.0005–0.003 per 1k tokens, Claude costs $0.003–0.030, Gemini costs $0.075–0.30. Token costs are hard to predict — a short prompt might use 50 tokens, a long one 2,000. We charge a flat $0.04 per response across all four LLMs, no token counting, no surprise costs. More important: our API handles all four LLMs in one interface with unified output. You don't need to maintain API keys for OpenAI, Anthropic, Google, and Perplexity separately — we handle upstream integration. For one-off testing or small-scale research, direct APIs make sense. For agents that need to query multiple LLMs repeatedly, our flat-rate unified API saves time and money.
Which LLMs do you support?+
ChatGPT (OpenAI), Claude (Anthropic), Gemini (Google), and Perplexity (Perplexity AI). These are the four major LLMs driving real user queries in 2026. Perplexity is included because it operates differently from the others — it runs real-time web search and can answer questions about current events the other LLMs can't. If you need coverage of Grok, DeepSeek, Copilot, or other models, let us know.
Can I test the same prompt across all four LLMs?+
Yes, but you make four separate API calls (one per platform), each costing 8 credits. So testing one prompt across all four costs $0.16 total. Most operators do this for high-value research questions — 'how do all four LLMs compare us to competitors?' or 'which LLM gives the best citation sources for link building?' For that level of analysis, $0.16 per competitive question is trivial. If you're doing bulk prompt testing, batch calls and store responses locally so you don't double-hit the API.
What data does the API return?+
For each response you get: (1) response_text — the full, untruncated text the LLM generated, (2) model — which version of the LLM responded (e.g., gpt-4.1-mini-2025-04-14, claude-sonnet-4-20250514), (3) sources — every URL the LLM cited when writing its response, with titles and domains, (4) fan_out_queries — follow-up questions the LLM suggests users would ask next based on the response. Response text can be 500–2,000+ characters depending on the prompt. Model versions change over time; knowing which version gave which answer is critical for reproducibility.
Where do you get these LLM responses from?+
We execute your prompt directly against each LLM's API at call time. ChatGPT responses come from OpenAI's API, Claude from Anthropic's API, Gemini from Google's API, and Perplexity from their API. This is first-party data execution — no caching, no replay, no aggregation from third parties. Your prompt goes live to the LLM at that moment. This is why you get current model versions, real sources, and up-to-date responses. We're transparent about upstream because if you're running client work, you should trust the data source.
How fresh is the LLM response?+
Each API call executes your prompt live against the LLM at that moment. The response reflects the current state of each model. LLM responses can vary between calls due to sampling and training data — exact text is not guaranteed identical across seconds. For competitive tracking and content planning, most operators run monthly snapshots (enough to spot trends) or weekly for high-value competitive keywords. For prompt engineering, you run as-needed to test variations.
Can I use this for competitive analysis?+
Yes, and this is one of the main use cases. You can ask each LLM: 'How does [mycompany.com] compare to [competitor.com]?' and see the verbatim competitive framing from ChatGPT, Claude, Gemini, and Perplexity. You'll see exactly which LLM favors you, which favors the competitor, and how each positions the comparison. There's no ownership requirement — the API accepts any prompt. This is how you understand the competitive narrative each LLM has learned.
How does this compare to Profound or dashboard-based LLM testing platforms?+
Profound ($499–$2000/mo) is an enterprise platform that aggregates LLM research into dashboards. It's designed for large teams logging in and reading reports. Our API is designed for agents and programmatic workflows — your code calls this endpoint, gets JSON, and acts on it. Cost-wise: Profound annualizes to $16–65 per prompt tested; we charge a flat $0.04. If you need 10 prompt tests per month, we cost $0.40 total; Profound costs $500+. If you need a CEO dashboard, Profound is the fit. If you're building agent workflows or doing bulk research, API pricing wins.
Can AI agents use this API?+
Yes, this is exactly what we built for. Two paths. MCP: add Local SEO Data to your claude_desktop_config.json and your Claude agent calls this endpoint from any prompt without integration code. REST: any agent with HTTP capability (ChatGPT Custom GPTs, Perplexity Computer, custom Python agents) hits the API directly with a Bearer token. The agent receives structured JSON and can compare responses, flag competitive positioning gaps, extract citations, or trigger alerts based on LLM behavior.
How does this relate to AI Mentions, AI Visibility, and other AI APIs?+
Different endpoints for different workflows. AI Visibility (/v1/ai/visibility) measures composite score across multiple LLMs — how visible you are overall. AI Mentions (/v1/ai/mentions) finds every instance of your brand mentioned in LLM responses. AI LLM Response (/v1/ai/llm-response) returns the raw, full response text from one query to one LLM — the primary data source. Most teams use all three: LLM Response for deep research and prompt testing, AI Mentions for brand monitoring, AI Visibility for weekly dashboards. Start with LLM Response when you need the literal output.
What changed in 2026 that made LLM response APIs necessary?+
Three things. First, LLMs became diverse — ChatGPT, Claude, Gemini, and Perplexity each have different training data and ranking behavior, so the same question gets different answers. Understanding those differences requires direct response comparison. Second, prompt engineering became critical — optimizing how you phrase a question matters, and the only way to test phrasing is to see the actual output. Third, MCP (Model Context Protocol) became standard, making it practical for agents to call specialized APIs without custom integration code. The dashboard era was built for humans reading reports. The agent era needs APIs that return raw data. LLM Response is a 2026 native category because understanding how different LLMs perceive your business requires programmatic access to their actual output.
Can I track LLM responses over time?+
Yes. Store JSON responses in a database or version-control system, then run periodic queries (daily, weekly, monthly) against the same prompts. Compare model versions, response length, cited sources, and sentiment changes over time. Your agent can do this automatically — query weekly, check for diffs, alert on material changes (new competitors appearing, sources dropping, model version changing). Because we're API-first, you own the snapshots and can build any analysis on top of them.
What if an LLM doesn't cite my business in its response?+
That's the insight. If you ask ChatGPT 'best plumber Austin' and your company doesn't appear, you have quantified proof that the LLM doesn't rank you for that query. You can then decide: is your content missing the right keywords? Are you not linked from enough high-authority sites ChatGPT trusts? Is your Google Business Profile incomplete? The raw response tells you where you stand with each LLM and gives you direction for optimization.
What does this cost compared to manual testing?+
Manual testing costs $0 in API fees but ~5 minutes of labor per prompt per LLM. Testing one prompt across four LLMs manually costs 20 minutes of time. Our API costs $0.16 (four calls × $0.04) and takes <1 second. For one-off research, manual is fine. For 100 prompt variations tested across 4 LLMs (400 total calls), manual costs 1,333 minutes (~22 hours of labor); our API costs $16. For any volume beyond 10 prompts, API pays for itself.

Get raw LLM responses for research, testing, and competitive analysis.

50 free credits on signup. Your first LLM query happens through your agent, not curl. Compare ChatGPT, Claude, Gemini, and Perplexity responses side by side.

▌ MADE FOR THE NEW LOCAL SEO STACK