{"components":{"schemas":{"Error":{"properties":{"error":{"properties":{"code":{"type":"string"},"message":{"type":"string"}},"type":"object"}},"type":"object"},"ProviderStatus":{"properties":{"count":{"type":"integer"},"id":{"type":"string"},"latency_ms":{"type":"integer"},"message":{"type":"string"},"name":{"type":"string"},"status":{"enum":["success","empty","timeout","rate_limited","error","not_configured","circuit_open","skipped"],"type":"string"}},"type":"object"},"Result":{"properties":{"details":{"additionalProperties":{"type":"string"},"type":"object"},"display_url":{"type":"string"},"provider":{"description":"Where it was found first","type":"string"},"published":{"format":"date-time","type":"string"},"score":{"type":"number"},"snippet":{"type":"string"},"sources":{"items":{"properties":{"id":{"type":"string"},"name":{"type":"string"},"rank":{"type":"integer"}},"type":"object"},"type":"array"},"thumbnail":{"type":"string"},"title":{"type":"string"},"type":{"enum":["web","answer","image","video","news","code","paper","discussion"],"type":"string"},"url":{"type":"string"}},"type":"object"},"SearchResponse":{"properties":{"cached":{"type":"boolean"},"category":{"type":"string"},"page":{"type":"integer"},"providers":{"items":{"$ref":"#/components/schemas/ProviderStatus"},"type":"array"},"query":{"type":"string"},"related":{"items":{"type":"string"},"type":"array"},"results":{"items":{"$ref":"#/components/schemas/Result"},"type":"array"},"took_ms":{"type":"integer"}},"type":"object"}},"securitySchemes":{"key":{"description":"A developer key: mss_…","scheme":"bearer","type":"http"},"session":{"description":"A Mercestack session (the Mercestack site sends it for you).","scheme":"bearer","type":"http"}}},"info":{"description":"One search across many permitted providers, merged and ranked. Every result names its sources; every provider reports an honest status. Anonymous use is rate-limited per address; a developer key (Bearer mss_…) gets a higher limit.","title":"Mercestack Search API","version":"1.0.0"},"openapi":"3.1.0","paths":{"/api/v1/me":{"delete":{"responses":{"200":{"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Error"}},"security":[{"session":[]}],"summary":"Forget your history and saved searches"}},"/api/v1/me/export":{"get":{"responses":{"200":{"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Error"}},"security":[{"session":[]}],"summary":"Download everything Mercestack keeps about you"}},"/api/v1/me/history":{"delete":{"responses":{"200":{"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Error"}},"security":[{"session":[]}],"summary":"Clear your history"},"get":{"responses":{"200":{"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Error"}},"security":[{"session":[]}],"summary":"Your search history"}},"/api/v1/me/history/{id}":{"delete":{"responses":{"200":{"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Error"}},"security":[{"session":[]}],"summary":"Delete one search from your history"}},"/api/v1/me/keys":{"get":{"responses":{"200":{"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Error"}},"security":[{"session":[]}],"summary":"Your developer keys, with today's and the last 30 days' use"},"post":{"responses":{"200":{"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Error"}},"security":[{"session":[]}],"summary":"Make a key ({ name }) — returned once"}},"/api/v1/me/keys/{id}":{"delete":{"responses":{"200":{"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Error"}},"security":[{"session":[]}],"summary":"Revoke a key"}},"/api/v1/me/saved":{"get":{"responses":{"200":{"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Error"}},"security":[{"session":[]}],"summary":"Your saved searches"},"post":{"responses":{"200":{"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Error"}},"security":[{"session":[]}],"summary":"Save a search ({ query, category })"}},"/api/v1/me/saved/{id}":{"delete":{"responses":{"200":{"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Error"}},"security":[{"session":[]}],"summary":"Remove a saved search"}},"/api/v1/providers":{"get":{"responses":{"200":{"description":"{ providers: [...], categories: [...] }"}},"summary":"Every provider: categories, whether it's configured, and its health"}},"/api/v1/search":{"get":{"parameters":[{"description":"What to search for. Operators: site:, filetype:, intitle:, inurl:, before:YYYY-MM-DD, after:YYYY-MM-DD, \"exact phrase\", -exclude.","in":"query","name":"q","schema":{"type":"string"}},{"description":"all (default), web, images, videos, news, code, academic, community, shopping.","in":"query","name":"category","schema":{"default":"all","type":"string"}},{"description":"Only these providers (comma-separated ids from /api/v1/providers).","in":"query","name":"providers","schema":{"type":"string"}},{"description":"1-based page.","in":"query","name":"page","schema":{"default":1,"maximum":20,"minimum":1,"type":"integer"}},{"description":"day, week, month or year. Providers that can't filter by date are skipped.","in":"query","name":"time","schema":{"type":"string"}},{"description":"on (default) or off.","in":"query","name":"safe","schema":{"default":"on","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchResponse"}}},"description":"Results"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Error"},"429":{"description":"Rate limited (see Retry-After)"}},"security":[{},{"key":[]}],"summary":"Search"}},"/api/v1/status":{"get":{"responses":{"200":{"description":"OK"}},"summary":"Cache and provider health"}},"/api/v1/suggest":{"get":{"parameters":[{"description":"What's typed so far.","in":"query","name":"q","schema":{"type":"string"}}],"responses":{"200":{"description":"{ query, suggestions: [{ text, kind: history|suggestion }] }"}},"summary":"Suggestions while typing"}}},"servers":[{"url":"https://mercestack.com"}]}