Quickstart
Find AI-cited sources with JavaScript
Send a query to the Getspotted API from JavaScript and get back the sources AI engines (ChatGPT, Claude, Perplexity, Gemini) and Google cite for it, per country. Authenticate with Authorization: Bearer gsp_live_…
Call the API
javascript
const res = await fetch("https://getspotted.ai/api/v1/search", {
method: "POST",
headers: {
authorization: "Bearer gsp_live_…",
"content-type": "application/json",
},
body: JSON.stringify({ query: "best CRM for B2B SaaS", country: "US" }),
});
const { data } = await res.json();
console.log(data.sources); // cited sources, scored, per engineEach search costs 10 credits. The response shape is { success, data: { sources, hotspots, enginesQueried } } — every source lists the engines that cited it and its per-engine position.