# The AI citation API

Getspotted is the AI citation API for GEO (generative engine optimization): it returns the sources ChatGPT, Claude, Perplexity, Gemini and Google cite for any query, per country, scored with per-engine positions, plus the contacts behind them. Authenticate, send a query, get cited sources back. Every search covers all six engines and costs 10 credits.

## 1. Get an API key

Create a key in your dashboard under Developers → API keys. The secret is shown once, so store it safely. Send it on every request as `Authorization: Bearer gsp_live_…`.

## 2. Make your first call

```bash
curl -X POST https://getspotted.ai/api/v1/search \
  -H "authorization: Bearer gsp_live_…" \
  -H "content-type: application/json" \
  -d '{"query":"best CRM for B2B SaaS","country":"US"}'
```

You get back a list of cited `sources`, each with the engines that cited it, its per-engine position, and a cross-engine score. The strongest cross-engine sources are also surfaced as `hotspots`.

## 3. Pick your language

- [cURL Quickstart](/content/docs/quickstart/curl/index.html)
- [JavaScript Quickstart](/content/docs/quickstart/javascript/index.html)
- [Next.js Quickstart](/content/docs/quickstart/nextjs/index.html)
- [Python Quickstart](/content/docs/quickstart/python/index.html)
- [Go Quickstart](/content/docs/quickstart/go/index.html)
- [Ruby Quickstart](/content/docs/quickstart/ruby/index.html)
- [PHP Quickstart](/content/docs/quickstart/php/index.html)
- [Java Quickstart](/content/docs/quickstart/java/index.html)
- [Rust Quickstart](/content/docs/quickstart/rust/index.html)

## Use it from an AI agent

Connect the remote MCP server in one step and your agent (Claude Code, Cursor, Codex…) can call `find_ai_sources` and `get_source_contacts` directly.

```
MCP endpoint:  https://getspotted.ai/api/mcp
Auth header:   Authorization: Bearer gsp_live_…
```

## Explore the docs

- [API reference Every endpoint, parameter and response.](/content/docs/api-reference/index.html)
- [Integrations Use Getspotted from no-code and AI tools.](/content/docs/integrations/index.html)
- [Examples Copy-paste recipes for common jobs.](/content/docs/examples/index.html)
