{"openapi":"3.1.0","info":{"title":"YELLOW.bot — B2B Business Registry","description":"Machine-readable business registry. Search suppliers, manufacturers, and distributors across industries worldwide. Contact details require a free API key.","version":"2.0.0","contact":{"name":"YELLOW.bot","url":"https://yellow.bot","email":"mail@yellow.bot"}},"servers":[{"url":"https://yellow.bot","description":"YELLOW.bot API"}],"paths":{"/api/v2/ask":{"get":{"operationId":"askQuestion","summary":"Ask a natural language question (RAG)","description":"Semantic search + LLM-generated answer. Best for open-ended questions about suppliers, products, or industries.","parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string"},"description":"Question in natural language"},{"name":"lang","in":"query","schema":{"type":"string","enum":["en","de","zh","ja"],"default":"en"},"description":"Response language"}],"responses":{"200":{"description":"RAG answer with sources","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AskResponse"}}}}}}},"/api/v2/suggest":{"get":{"operationId":"semanticSearch","summary":"Semantic search for providers and offers","description":"Multilingual vector search using bge-m3 embeddings. Returns top providers and offers ranked by relevance.","parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string","minLength":2},"description":"Search query (any language)"}],"responses":{"200":{"description":"Matching providers and offers","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuggestResponse"}}}}}}},"/api/v1/menu-scan":{"post":{"operationId":"scanMenu","summary":"OCR scan a restaurant menu image","description":"Upload a menu photo (base64 JPEG) and get structured dish items with prices and translations.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["image"],"properties":{"image":{"type":"string","description":"Base64-encoded JPEG image"},"restaurant_name":{"type":"string"},"latitude":{"type":"number"},"longitude":{"type":"number"}}}}}},"responses":{"200":{"description":"Extracted menu items","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MenuScanResponse"}}}}}}},"/geo/stats.json":{"get":{"operationId":"getStats","summary":"Registry statistics (sectors, countries, totals)","description":"Public aggregate statistics. No authentication required.","responses":{"200":{"description":"Registry statistics","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatsResponse"}}}}}}}},"components":{"schemas":{"AskResponse":{"type":"object","properties":{"answer":{"type":"string","description":"LLM-generated answer based on retrieved data"},"query":{"type":"string"},"sources":{"type":"object","properties":{"providers":{"type":"array","items":{"$ref":"#/components/schemas/ProviderSummary"}},"offers":{"type":"array","items":{"$ref":"#/components/schemas/OfferSummary"}}}}}},"SuggestResponse":{"type":"object","properties":{"suggestions":{"type":"array","items":{"$ref":"#/components/schemas/ProviderSummary"}},"offers":{"type":"array","items":{"$ref":"#/components/schemas/OfferSummary"}}}},"ProviderSummary":{"type":"object","properties":{"brand":{"type":"string"},"country":{"type":"string"},"city":{"type":"string","nullable":true},"website":{"type":"string","nullable":true},"verified":{"type":"boolean"},"score":{"type":"number"}}},"OfferSummary":{"type":"object","properties":{"product":{"type":"string"},"company":{"type":"string","nullable":true},"price":{"type":"string","nullable":true},"currency":{"type":"string","nullable":true},"moq":{"type":"string","nullable":true},"country":{"type":"string","nullable":true},"score":{"type":"number"}}},"MenuScanResponse":{"type":"object","properties":{"restaurant_name":{"type":"string","nullable":true},"language":{"type":"string"},"items":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"name_en":{"type":"string","nullable":true},"price":{"type":"string","nullable":true},"category":{"type":"string"}}}}}},"StatsResponse":{"type":"object","properties":{"source":{"type":"string"},"totals":{"type":"object","properties":{"companies":{"type":"integer"},"categories":{"type":"integer"},"sectors":{"type":"integer"},"active_offers":{"type":"integer"},"countries":{"type":"integer"}}}}}}}}