Skip to main content

Purpose

Returns AI recommendation counts (bot visits) for the dashboard. Each recommendation represents an AI bot visiting the customer’s site.

Architecture

Query Parameters

ParameterTypeDefaultDescription
product_idstringnullFilter by product
daysint7Days to look back (1-365)
start_datestringnullCustom start date (ISO)
end_datestringnullCustom end date (ISO)

Response Format

{
  "business_id": "org-slug-123",
  "product_id": null,
  "total": 156,
  "unique_platforms": 6,
  "platforms": {
    "chatgpt": {"total": 45},
    "claude": {"total": 32},
    "gemini": {"total": 28},
    "perplexity": {"total": 21},
    "copilot": {"total": 15},
    "deepseek": {"total": 10},
    "grok": {"total": 5},
    "google_ai": {"total": 0}
  },
  "period_start": "2024-01-08T00:00:00Z",
  "period_end": "2024-01-15T23:59:59Z"
}

Code Location

src/app/apis/what_were_doing/ai_recommendations/routes.py