Quickstart
Find AI-cited sources with Ruby
Send a query to the Getspotted API from Ruby 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
ruby
require "net/http"
require "json"
uri = URI("https://getspotted.ai/api/v1/search")
res = Net::HTTP.post(
uri,
{ query: "best CRM for B2B SaaS", country: "US" }.to_json,
"Authorization" => "Bearer gsp_live_…",
"Content-Type" => "application/json",
)
puts JSON.parse(res.body)["data"]["sources"]Each 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.