Skip to main content

Purpose

Returns all businesses and products that have deployed AI sites. Used by cron jobs to iterate through entities for batch processing.

Architecture

Query Parameters

ParameterTypeDescription
business_idstringFilter by specific business
typestringFilter by β€œbusiness” or β€œproduct”

Response Format

{
  "entities": [
    {
      "entity_id": "uuid-...",
      "business_id": "org-slug-123",
      "product_id": null,
      "product_name": null,
      "type": "business",
      "name": "Acme Corp",
      "source_url": "https://acme.com",
      "deployment_url": "https://acme-corp.searchcompany.dev"
    },
    {
      "entity_id": "uuid-...",
      "business_id": "org-slug-123",
      "product_id": "product-a",
      "product_name": "Product A",
      "type": "product",
      "name": "Product A",
      "source_url": "https://acme.com/product-a",
      "deployment_url": "https://acme-corp.searchcompany.dev"
    }
  ]
}

Code Location

src/app/apis/cron/get_entities/routes.py

Used By

  • Daily cron job to iterate through all entities
  • Batch visibility analysis
  • Batch boosted page creation