Skip to main content
Internal Service β€” These are not HTTP endpoints. They’re called by the analyze-visibility orchestrator.

Purpose

Each platform checker queries a specific AI service and determines if the business is mentioned in the response.

Architecture

Each platform has the same structure:
{platform}/
β”œβ”€β”€ mini_orchestrator.py   # check_visibility() function
└── children/
    β”œβ”€β”€ api_caller.py      # API integration
    └── config.py          # Platform-specific config

Function Signature

All checkers implement the same interface:
async def check_visibility(
    queries: list[str],
    business_name: Optional[str] = None,
    business_url: Optional[str] = None,
    product_name: Optional[str] = None,
) -> list[bool]

How Detection Works

  1. Send Query - Ask the AI platform the prompt
  2. Get Response - Receive the AI’s answer
  3. Evaluate - Check if business name/URL appears in response
  4. Return Boolean - True if mentioned, False otherwise

Evaluation Logic

The evaluator checks for:
  • Exact business name match (case-insensitive)
  • Domain name match (e.g., β€œstripe.com”)
  • Partial matches with context

Platform-Specific Notes

PlatformNotes
ChatGPTUses GPT-4o via OpenAI API
ClaudeUses Claude 3.5 Sonnet via Anthropic API
GeminiUses Gemini Pro via Google AI Studio
PerplexityUses Sonar model via Perplexity API
CopilotUses Bing Chat API (requires special access)
DeepSeekUses DeepSeek Chat API
GrokUses Grok via xAI API
Google AIScrapes Google AI Overviews (no official API)

Parallel Execution

All 8 checkers run simultaneously using asyncio.gather:
tasks = [asyncio.create_task(checker(queries, ...)) for checker in PLATFORM_CHECKERS.values()]
results = await asyncio.gather(*tasks, return_exceptions=True)

Error Handling

If a platform check fails, it returns False for all queries rather than failing the entire request:
if isinstance(result, Exception):
    print(f"⚠️ Error checking {service}: {result}")
    visibility[service] = [False] * len(queries)