Skip to main content
POST
https://searchcompany-main.up.railway.app
/
api
/
cron
/
analyze-visibility
curl -X POST https://searchcompany-main.up.railway.app/api/cron/analyze-visibility \
  -H "Content-Type: application/json" \
  -d '{
    "business_id": "nike",
    "prompt": "What are the best running shoes for marathons?"
  }'
{
  "status": "success",
  "prompt": "What are the best running shoes for marathons?",
  "chatgpt": true,
  "claude": true,
  "gemini": false,
  "perplexity": true,
  "copilot": false,
  "deepseek": true,
  "grok": false,
  "google_ai": true
}
Internal endpoint for the Cron service to check visibility for a single prompt. Called 100 times (once per prompt) by the cron job for each entity.

What It Does

  1. Takes a single prompt
  2. Checks it across 8 AI platforms in parallel:
    • ChatGPT, Claude, Gemini, Perplexity
    • Copilot, DeepSeek, Grok, Google AI
  3. Returns 8 boolean values indicating if business was mentioned

Request Body

business_id
string
required
Business identifier (org_slug)
item_id
string
Optional product/item ID
prompt
string
required
Single prompt to analyze

Response

status
string
"success" or "error"
prompt
string
The prompt that was analyzed
chatgpt
boolean
True if business mentioned on ChatGPT
claude
boolean
True if business mentioned on Claude
gemini
boolean
True if business mentioned on Gemini
perplexity
boolean
True if business mentioned on Perplexity
copilot
boolean
True if business mentioned on Copilot
deepseek
boolean
True if business mentioned on DeepSeek
grok
boolean
True if business mentioned on Grok
google_ai
boolean
True if business mentioned on Google AI Overview
curl -X POST https://searchcompany-main.up.railway.app/api/cron/analyze-visibility \
  -H "Content-Type: application/json" \
  -d '{
    "business_id": "nike",
    "prompt": "What are the best running shoes for marathons?"
  }'
{
  "status": "success",
  "prompt": "What are the best running shoes for marathons?",
  "chatgpt": true,
  "claude": true,
  "gemini": false,
  "perplexity": true,
  "copilot": false,
  "deepseek": true,
  "grok": false,
  "google_ai": true
}

Notes

  • Called by Cron 100 times per entity (once per prompt)
  • All 8 platform checks run in parallel for speed
  • After all 100 prompts, Cron calls /api/cron/store-visibility-score to save results