Quickstart

Find AI-cited sources with PHP

Send a query to the Getspotted API from PHP 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

php
$ch = curl_init("https://getspotted.ai/api/v1/search");
curl_setopt_array($ch, [
  CURLOPT_POST => true,
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_HTTPHEADER => [
    "Authorization: Bearer gsp_live_…",
    "Content-Type: application/json",
  ],
  CURLOPT_POSTFIELDS => json_encode(["query" => "best CRM for B2B SaaS", "country" => "US"]),
]);
$data = json_decode(curl_exec($ch), true);

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.

Next steps

Other languages