Skip to main content
These endpoints are called by the Cron service (Railway scheduled jobs) to perform background tasks.

Flow

Per Entity Processing (Once Per Day)

Each entity (business or product) gets:
  • 1 AI website updated with latest data from real website
  • 15 blog posts generated based off of data from real website
  • 100 prompts analyzed for visibility & a score is created

Daily Cron Flow

1. GET /api/cron/entities → Fetch all entities to process

2. For each entity:

   Update Site:
   └── POST /api/cron/update-site (×1 per entity)

   Blog Posts:
   └── POST /api/cron/create-blog (×15 posts per entity)

   Visibility Analysis:
   ├── Fetch 100 prompts from Supabase
   ├── For each of the 100 prompts:
   │   └── POST /api/cron/analyze-visibility
   │       └── Runs across all 8 AI platforms in parallel
   └── POST /api/cron/store-visibility-score
       └── Calculates overall score from 800 results (100 prompts × 8 platforms)

3. Done!

Jobs

JobEndpointScheduleDescription
Get EntitiesGET /api/cron/entities-Fetch all businesses/products to process
Update SitePOST /api/cron/update-siteDailyRefresh AI-optimized sites with latest data
Create BlogPOST /api/cron/create-blogDailyGenerate new AI-specific blog posts
Analyze VisibilityPOST /api/cron/analyze-visibilityDailyCheck visibility across 8 AI platforms
Store ScorePOST /api/cron/store-visibility-scoreDailyCalculate and store overall visibility score

The 8 AI Platforms

  • ChatGPT (OpenAI)
  • Claude (Anthropic)
  • Gemini (Google)
  • Perplexity
  • Copilot (Microsoft)
  • DeepSeek
  • Grok (xAI)
  • Google AI Overview