{"openapi":"3.1.0","info":{"title":"TokenEnrich API","description":"Sub-second B2B firmographics and signal enrichment API engineered for LLMs (~240 tokens).","version":"1.0.0"},"paths":{"/":{"get":{"summary":"Homepage","description":"High-converting developer homepage with live interactive comparison arena.","operationId":"homepage__get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}},"post":{"summary":"Handle Jsonrpc Mcp","description":"Native HTTP JSON-RPC 2.0 Transport for MCP Clients & Smithery Gateway.\nHandles 'tools/list', 'tools/call', 'initialize', and 'ping'.","operationId":"handle_jsonrpc_mcp__post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/templates":{"get":{"summary":"Templates Page","description":"Production-ready drop-in templates and workflows for Clay, n8n, CrewAI, and MCP.","operationId":"templates_page_templates_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/health":{"get":{"summary":"Health Check","description":"Liveness probe and latency telemetry endpoint.","operationId":"health_check_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/dashboard":{"get":{"summary":"Dashboard Page","description":"Self-serve developer console.","operationId":"dashboard_page_dashboard_get","parameters":[{"name":"key","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"API Key for direct session access","title":"Key"},"description":"API Key for direct session access"},{"name":"session_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Stripe checkout session ID for instant fulfillment","title":"Session Id"},"description":"Stripe checkout session ID for instant fulfillment"}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/provision-sandbox-key":{"post":{"summary":"Provision Sandbox Key","description":"Provisions a unique 50-credit Sandbox key for a user/email with anti-abuse rate limits.","operationId":"provision_sandbox_key_api_provision_sandbox_key_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/logout":{"get":{"summary":"Logout Endpoint","description":"Logs out of active API key session and resets to default sandbox.","operationId":"logout_endpoint_api_logout_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/recover-key":{"post":{"summary":"Recover Key Endpoint","description":"Self-serve email key recovery.","operationId":"recover_key_endpoint_api_recover_key_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/docs":{"get":{"summary":"Docs Page","description":"Interactive API documentation and SDK integration guides.","operationId":"docs_page_docs_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/privacy":{"get":{"summary":"Privacy Page","description":"GDPR, UK DPA & CCPA Data Privacy Policy.","operationId":"privacy_page_privacy_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/terms":{"get":{"summary":"Terms Page","description":"Commercial Terms of Service & API Acceptable Use Policy.","operationId":"terms_page_terms_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/vs/{competitor}":{"get":{"summary":"Comparison Page","description":"Programmatic comparison landing page for search and AI crawler indexing.","operationId":"comparison_page_vs__competitor__get","parameters":[{"name":"competitor","in":"path","required":true,"schema":{"type":"string","title":"Competitor"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/for/{workflow}":{"get":{"summary":"Workflow Page","description":"Programmatic workflow landing page (e.g. /for/clay, /for/claude, /for/cursor).","operationId":"workflow_page_for__workflow__get","parameters":[{"name":"workflow","in":"path","required":true,"schema":{"type":"string","title":"Workflow"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/tech/{technology}":{"get":{"summary":"Technology Page","description":"Programmatic tech signature landing page (e.g. /tech/stripe, /tech/ashby, /tech/posthog).","operationId":"technology_page_tech__technology__get","parameters":[{"name":"technology","in":"path","required":true,"schema":{"type":"string","title":"Technology"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/robots.txt":{"get":{"summary":"Robots Txt","description":"Explicitly allows and guides all search and AI crawlers (GPTBot, ClaudeBot, PerplexityBot).","operationId":"robots_txt_robots_txt_get","responses":{"200":{"description":"Successful Response","content":{"text/plain":{"schema":{"type":"string"}}}}}}},"/llms.txt":{"get":{"summary":"Llms Txt","description":"Machine-readable manifest for AI search crawlers (MethodSEO standard).","operationId":"llms_txt_llms_txt_get","responses":{"200":{"description":"Successful Response","content":{"text/plain":{"schema":{"type":"string"}}}}}}},"/llms-full.txt":{"get":{"summary":"Llms Full Txt","description":"Exhaustive machine-readable documentation for deep LLM context ingestion.","operationId":"llms_full_txt_llms_full_txt_get","responses":{"200":{"description":"Successful Response","content":{"text/plain":{"schema":{"type":"string"}}}}}}},"/sitemap.xml":{"get":{"summary":"Sitemap Xml","description":"Dynamic XML sitemap indexing all static, comparison, workflow, and tech pages.","operationId":"sitemap_xml_sitemap_xml_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/.well-known/ai-plugin.json":{"get":{"summary":"Ai Plugin Manifest","description":"OpenAI / ChatGPT Action Auto-Discovery Manifest.","operationId":"ai_plugin_manifest__well_known_ai_plugin_json_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/.well-known/mcp.json":{"get":{"summary":"Mcp Server Manifest","description":"Model Context Protocol (MCP) Registry Auto-Discovery Standard.","operationId":"mcp_server_manifest__well_known_mcp_json_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/mcp":{"post":{"summary":"Handle Jsonrpc Mcp","description":"Native HTTP JSON-RPC 2.0 Transport for MCP Clients & Smithery Gateway.\nHandles 'tools/list', 'tools/call', 'initialize', and 'ping'.","operationId":"handle_jsonrpc_mcp_mcp_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/enrich":{"get":{"summary":"Enrich company domain in ~180 tokens and 140ms","description":"Primary Deterministic Firmographic Endpoint for AI SDRs & Autonomous Agents:\n- Extracts DNS mail infrastructure (Google Workspace, Microsoft 365, Proton, Fastmail)\n- Detects active ATS recruitment pipelines (Ashby, Greenhouse, Lever, Workday)\n- Scans 500+ tech stacks (Frameworks, Databases, Auth, Analytics, Payments)\n- Verifies SOC 2 Type II trust portals and compliance badges\n- Delivers structured JSON in ~180 tokens with sub-200ms latency.\n- Supports `?check=stripe` for 12-token binary verification and `?fields=tech_stack,hiring_signals` for dynamic masking.","operationId":"enrich_single_domain_v1_enrich_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"domain","in":"query","required":true,"schema":{"type":"string","description":"Apex domain to enrich, e.g. linear.app, stripe.com, datadoghq.com","title":"Domain"},"description":"Apex domain to enrich, e.g. linear.app, stripe.com, datadoghq.com"},{"name":"bypass_cache","in":"query","required":false,"schema":{"type":"boolean","description":"Whether to bypass Redis cache and force fresh live resolution","default":false,"title":"Bypass Cache"},"description":"Whether to bypass Redis cache and force fresh live resolution"},{"name":"check","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Ultra-minified single check (e.g. 'stripe', 'ashby', 'soc2'). Returns 12-token response.","title":"Check"},"description":"Ultra-minified single check (e.g. 'stripe', 'ashby', 'soc2'). Returns 12-token response."},{"name":"fields","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Comma-separated field list to dynamically mask (e.g. 'tech_stack,hiring_signals').","title":"Fields"},"description":"Comma-separated field list to dynamically mask (e.g. 'tech_stack,hiring_signals')."},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/enrich/batch":{"post":{"summary":"Enrich Batch Domains","description":"Batch Parallel Endpoint: Enriches up to 50 domains concurrently in < 1 second.","operationId":"enrich_batch_domains_v1_enrich_batch_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchEnrichmentRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchEnrichmentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/live-compare":{"get":{"summary":"Live Comparison Demo","description":"Public live arena endpoint: Computes token arbitrage and latency comparison.","operationId":"live_comparison_demo_api_live_compare_get","parameters":[{"name":"domain","in":"query","required":false,"schema":{"type":"string","description":"Domain for live comparison calculation","default":"linear.app","title":"Domain"},"description":"Domain for live comparison calculation"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LiveComparisonResult"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/checkout":{"get":{"summary":"Create Checkout","description":"Redirects user to Stripe Checkout for subscription purchase.","operationId":"create_checkout_api_checkout_get","parameters":[{"name":"plan","in":"query","required":false,"schema":{"type":"string","description":"Plan tier: builder, growth, agency","default":"growth","title":"Plan"},"description":"Plan tier: builder, growth, agency"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/customer-portal":{"get":{"summary":"Customer Portal","description":"Redirects user to Stripe Customer Portal for self-serve billing management.","operationId":"customer_portal_api_customer_portal_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/webhook":{"post":{"summary":"Stripe Webhook","description":"Handles incoming Stripe webhook events (checkout completed, subscription updates, cancellations).","operationId":"stripe_webhook_api_webhook_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}}},"components":{"schemas":{"BatchEnrichmentRequest":{"properties":{"domains":{"items":{"type":"string"},"type":"array","maxItems":50,"title":"Domains","description":"Array of up to 50 domains to enrich in parallel"}},"type":"object","required":["domains"],"title":"BatchEnrichmentRequest"},"BatchEnrichmentResponse":{"properties":{"results":{"items":{"$ref":"#/components/schemas/EnrichedCompanyPayload"},"type":"array","title":"Results"},"total_domains":{"type":"integer","title":"Total Domains"},"total_tokens_consumed":{"type":"integer","title":"Total Tokens Consumed"},"total_tokens_saved":{"type":"integer","title":"Total Tokens Saved"},"total_execution_time_ms":{"type":"integer","title":"Total Execution Time Ms"}},"type":"object","required":["total_domains","total_tokens_consumed","total_tokens_saved","total_execution_time_ms"],"title":"BatchEnrichmentResponse"},"EnrichedCompanyPayload":{"properties":{"domain":{"type":"string","title":"Domain","description":"Clean apex domain (e.g. linear.app)"},"company_name":{"type":"string","title":"Company Name","description":"Normalized company brand name"},"tagline":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tagline","description":"Concise, 1-line company mission or value proposition"},"category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category","description":"Primary industry or product category"},"established_year":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Established Year","description":"Year domain was originally registered via RDAP"},"location":{"$ref":"#/components/schemas/LocationInfo","description":"Company headquarters location and country"},"estimated_headcount":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Estimated Headcount","description":"Estimated employee count bracket (e.g. 11-50 employees)"},"tech_spend_tier":{"type":"string","title":"Tech Spend Tier","description":"Estimated monthly B2B tooling spend tier","default":"Standard"},"sales_motion":{"type":"string","title":"Sales Motion","description":"Detected sales motion (Product-Led, Enterprise / High-Touch, or Hybrid)","default":"Unknown"},"pricing":{"$ref":"#/components/schemas/PricingSignals"},"security_signals":{"$ref":"#/components/schemas/SecuritySignals"},"tech_stack":{"items":{"type":"string"},"type":"array","title":"Tech Stack","description":"Detected frameworks, analytics, billing, and cloud tools"},"mail_infrastructure":{"$ref":"#/components/schemas/MailInfrastructure"},"hiring_signals":{"$ref":"#/components/schemas/HiringSignals"},"social_links":{"additionalProperties":{"type":"string"},"type":"object","title":"Social Links","description":"Verified corporate social links (LinkedIn, X/Twitter, GitHub, YouTube)"},"confidence":{"type":"number","title":"Confidence","description":"Deterministic signal confidence score from 0.0 to 1.0","default":0.98},"provenance":{"items":{"type":"string"},"type":"array","title":"Provenance","description":"Verified signal origin methods"},"tokens_consumed":{"type":"integer","title":"Tokens Consumed","description":"Estimated tokens consumed by this response payload in LLM context","default":0},"estimated_tokens_saved":{"type":"integer","title":"Estimated Tokens Saved","description":"Estimated tokens saved compared to raw HTML DOM scraping","default":24000},"response_time_ms":{"type":"integer","title":"Response Time Ms","description":"Execution and resolution latency in milliseconds","default":0},"status":{"type":"string","title":"Status","description":"Status code: success, partial_success, or error","default":"success"},"cached":{"type":"boolean","title":"Cached","description":"Whether this response was served directly from Redis cache","default":false}},"type":"object","required":["domain","company_name"],"title":"EnrichedCompanyPayload"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"HiringSignals":{"properties":{"is_hiring":{"type":"boolean","title":"Is Hiring","description":"Whether active job openings or career portals are detected","default":false},"ats_platform":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ats Platform","description":"Detected Applicant Tracking System (e.g. Ashby, Greenhouse, Lever, Workable, Workday)"}},"type":"object","title":"HiringSignals"},"LiveComparisonResult":{"properties":{"domain":{"type":"string","title":"Domain"},"raw_html_tokens":{"type":"integer","title":"Raw Html Tokens"},"raw_html_cost_usd":{"type":"number","title":"Raw Html Cost Usd"},"raw_html_latency_sec":{"type":"number","title":"Raw Html Latency Sec"},"tokenenrich_tokens":{"type":"integer","title":"Tokenenrich Tokens"},"tokenenrich_cost_usd":{"type":"number","title":"Tokenenrich Cost Usd"},"tokenenrich_latency_sec":{"type":"number","title":"Tokenenrich Latency Sec"},"token_reduction_pct":{"type":"number","title":"Token Reduction Pct"},"speedup_multiplier":{"type":"number","title":"Speedup Multiplier"},"payload":{"$ref":"#/components/schemas/EnrichedCompanyPayload"}},"type":"object","required":["domain","raw_html_tokens","raw_html_cost_usd","raw_html_latency_sec","tokenenrich_tokens","tokenenrich_cost_usd","tokenenrich_latency_sec","token_reduction_pct","speedup_multiplier","payload"],"title":"LiveComparisonResult"},"LocationInfo":{"properties":{"country":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country","description":"Primary country name (e.g. United States)"},"country_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country Code","description":"ISO 2-letter country code (e.g. US, UK, DE)"},"city":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"City","description":"Headquarters city (e.g. San Francisco, London)"},"region":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Region","description":"Macro geographic region (e.g. North America, Europe)"}},"type":"object","title":"LocationInfo"},"MailInfrastructure":{"properties":{"provider":{"type":"string","title":"Provider","description":"Primary business email provider (e.g. Google Workspace, Microsoft 365, Mimecast)","default":"Unknown"},"delivery_tools":{"items":{"type":"string"},"type":"array","title":"Delivery Tools","description":"Transactional and marketing email delivery infrastructure from SPF (e.g. SendGrid, Postmark, Mailgun)"}},"type":"object","title":"MailInfrastructure"},"PricingSignals":{"properties":{"has_free_tier":{"type":"boolean","title":"Has Free Tier","description":"Whether a free tier, trial, or freemium plan is detected","default":false},"has_pricing_page":{"type":"boolean","title":"Has Pricing Page","description":"Whether a dedicated /pricing page exists","default":false}},"type":"object","title":"PricingSignals"},"SecuritySignals":{"properties":{"has_soc2":{"type":"boolean","title":"Has Soc2","description":"Whether SOC 2 Type I/II compliance is detected","default":false},"has_trust_center":{"type":"boolean","title":"Has Trust Center","description":"Whether a dedicated trust center (Vanta, Drata, SafeBase) is active","default":false},"compliance_badges":{"items":{"type":"string"},"type":"array","title":"Compliance Badges","description":"List of detected compliance standards (e.g. ISO 27001, HIPAA, GDPR)"}},"type":"object","title":"SecuritySignals"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}},"securitySchemes":{"HTTPBearer":{"type":"http","scheme":"bearer"}}}}