{"openapi":"3.1.0","info":{"title":"Scrapegoat API","version":"1.0.0","description":"Web search, cited answers, and place discovery. Search and ask match Reprompt response contracts. Serper powers search and maps; ScrapingDog AI Mode powers ask. This is not a full Firecrawl API emulator."},"servers":[{"url":"https://api.scrapegoat.ai"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"}}},"paths":{"/v1/search":{"post":{"operationId":"search","summary":"Search the web","description":"limit is a maximum, not a guaranteed result count. country uses a two-letter code; omitted country reuses the default Spatial Perplexity cache.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"query":{"type":"string","minLength":1,"maxLength":1000},"country":{"type":"string","pattern":"^[a-zA-Z]{2}$"},"limit":{"default":10,"type":"integer","minimum":1,"maximum":10}},"required":["query"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful result","content":{"application/json":{"schema":{"type":"object","required":["query","results","answer_box","knowledge_graph"],"properties":{"query":{"type":"string"},"results":{"type":"array","items":{"type":"object","required":["position","title","url"],"properties":{"position":{"type":"integer","minimum":1},"title":{"type":"string"},"url":{"type":"string","format":"uri"},"snippet":{"type":"string"},"date":{"type":"string"}}}},"answer_box":{"type":["object","null"],"properties":{"title":{"type":"string"},"answer":{"type":"string"},"snippet":{"type":"string"},"url":{"type":"string"},"date":{"type":"string"}}},"knowledge_graph":{"type":["object","null"],"properties":{"title":{"type":"string"},"type":{"type":"string"},"description":{"type":"string"},"website":{"type":"string"},"facts":{"type":"object","additionalProperties":{"type":"string"}}}}}}}},"headers":{"X-Cache":{"schema":{"type":"string","enum":["HIT","MISS","BYPASS"]},"description":"BYPASS means a successful provider response could not be persisted."},"X-Cache-Age":{"schema":{"type":"integer"},"description":"Cached result age in seconds."},"X-Request-Id":{"schema":{"type":"string"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"}}}},"400":{"description":"Request failed; inspect error.code and error.retryable.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","request_id"],"properties":{"code":{"type":"string"},"message":{"type":"string"},"retryable":{"type":"boolean"},"request_id":{"type":"string"}}}}}}}},"401":{"description":"Request failed; inspect error.code and error.retryable.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","request_id"],"properties":{"code":{"type":"string"},"message":{"type":"string"},"retryable":{"type":"boolean"},"request_id":{"type":"string"}}}}}}}},"413":{"description":"Request failed; inspect error.code and error.retryable.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","request_id"],"properties":{"code":{"type":"string"},"message":{"type":"string"},"retryable":{"type":"boolean"},"request_id":{"type":"string"}}}}}}}},"415":{"description":"Request failed; inspect error.code and error.retryable.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","request_id"],"properties":{"code":{"type":"string"},"message":{"type":"string"},"retryable":{"type":"boolean"},"request_id":{"type":"string"}}}}}}}},"422":{"description":"Request failed; inspect error.code and error.retryable.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","request_id"],"properties":{"code":{"type":"string"},"message":{"type":"string"},"retryable":{"type":"boolean"},"request_id":{"type":"string"}}}}}}}},"429":{"description":"Request failed; inspect error.code and error.retryable.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","request_id"],"properties":{"code":{"type":"string"},"message":{"type":"string"},"retryable":{"type":"boolean"},"request_id":{"type":"string"}}}}}}}},"502":{"description":"Request failed; inspect error.code and error.retryable.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","request_id"],"properties":{"code":{"type":"string"},"message":{"type":"string"},"retryable":{"type":"boolean"},"request_id":{"type":"string"}}}}}}}},"503":{"description":"Request failed; inspect error.code and error.retryable.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","request_id"],"properties":{"code":{"type":"string"},"message":{"type":"string"},"retryable":{"type":"boolean"},"request_id":{"type":"string"}}}}}}}},"504":{"description":"Request failed; inspect error.code and error.retryable.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","request_id"],"properties":{"code":{"type":"string"},"message":{"type":"string"},"retryable":{"type":"boolean"},"request_id":{"type":"string"}}}}}}}}}}},"/v1/ask":{"post":{"operationId":"ask","summary":"Get an answer with numbered citations","description":"Returns the upstream generated answer as Markdown. Each [n] citation resolves to sources[n-1]. Answers without attributable sources are rejected.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"query":{"type":"string","minLength":1,"maxLength":1000},"country":{"type":"string","pattern":"^[a-zA-Z]{2}$"},"language":{"type":"string","pattern":"^[a-zA-Z]{2}$"}},"required":["query"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful result","content":{"application/json":{"schema":{"type":"object","required":["query","answer","sources"],"properties":{"query":{"type":"string"},"answer":{"type":"string"},"sources":{"type":"array","items":{"type":"object","required":["position","title","url"],"properties":{"position":{"type":"integer","minimum":1},"title":{"type":"string"},"url":{"type":"string","format":"uri"},"snippet":{"type":"string"},"date":{"type":"string"}}}}}}}},"headers":{"X-Cache":{"schema":{"type":"string","enum":["HIT","MISS","BYPASS"]},"description":"BYPASS means a successful provider response could not be persisted."},"X-Cache-Age":{"schema":{"type":"integer"},"description":"Cached result age in seconds."},"X-Request-Id":{"schema":{"type":"string"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"}}}},"400":{"description":"Request failed; inspect error.code and error.retryable.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","request_id"],"properties":{"code":{"type":"string"},"message":{"type":"string"},"retryable":{"type":"boolean"},"request_id":{"type":"string"}}}}}}}},"401":{"description":"Request failed; inspect error.code and error.retryable.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","request_id"],"properties":{"code":{"type":"string"},"message":{"type":"string"},"retryable":{"type":"boolean"},"request_id":{"type":"string"}}}}}}}},"413":{"description":"Request failed; inspect error.code and error.retryable.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","request_id"],"properties":{"code":{"type":"string"},"message":{"type":"string"},"retryable":{"type":"boolean"},"request_id":{"type":"string"}}}}}}}},"415":{"description":"Request failed; inspect error.code and error.retryable.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","request_id"],"properties":{"code":{"type":"string"},"message":{"type":"string"},"retryable":{"type":"boolean"},"request_id":{"type":"string"}}}}}}}},"422":{"description":"Request failed; inspect error.code and error.retryable.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","request_id"],"properties":{"code":{"type":"string"},"message":{"type":"string"},"retryable":{"type":"boolean"},"request_id":{"type":"string"}}}}}}}},"429":{"description":"Request failed; inspect error.code and error.retryable.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","request_id"],"properties":{"code":{"type":"string"},"message":{"type":"string"},"retryable":{"type":"boolean"},"request_id":{"type":"string"}}}}}}}},"502":{"description":"Request failed; inspect error.code and error.retryable.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","request_id"],"properties":{"code":{"type":"string"},"message":{"type":"string"},"retryable":{"type":"boolean"},"request_id":{"type":"string"}}}}}}}},"503":{"description":"Request failed; inspect error.code and error.retryable.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","request_id"],"properties":{"code":{"type":"string"},"message":{"type":"string"},"retryable":{"type":"boolean"},"request_id":{"type":"string"}}}}}}}},"504":{"description":"Request failed; inspect error.code and error.retryable.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","request_id"],"properties":{"code":{"type":"string"},"message":{"type":"string"},"retryable":{"type":"boolean"},"request_id":{"type":"string"}}}}}}}}}}},"/v1/maps/search":{"post":{"operationId":"maps_search","summary":"Find places with a neutral place schema","description":"Coordinates must be supplied together. Location bias uses zoom 15; provider ranking is preserved. All fields except id, position, name, categories may be absent.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"query":{"type":"string","minLength":1,"maxLength":1000},"latitude":{"type":"number","minimum":-90,"maximum":90},"longitude":{"type":"number","minimum":-180,"maximum":180},"limit":{"default":20,"type":"integer","minimum":1,"maximum":20}},"required":["query"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful result","content":{"application/json":{"schema":{"type":"object","required":["query","places"],"properties":{"query":{"type":"string"},"places":{"type":"array","items":{"type":"object","required":["id","position","name","categories"],"properties":{"id":{"type":"string"},"position":{"type":"integer"},"name":{"type":"string"},"address":{"type":"string"},"website":{"type":"string","format":"uri"},"phone":{"type":"string"},"categories":{"type":"array","items":{"type":"string"}},"coordinates":{"type":"object","required":["latitude","longitude"],"properties":{"latitude":{"type":"number"},"longitude":{"type":"number"}}},"rating":{"type":"object","required":["value"],"properties":{"value":{"type":"number"},"count":{"type":"integer"}}},"opening_hours":{"type":"object","additionalProperties":{"type":"string"}},"price_level":{"type":"string"},"status":{"type":"string","enum":["permanently_closed"]},"description":{"type":"string"}}}}}}}},"headers":{"X-Cache":{"schema":{"type":"string","enum":["HIT","MISS","BYPASS"]},"description":"BYPASS means a successful provider response could not be persisted."},"X-Cache-Age":{"schema":{"type":"integer"},"description":"Cached result age in seconds."},"X-Request-Id":{"schema":{"type":"string"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"}}}},"400":{"description":"Request failed; inspect error.code and error.retryable.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","request_id"],"properties":{"code":{"type":"string"},"message":{"type":"string"},"retryable":{"type":"boolean"},"request_id":{"type":"string"}}}}}}}},"401":{"description":"Request failed; inspect error.code and error.retryable.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","request_id"],"properties":{"code":{"type":"string"},"message":{"type":"string"},"retryable":{"type":"boolean"},"request_id":{"type":"string"}}}}}}}},"413":{"description":"Request failed; inspect error.code and error.retryable.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","request_id"],"properties":{"code":{"type":"string"},"message":{"type":"string"},"retryable":{"type":"boolean"},"request_id":{"type":"string"}}}}}}}},"415":{"description":"Request failed; inspect error.code and error.retryable.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","request_id"],"properties":{"code":{"type":"string"},"message":{"type":"string"},"retryable":{"type":"boolean"},"request_id":{"type":"string"}}}}}}}},"422":{"description":"Request failed; inspect error.code and error.retryable.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","request_id"],"properties":{"code":{"type":"string"},"message":{"type":"string"},"retryable":{"type":"boolean"},"request_id":{"type":"string"}}}}}}}},"429":{"description":"Request failed; inspect error.code and error.retryable.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","request_id"],"properties":{"code":{"type":"string"},"message":{"type":"string"},"retryable":{"type":"boolean"},"request_id":{"type":"string"}}}}}}}},"502":{"description":"Request failed; inspect error.code and error.retryable.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","request_id"],"properties":{"code":{"type":"string"},"message":{"type":"string"},"retryable":{"type":"boolean"},"request_id":{"type":"string"}}}}}}}},"503":{"description":"Request failed; inspect error.code and error.retryable.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","request_id"],"properties":{"code":{"type":"string"},"message":{"type":"string"},"retryable":{"type":"boolean"},"request_id":{"type":"string"}}}}}}}},"504":{"description":"Request failed; inspect error.code and error.retryable.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable","request_id"],"properties":{"code":{"type":"string"},"message":{"type":"string"},"retryable":{"type":"boolean"},"request_id":{"type":"string"}}}}}}}}}}}}}