🔵 POST - AI Recommendation Store
Store AI Recommendation
Record an AI recommendation (bot visit) from your optimized site
POST
Public webhook endpoint for storing AI recommendations from tracking scripts embedded in AI-optimized sites.
1 AI recommendation = 1 AI bot visiting your site
When GPTBot, ClaudeBot, or any other AI crawler visits your AI site, that counts as one AI recommendation.
No authentication required - this is a public webhook similar to the Stripe webhook.
How It Works
- AI-optimized sites include a dynamic tracking script loaded from
/tracking.js - The script detects AI bots via user-agent patterns
- When an AI bot is detected, the script sends the visit to this endpoint
- We record it as an AI recommendation in the
ai_recommendationstable
Supported AI Platforms
| Platform | Detection Patterns |
|---|---|
| ChatGPT | gptbot, chatgpt-user, oai-searchbot |
| Claude | claudebot, claude-web, anthropic |
| Gemini | google-extended, gemini |
| Perplexity | perplexitybot |
| Copilot | bingbot, bingpreview, copilot |
| DeepSeek | deepseekbot |
| Grok | xai-bot, grok |
| Google AI | googlebot, googleother |
Request Body
Full URL of the page visited (entity is looked up from the domain
automatically)
Type of page:
ai_site or boosted_pageTitle of the page
User-Agent header from the request
IP address of the visitor
Referrer URL if available
Screen width in pixels
Screen height in pixels
Browser language (e.g.,
en-US)Browser timezone (e.g.,
America/New_York)What Gets Stored
The backend automatically adds:- created_at: Timestamp when the recommendation was recorded (UTC)
- entity_id: Looked up from the page_url domain
- ai_site_id: The AI site associated with the entity
- platform_id: Detected from user_agent (or
unknownif not recognized) - platform_name: Human-readable platform name
Response
"success", "ignored", or "error"ID of the detected AI platform (e.g.,
chatgpt, claude)Display name of the AI platform (e.g.,
ChatGPT, Claude)Human-readable status message