{"info":{"title":"getctx","version":"1","description":"Content ingestion for agents and products. Authenticate with `Authorization: Bearer <getctx API key>`; every call is metered in credits per organization."},"servers":[{"url":"https://api.getctx.sh"}],"components":{"securitySchemes":{"apiKey":{"type":"http","scheme":"bearer"}}},"security":[{"apiKey":[]}],"openapi":"3.1.1","paths":{"/v1/web/search":{"post":{"operationId":"web.search","summary":"Search the open web with agent-readable excerpts","tags":["web"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"query":{"type":"string","pattern":"\\S","maxLength":2000},"type":{"enum":["code","news","company","people","paper"],"type":"string"},"num":{"type":"integer","minimum":1,"maximum":100,"default":10},"domain":{"type":"array","items":{"type":"string"},"default":[]},"exclude":{"type":"array","items":{"type":"string"},"default":[]},"since":{"type":"string"},"text":{"type":"boolean","default":false},"maxCredits":{"type":"integer","minimum":0},"fresh":{"type":"boolean","default":false}},"required":["query","maxCredits"],"$schema":"http://json-schema.org/draft-07/schema#"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"text":{"type":"string"},"diagnostics":{"type":"array","items":{"type":"string"}},"charged":{"type":"integer","minimum":0},"cached":{"type":"boolean"},"ref":{"type":"string"}},"required":["text","diagnostics","charged","cached","ref"],"$schema":"http://json-schema.org/draft-07/schema#"}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_request"},"status":{"const":400},"message":{"type":"string","default":"Invalid web request; change the input; nothing was charged"},"data":{"type":"object","properties":{"reason":{"type":"string"},"field":{"type":"string"}},"required":["reason"],"$schema":"http://json-schema.org/draft-07/schema#"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"unauthorized"},"status":{"const":401},"message":{"type":"string","default":"Missing, unknown or revoked API key"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"402":{"description":"402","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"insufficient_credits"},"status":{"const":402},"message":{"type":"string","default":"Not enough credits"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"not_found"},"status":{"const":404},"message":{"type":"string","default":"Web job not found"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"price_changed"},"status":{"const":409},"message":{"type":"string","default":"The accepted credit limit is too low"},"data":{"type":"object","properties":{"credits":{"type":"integer","minimum":0}},"required":["credits"],"$schema":"http://json-schema.org/draft-07/schema#"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"limit_reached"},"status":{"const":409},"message":{"type":"string","default":"The organization keeps the most it may; delete one first"},"data":{"type":"object","properties":{"limit":{"type":"number"}},"required":["limit"],"$schema":"http://json-schema.org/draft-07/schema#"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"target_failed"},"status":{"const":422},"message":{"type":"string","default":"The target page could not be loaded or answered an error status; check the URL; nothing was charged"},"data":{"type":"object","properties":{"reason":{"type":"string"},"httpStatus":{"type":"number"}},"required":["reason"],"$schema":"http://json-schema.org/draft-07/schema#"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"rate_limited"},"status":{"const":429},"message":{"type":"string","default":"Too many requests"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"502":{"description":"502","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"provider_unavailable"},"status":{"const":502},"message":{"type":"string","default":"The web provider is unavailable; retry; nothing was charged"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/v1/web/links":{"post":{"operationId":"web.links","summary":"Extract an agent-readable link map","tags":["web"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","format":"uri","pattern":"^https?:\\/\\/"},"render":{"type":"object","properties":{"gotoOptions":{"type":"object","properties":{"waitUntil":{"anyOf":[{"enum":["load","domcontentloaded","networkidle0","networkidle2"],"type":"string"},{"type":"array","items":{"enum":["load","domcontentloaded","networkidle0","networkidle2"],"type":"string"}}]},"timeout":{"type":"integer","minimum":0,"maximum":30000},"referer":{"type":"string","maxLength":2048}},"required":[],"additionalProperties":false},"waitForSelector":{"type":"object","properties":{"selector":{"type":"string","maxLength":500},"visible":{"const":true},"hidden":{"const":true},"timeout":{"type":"integer","minimum":0,"maximum":15000}},"required":["selector"],"additionalProperties":false},"waitForTimeout":{"type":"integer","minimum":0,"maximum":10000},"viewport":{"type":"object","properties":{"width":{"type":"integer","minimum":1,"maximum":4096},"height":{"type":"integer","minimum":1,"maximum":4096},"deviceScaleFactor":{"type":"number","minimum":0.1,"maximum":4},"isMobile":{"type":"boolean"},"isLandscape":{"type":"boolean"},"hasTouch":{"type":"boolean"}},"required":["width","height"],"additionalProperties":false},"userAgent":{"type":"string","maxLength":500},"emulateMediaType":{"enum":["screen","print"],"type":"string"},"setJavaScriptEnabled":{"type":"boolean"},"rejectResourceTypes":{"type":"array","items":{"enum":["document","stylesheet","image","media","font","script","texttrack","xhr","fetch","prefetch","eventsource","websocket","manifest","signedexchange","ping","cspviolationreport","preflight","other"],"type":"string"}},"rejectRequestPattern":{"type":"array","items":{"type":"string","maxLength":500},"maxItems":50},"bestAttempt":{"type":"boolean"}},"required":[],"additionalProperties":false},"credentials":{"type":"object","properties":{"headers":{"type":"object","propertyNames":{"type":"string","maxLength":256},"additionalProperties":{"type":"string","maxLength":8192}},"cookies":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","maxLength":256},"value":{"type":"string","maxLength":8192},"url":{"type":"string","maxLength":2048},"domain":{"type":"string","maxLength":256},"path":{"type":"string","maxLength":1024},"secure":{"type":"boolean"},"httpOnly":{"type":"boolean"},"sameSite":{"enum":["Strict","Lax","None"],"type":"string"}},"required":["name","value"],"additionalProperties":false},"maxItems":100},"authenticate":{"type":"object","properties":{"username":{"type":"string","maxLength":1024},"password":{"type":"string","maxLength":1024}},"required":["username","password"],"additionalProperties":false}},"required":[],"additionalProperties":false},"maxCredits":{"type":"integer","minimum":0},"fresh":{"type":"boolean","default":false},"visibleOnly":{"type":"boolean","default":false},"internalOnly":{"type":"boolean","default":false}},"required":["url","maxCredits"],"$schema":"http://json-schema.org/draft-07/schema#"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"text":{"type":"string"},"diagnostics":{"type":"array","items":{"type":"string"}},"charged":{"type":"integer","minimum":0},"cached":{"type":"boolean"},"ref":{"type":"string"}},"required":["text","diagnostics","charged","cached","ref"],"$schema":"http://json-schema.org/draft-07/schema#"}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_request"},"status":{"const":400},"message":{"type":"string","default":"Invalid web request; change the input; nothing was charged"},"data":{"type":"object","properties":{"reason":{"type":"string"},"field":{"type":"string"}},"required":["reason"],"$schema":"http://json-schema.org/draft-07/schema#"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"unauthorized"},"status":{"const":401},"message":{"type":"string","default":"Missing, unknown or revoked API key"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"402":{"description":"402","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"insufficient_credits"},"status":{"const":402},"message":{"type":"string","default":"Not enough credits"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"not_found"},"status":{"const":404},"message":{"type":"string","default":"Web job not found"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"price_changed"},"status":{"const":409},"message":{"type":"string","default":"The accepted credit limit is too low"},"data":{"type":"object","properties":{"credits":{"type":"integer","minimum":0}},"required":["credits"],"$schema":"http://json-schema.org/draft-07/schema#"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"limit_reached"},"status":{"const":409},"message":{"type":"string","default":"The organization keeps the most it may; delete one first"},"data":{"type":"object","properties":{"limit":{"type":"number"}},"required":["limit"],"$schema":"http://json-schema.org/draft-07/schema#"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"target_failed"},"status":{"const":422},"message":{"type":"string","default":"The target page could not be loaded or answered an error status; check the URL; nothing was charged"},"data":{"type":"object","properties":{"reason":{"type":"string"},"httpStatus":{"type":"number"}},"required":["reason"],"$schema":"http://json-schema.org/draft-07/schema#"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"rate_limited"},"status":{"const":429},"message":{"type":"string","default":"Too many requests"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"502":{"description":"502","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"provider_unavailable"},"status":{"const":502},"message":{"type":"string","default":"The web provider is unavailable; retry; nothing was charged"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/v1/web/scrape":{"post":{"operationId":"web.scrape","summary":"Extract and clean elements selected by CSS","tags":["web"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","format":"uri","pattern":"^https?:\\/\\/"},"render":{"type":"object","properties":{"gotoOptions":{"type":"object","properties":{"waitUntil":{"anyOf":[{"enum":["load","domcontentloaded","networkidle0","networkidle2"],"type":"string"},{"type":"array","items":{"enum":["load","domcontentloaded","networkidle0","networkidle2"],"type":"string"}}]},"timeout":{"type":"integer","minimum":0,"maximum":30000},"referer":{"type":"string","maxLength":2048}},"required":[],"additionalProperties":false},"waitForSelector":{"type":"object","properties":{"selector":{"type":"string","maxLength":500},"visible":{"const":true},"hidden":{"const":true},"timeout":{"type":"integer","minimum":0,"maximum":15000}},"required":["selector"],"additionalProperties":false},"waitForTimeout":{"type":"integer","minimum":0,"maximum":10000},"viewport":{"type":"object","properties":{"width":{"type":"integer","minimum":1,"maximum":4096},"height":{"type":"integer","minimum":1,"maximum":4096},"deviceScaleFactor":{"type":"number","minimum":0.1,"maximum":4},"isMobile":{"type":"boolean"},"isLandscape":{"type":"boolean"},"hasTouch":{"type":"boolean"}},"required":["width","height"],"additionalProperties":false},"userAgent":{"type":"string","maxLength":500},"emulateMediaType":{"enum":["screen","print"],"type":"string"},"setJavaScriptEnabled":{"type":"boolean"},"rejectResourceTypes":{"type":"array","items":{"enum":["document","stylesheet","image","media","font","script","texttrack","xhr","fetch","prefetch","eventsource","websocket","manifest","signedexchange","ping","cspviolationreport","preflight","other"],"type":"string"}},"rejectRequestPattern":{"type":"array","items":{"type":"string","maxLength":500},"maxItems":50},"bestAttempt":{"type":"boolean"}},"required":[],"additionalProperties":false},"credentials":{"type":"object","properties":{"headers":{"type":"object","propertyNames":{"type":"string","maxLength":256},"additionalProperties":{"type":"string","maxLength":8192}},"cookies":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","maxLength":256},"value":{"type":"string","maxLength":8192},"url":{"type":"string","maxLength":2048},"domain":{"type":"string","maxLength":256},"path":{"type":"string","maxLength":1024},"secure":{"type":"boolean"},"httpOnly":{"type":"boolean"},"sameSite":{"enum":["Strict","Lax","None"],"type":"string"}},"required":["name","value"],"additionalProperties":false},"maxItems":100},"authenticate":{"type":"object","properties":{"username":{"type":"string","maxLength":1024},"password":{"type":"string","maxLength":1024}},"required":["username","password"],"additionalProperties":false}},"required":[],"additionalProperties":false},"maxCredits":{"type":"integer","minimum":0},"fresh":{"type":"boolean","default":false},"selector":{"type":"array","items":{"type":"string","minLength":1,"maxLength":500},"minItems":1,"maxItems":20},"textOnly":{"type":"boolean","default":false},"raw":{"type":"boolean","default":false}},"required":["url","maxCredits","selector"],"$schema":"http://json-schema.org/draft-07/schema#"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"text":{"type":"string"},"diagnostics":{"type":"array","items":{"type":"string"}},"charged":{"type":"integer","minimum":0},"cached":{"type":"boolean"},"ref":{"type":"string"}},"required":["text","diagnostics","charged","cached","ref"],"$schema":"http://json-schema.org/draft-07/schema#"}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_request"},"status":{"const":400},"message":{"type":"string","default":"Invalid web request; change the input; nothing was charged"},"data":{"type":"object","properties":{"reason":{"type":"string"},"field":{"type":"string"}},"required":["reason"],"$schema":"http://json-schema.org/draft-07/schema#"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"unauthorized"},"status":{"const":401},"message":{"type":"string","default":"Missing, unknown or revoked API key"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"402":{"description":"402","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"insufficient_credits"},"status":{"const":402},"message":{"type":"string","default":"Not enough credits"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"not_found"},"status":{"const":404},"message":{"type":"string","default":"Web job not found"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"price_changed"},"status":{"const":409},"message":{"type":"string","default":"The accepted credit limit is too low"},"data":{"type":"object","properties":{"credits":{"type":"integer","minimum":0}},"required":["credits"],"$schema":"http://json-schema.org/draft-07/schema#"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"limit_reached"},"status":{"const":409},"message":{"type":"string","default":"The organization keeps the most it may; delete one first"},"data":{"type":"object","properties":{"limit":{"type":"number"}},"required":["limit"],"$schema":"http://json-schema.org/draft-07/schema#"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"target_failed"},"status":{"const":422},"message":{"type":"string","default":"The target page could not be loaded or answered an error status; check the URL; nothing was charged"},"data":{"type":"object","properties":{"reason":{"type":"string"},"httpStatus":{"type":"number"}},"required":["reason"],"$schema":"http://json-schema.org/draft-07/schema#"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"rate_limited"},"status":{"const":429},"message":{"type":"string","default":"Too many requests"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"502":{"description":"502","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"provider_unavailable"},"status":{"const":502},"message":{"type":"string","default":"The web provider is unavailable; retry; nothing was charged"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/v1/web/screenshot":{"post":{"operationId":"web.screenshot","summary":"Capture screenshots optimized for agent vision","tags":["web"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","format":"uri","pattern":"^https?:\\/\\/"},"render":{"type":"object","properties":{"gotoOptions":{"type":"object","properties":{"waitUntil":{"anyOf":[{"enum":["load","domcontentloaded","networkidle0","networkidle2"],"type":"string"},{"type":"array","items":{"enum":["load","domcontentloaded","networkidle0","networkidle2"],"type":"string"}}]},"timeout":{"type":"integer","minimum":0,"maximum":30000},"referer":{"type":"string","maxLength":2048}},"required":[],"additionalProperties":false},"waitForSelector":{"type":"object","properties":{"selector":{"type":"string","maxLength":500},"visible":{"const":true},"hidden":{"const":true},"timeout":{"type":"integer","minimum":0,"maximum":15000}},"required":["selector"],"additionalProperties":false},"waitForTimeout":{"type":"integer","minimum":0,"maximum":10000},"viewport":{"type":"object","properties":{"width":{"type":"integer","minimum":1,"maximum":4096},"height":{"type":"integer","minimum":1,"maximum":4096},"deviceScaleFactor":{"type":"number","minimum":0.1,"maximum":4},"isMobile":{"type":"boolean"},"isLandscape":{"type":"boolean"},"hasTouch":{"type":"boolean"}},"required":["width","height"],"additionalProperties":false},"userAgent":{"type":"string","maxLength":500},"emulateMediaType":{"enum":["screen","print"],"type":"string"},"setJavaScriptEnabled":{"type":"boolean"},"rejectResourceTypes":{"type":"array","items":{"enum":["document","stylesheet","image","media","font","script","texttrack","xhr","fetch","prefetch","eventsource","websocket","manifest","signedexchange","ping","cspviolationreport","preflight","other"],"type":"string"}},"rejectRequestPattern":{"type":"array","items":{"type":"string","maxLength":500},"maxItems":50},"bestAttempt":{"type":"boolean"}},"required":[],"additionalProperties":false},"credentials":{"type":"object","properties":{"headers":{"type":"object","propertyNames":{"type":"string","maxLength":256},"additionalProperties":{"type":"string","maxLength":8192}},"cookies":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","maxLength":256},"value":{"type":"string","maxLength":8192},"url":{"type":"string","maxLength":2048},"domain":{"type":"string","maxLength":256},"path":{"type":"string","maxLength":1024},"secure":{"type":"boolean"},"httpOnly":{"type":"boolean"},"sameSite":{"enum":["Strict","Lax","None"],"type":"string"}},"required":["name","value"],"additionalProperties":false},"maxItems":100},"authenticate":{"type":"object","properties":{"username":{"type":"string","maxLength":1024},"password":{"type":"string","maxLength":1024}},"required":["username","password"],"additionalProperties":false}},"required":[],"additionalProperties":false},"maxCredits":{"type":"integer","minimum":0},"fresh":{"type":"boolean","default":false},"selector":{"type":"string"},"fullPage":{"type":"boolean","default":false},"scroll":{"type":"integer","minimum":0,"default":0}},"required":["url","maxCredits"],"$schema":"http://json-schema.org/draft-07/schema#"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"text":{"type":"string"},"diagnostics":{"type":"array","items":{"type":"string"}},"charged":{"type":"integer","minimum":0},"cached":{"type":"boolean"},"ref":{"type":"string"},"assets":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string"},"width":{"type":"number"},"height":{"type":"number"}},"required":["url","width","height"]}}},"required":["text","diagnostics","charged","cached","ref","assets"],"$schema":"http://json-schema.org/draft-07/schema#"}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_request"},"status":{"const":400},"message":{"type":"string","default":"Invalid web request; change the input; nothing was charged"},"data":{"type":"object","properties":{"reason":{"type":"string"},"field":{"type":"string"}},"required":["reason"],"$schema":"http://json-schema.org/draft-07/schema#"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"unauthorized"},"status":{"const":401},"message":{"type":"string","default":"Missing, unknown or revoked API key"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"402":{"description":"402","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"insufficient_credits"},"status":{"const":402},"message":{"type":"string","default":"Not enough credits"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"not_found"},"status":{"const":404},"message":{"type":"string","default":"Web job not found"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"price_changed"},"status":{"const":409},"message":{"type":"string","default":"The accepted credit limit is too low"},"data":{"type":"object","properties":{"credits":{"type":"integer","minimum":0}},"required":["credits"],"$schema":"http://json-schema.org/draft-07/schema#"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"limit_reached"},"status":{"const":409},"message":{"type":"string","default":"The organization keeps the most it may; delete one first"},"data":{"type":"object","properties":{"limit":{"type":"number"}},"required":["limit"],"$schema":"http://json-schema.org/draft-07/schema#"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"target_failed"},"status":{"const":422},"message":{"type":"string","default":"The target page could not be loaded or answered an error status; check the URL; nothing was charged"},"data":{"type":"object","properties":{"reason":{"type":"string"},"httpStatus":{"type":"number"}},"required":["reason"],"$schema":"http://json-schema.org/draft-07/schema#"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"rate_limited"},"status":{"const":429},"message":{"type":"string","default":"Too many requests"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"502":{"description":"502","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"provider_unavailable"},"status":{"const":502},"message":{"type":"string","default":"The web provider is unavailable; retry; nothing was charged"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/v1/web/json":{"post":{"operationId":"web.json","summary":"Extract schema-validated JSON from a web page","tags":["web"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","format":"uri","pattern":"^https?:\\/\\/"},"render":{"type":"object","properties":{"gotoOptions":{"type":"object","properties":{"waitUntil":{"anyOf":[{"enum":["load","domcontentloaded","networkidle0","networkidle2"],"type":"string"},{"type":"array","items":{"enum":["load","domcontentloaded","networkidle0","networkidle2"],"type":"string"}}]},"timeout":{"type":"integer","minimum":0,"maximum":30000},"referer":{"type":"string","maxLength":2048}},"required":[],"additionalProperties":false},"waitForSelector":{"type":"object","properties":{"selector":{"type":"string","maxLength":500},"visible":{"const":true},"hidden":{"const":true},"timeout":{"type":"integer","minimum":0,"maximum":15000}},"required":["selector"],"additionalProperties":false},"waitForTimeout":{"type":"integer","minimum":0,"maximum":10000},"viewport":{"type":"object","properties":{"width":{"type":"integer","minimum":1,"maximum":4096},"height":{"type":"integer","minimum":1,"maximum":4096},"deviceScaleFactor":{"type":"number","minimum":0.1,"maximum":4},"isMobile":{"type":"boolean"},"isLandscape":{"type":"boolean"},"hasTouch":{"type":"boolean"}},"required":["width","height"],"additionalProperties":false},"userAgent":{"type":"string","maxLength":500},"emulateMediaType":{"enum":["screen","print"],"type":"string"},"setJavaScriptEnabled":{"type":"boolean"},"rejectResourceTypes":{"type":"array","items":{"enum":["document","stylesheet","image","media","font","script","texttrack","xhr","fetch","prefetch","eventsource","websocket","manifest","signedexchange","ping","cspviolationreport","preflight","other"],"type":"string"}},"rejectRequestPattern":{"type":"array","items":{"type":"string","maxLength":500},"maxItems":50},"bestAttempt":{"type":"boolean"}},"required":[],"additionalProperties":false},"credentials":{"type":"object","properties":{"headers":{"type":"object","propertyNames":{"type":"string","maxLength":256},"additionalProperties":{"type":"string","maxLength":8192}},"cookies":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","maxLength":256},"value":{"type":"string","maxLength":8192},"url":{"type":"string","maxLength":2048},"domain":{"type":"string","maxLength":256},"path":{"type":"string","maxLength":1024},"secure":{"type":"boolean"},"httpOnly":{"type":"boolean"},"sameSite":{"enum":["Strict","Lax","None"],"type":"string"}},"required":["name","value"],"additionalProperties":false},"maxItems":100},"authenticate":{"type":"object","properties":{"username":{"type":"string","maxLength":1024},"password":{"type":"string","maxLength":1024}},"required":["username","password"],"additionalProperties":false}},"required":[],"additionalProperties":false},"maxCredits":{"type":"integer","minimum":0},"fresh":{"type":"boolean","default":false},"prompt":{"type":"string","minLength":1,"maxLength":4000},"schema":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"default":{"type":"object"}}},"required":["url","maxCredits","prompt"],"$schema":"http://json-schema.org/draft-07/schema#"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"text":{"type":"string"},"diagnostics":{"type":"array","items":{"type":"string"}},"charged":{"type":"integer","minimum":0},"cached":{"type":"boolean"},"ref":{"type":"string"},"data":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["text","diagnostics","charged","cached","ref","data"],"$schema":"http://json-schema.org/draft-07/schema#"}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_request"},"status":{"const":400},"message":{"type":"string","default":"Invalid web request; change the input; nothing was charged"},"data":{"type":"object","properties":{"reason":{"type":"string"},"field":{"type":"string"}},"required":["reason"],"$schema":"http://json-schema.org/draft-07/schema#"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"unauthorized"},"status":{"const":401},"message":{"type":"string","default":"Missing, unknown or revoked API key"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"402":{"description":"402","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"insufficient_credits"},"status":{"const":402},"message":{"type":"string","default":"Not enough credits"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"not_found"},"status":{"const":404},"message":{"type":"string","default":"Web job not found"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"price_changed"},"status":{"const":409},"message":{"type":"string","default":"The accepted credit limit is too low"},"data":{"type":"object","properties":{"credits":{"type":"integer","minimum":0}},"required":["credits"],"$schema":"http://json-schema.org/draft-07/schema#"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"limit_reached"},"status":{"const":409},"message":{"type":"string","default":"The organization keeps the most it may; delete one first"},"data":{"type":"object","properties":{"limit":{"type":"number"}},"required":["limit"],"$schema":"http://json-schema.org/draft-07/schema#"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"target_failed"},"status":{"const":422},"message":{"type":"string","default":"The target page could not be loaded or answered an error status; check the URL; nothing was charged"},"data":{"type":"object","properties":{"reason":{"type":"string"},"httpStatus":{"type":"number"}},"required":["reason"],"$schema":"http://json-schema.org/draft-07/schema#"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"rate_limited"},"status":{"const":429},"message":{"type":"string","default":"Too many requests"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"502":{"description":"502","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"provider_unavailable"},"status":{"const":502},"message":{"type":"string","default":"The web provider is unavailable; retry; nothing was charged"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/v1/web/crawl":{"post":{"operationId":"web.crawl.start","tags":["web"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","format":"uri","pattern":"^https?:\\/\\/"},"limit":{"type":"integer","minimum":1,"maximum":100,"default":10},"depth":{"type":"integer","minimum":1,"maximum":10,"default":1},"include":{"type":"array","items":{"type":"string"},"default":[]},"exclude":{"type":"array","items":{"type":"string"},"default":[]},"maxCredits":{"type":"integer","minimum":0}},"required":["url","maxCredits"],"$schema":"http://json-schema.org/draft-07/schema#"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"jobId":{"type":"string","format":"uuid"},"reserved":{"type":"integer","minimum":0}},"required":["jobId","reserved"],"$schema":"http://json-schema.org/draft-07/schema#"}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_request"},"status":{"const":400},"message":{"type":"string","default":"Invalid web request; change the input; nothing was charged"},"data":{"type":"object","properties":{"reason":{"type":"string"},"field":{"type":"string"}},"required":["reason"],"$schema":"http://json-schema.org/draft-07/schema#"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"unauthorized"},"status":{"const":401},"message":{"type":"string","default":"Missing, unknown or revoked API key"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"402":{"description":"402","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"insufficient_credits"},"status":{"const":402},"message":{"type":"string","default":"Not enough credits"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"not_found"},"status":{"const":404},"message":{"type":"string","default":"Web job not found"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"price_changed"},"status":{"const":409},"message":{"type":"string","default":"The accepted credit limit is too low"},"data":{"type":"object","properties":{"credits":{"type":"integer","minimum":0}},"required":["credits"],"$schema":"http://json-schema.org/draft-07/schema#"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"limit_reached"},"status":{"const":409},"message":{"type":"string","default":"The organization keeps the most it may; delete one first"},"data":{"type":"object","properties":{"limit":{"type":"number"}},"required":["limit"],"$schema":"http://json-schema.org/draft-07/schema#"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"target_failed"},"status":{"const":422},"message":{"type":"string","default":"The target page could not be loaded or answered an error status; check the URL; nothing was charged"},"data":{"type":"object","properties":{"reason":{"type":"string"},"httpStatus":{"type":"number"}},"required":["reason"],"$schema":"http://json-schema.org/draft-07/schema#"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"rate_limited"},"status":{"const":429},"message":{"type":"string","default":"Too many requests"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"502":{"description":"502","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"provider_unavailable"},"status":{"const":502},"message":{"type":"string","default":"The web provider is unavailable; retry; nothing was charged"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/v1/web/crawl/{jobId}":{"get":{"operationId":"web.crawl.status","tags":["web"],"parameters":[{"name":"jobId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"cursor","in":"query","schema":{"type":"string","default":""},"allowEmptyValue":true,"allowReserved":true},{"name":"status","in":"query","schema":{"enum":["completed","errored","queued","dropped","skipped","disallowed","cancelled"],"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"limit","in":"query","schema":{"anyOf":[{"type":"number"},{"type":"string"}],"type":"integer","minimum":1,"maximum":100,"default":10},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"text":{"type":"string"},"diagnostics":{"type":"array","items":{"type":"string"}},"job":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"status":{"type":"string"},"total":{"type":"integer","minimum":0},"finished":{"type":"integer","minimum":0},"counts":{"type":"object","properties":{"completed":{"type":"integer","minimum":0},"errored":{"type":"integer","minimum":0},"queued":{"type":"integer","minimum":0},"dropped":{"type":"integer","minimum":0},"skipped":{"type":"integer","minimum":0},"disallowed":{"type":"integer","minimum":0},"cancelled":{"type":"integer","minimum":0}},"required":["completed","errored","queued","dropped","skipped","disallowed","cancelled"]},"cursor":{"type":"string"},"browser_seconds_used":{"type":"number"},"pages":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string"},"status":{"enum":["completed","errored","queued","dropped","skipped","disallowed","cancelled"],"type":"string"},"markdown":{"type":"string"},"metadata":{"type":"object","properties":{"url":{"type":"string"},"title":{"type":"string"},"http_status":{"type":"number"}},"required":[]}},"required":["url","status","metadata"]}},"charged":{"type":"integer","minimum":0},"reserved":{"type":"integer","minimum":0}},"required":["id","status","total","finished","counts","pages","charged","reserved"]}},"required":["text","diagnostics","job"],"$schema":"http://json-schema.org/draft-07/schema#"}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_request"},"status":{"const":400},"message":{"type":"string","default":"Invalid web request; change the input; nothing was charged"},"data":{"type":"object","properties":{"reason":{"type":"string"},"field":{"type":"string"}},"required":["reason"],"$schema":"http://json-schema.org/draft-07/schema#"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"unauthorized"},"status":{"const":401},"message":{"type":"string","default":"Missing, unknown or revoked API key"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"402":{"description":"402","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"insufficient_credits"},"status":{"const":402},"message":{"type":"string","default":"Not enough credits"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"not_found"},"status":{"const":404},"message":{"type":"string","default":"Web job not found"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"price_changed"},"status":{"const":409},"message":{"type":"string","default":"The accepted credit limit is too low"},"data":{"type":"object","properties":{"credits":{"type":"integer","minimum":0}},"required":["credits"],"$schema":"http://json-schema.org/draft-07/schema#"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"limit_reached"},"status":{"const":409},"message":{"type":"string","default":"The organization keeps the most it may; delete one first"},"data":{"type":"object","properties":{"limit":{"type":"number"}},"required":["limit"],"$schema":"http://json-schema.org/draft-07/schema#"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"target_failed"},"status":{"const":422},"message":{"type":"string","default":"The target page could not be loaded or answered an error status; check the URL; nothing was charged"},"data":{"type":"object","properties":{"reason":{"type":"string"},"httpStatus":{"type":"number"}},"required":["reason"],"$schema":"http://json-schema.org/draft-07/schema#"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"rate_limited"},"status":{"const":429},"message":{"type":"string","default":"Too many requests"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"502":{"description":"502","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"provider_unavailable"},"status":{"const":502},"message":{"type":"string","default":"The web provider is unavailable; retry; nothing was charged"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}},"delete":{"operationId":"web.crawl.cancel","tags":["web"],"parameters":[{"name":"jobId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"jobId":{"type":"string","format":"uuid"},"status":{"type":"string"}},"required":["jobId","status"],"$schema":"http://json-schema.org/draft-07/schema#"}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_request"},"status":{"const":400},"message":{"type":"string","default":"Invalid web request; change the input; nothing was charged"},"data":{"type":"object","properties":{"reason":{"type":"string"},"field":{"type":"string"}},"required":["reason"],"$schema":"http://json-schema.org/draft-07/schema#"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"unauthorized"},"status":{"const":401},"message":{"type":"string","default":"Missing, unknown or revoked API key"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"402":{"description":"402","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"insufficient_credits"},"status":{"const":402},"message":{"type":"string","default":"Not enough credits"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"not_found"},"status":{"const":404},"message":{"type":"string","default":"Web job not found"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"price_changed"},"status":{"const":409},"message":{"type":"string","default":"The accepted credit limit is too low"},"data":{"type":"object","properties":{"credits":{"type":"integer","minimum":0}},"required":["credits"],"$schema":"http://json-schema.org/draft-07/schema#"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"limit_reached"},"status":{"const":409},"message":{"type":"string","default":"The organization keeps the most it may; delete one first"},"data":{"type":"object","properties":{"limit":{"type":"number"}},"required":["limit"],"$schema":"http://json-schema.org/draft-07/schema#"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"target_failed"},"status":{"const":422},"message":{"type":"string","default":"The target page could not be loaded or answered an error status; check the URL; nothing was charged"},"data":{"type":"object","properties":{"reason":{"type":"string"},"httpStatus":{"type":"number"}},"required":["reason"],"$schema":"http://json-schema.org/draft-07/schema#"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"rate_limited"},"status":{"const":429},"message":{"type":"string","default":"Too many requests"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"502":{"description":"502","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"provider_unavailable"},"status":{"const":502},"message":{"type":"string","default":"The web provider is unavailable; retry; nothing was charged"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/v1/web/crawl/{jobId}/export":{"get":{"operationId":"web.crawl.export","tags":["web"],"parameters":[{"name":"jobId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"format","in":"query","schema":{"enum":["markdown","json"],"type":"string","default":"markdown"},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"text":{"type":"string"},"diagnostics":{"type":"array","items":{"type":"string"}}},"required":["text","diagnostics"],"$schema":"http://json-schema.org/draft-07/schema#"}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_request"},"status":{"const":400},"message":{"type":"string","default":"Invalid web request; change the input; nothing was charged"},"data":{"type":"object","properties":{"reason":{"type":"string"},"field":{"type":"string"}},"required":["reason"],"$schema":"http://json-schema.org/draft-07/schema#"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"unauthorized"},"status":{"const":401},"message":{"type":"string","default":"Missing, unknown or revoked API key"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"402":{"description":"402","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"insufficient_credits"},"status":{"const":402},"message":{"type":"string","default":"Not enough credits"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"not_found"},"status":{"const":404},"message":{"type":"string","default":"Web job not found"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"price_changed"},"status":{"const":409},"message":{"type":"string","default":"The accepted credit limit is too low"},"data":{"type":"object","properties":{"credits":{"type":"integer","minimum":0}},"required":["credits"],"$schema":"http://json-schema.org/draft-07/schema#"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"limit_reached"},"status":{"const":409},"message":{"type":"string","default":"The organization keeps the most it may; delete one first"},"data":{"type":"object","properties":{"limit":{"type":"number"}},"required":["limit"],"$schema":"http://json-schema.org/draft-07/schema#"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"target_failed"},"status":{"const":422},"message":{"type":"string","default":"The target page could not be loaded or answered an error status; check the URL; nothing was charged"},"data":{"type":"object","properties":{"reason":{"type":"string"},"httpStatus":{"type":"number"}},"required":["reason"],"$schema":"http://json-schema.org/draft-07/schema#"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"rate_limited"},"status":{"const":429},"message":{"type":"string","default":"Too many requests"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"502":{"description":"502","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"provider_unavailable"},"status":{"const":502},"message":{"type":"string","default":"The web provider is unavailable; retry; nothing was charged"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/v1/web/watches":{"post":{"operationId":"web.watches.create","summary":"Watch a page: check it now, then on a schedule","description":"Creates a Page Watch and runs its first check (the baseline, `new`) at once, charged like any check; if that check fails nothing is created or charged. getctx then checks the page every `intervalMinutes` (at least 15; default a day), each check charged to the organization, and records each `new`, `changed` or `removed` as an event, POSTed to `webhook.url` when set. What it observes (`url`, `selector`, `render`, `credentials`) never changes: watch something else with a new watch. An organization keeps at most 200 watches.","tags":["web"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","format":"uri","pattern":"^https?:\\/\\/"},"render":{"type":"object","properties":{"gotoOptions":{"type":"object","properties":{"waitUntil":{"anyOf":[{"enum":["load","domcontentloaded","networkidle0","networkidle2"],"type":"string"},{"type":"array","items":{"enum":["load","domcontentloaded","networkidle0","networkidle2"],"type":"string"}}]},"timeout":{"type":"integer","minimum":0,"maximum":30000},"referer":{"type":"string","maxLength":2048}},"required":[],"additionalProperties":false},"waitForSelector":{"type":"object","properties":{"selector":{"type":"string","maxLength":500},"visible":{"const":true},"hidden":{"const":true},"timeout":{"type":"integer","minimum":0,"maximum":15000}},"required":["selector"],"additionalProperties":false},"waitForTimeout":{"type":"integer","minimum":0,"maximum":10000},"viewport":{"type":"object","properties":{"width":{"type":"integer","minimum":1,"maximum":4096},"height":{"type":"integer","minimum":1,"maximum":4096},"deviceScaleFactor":{"type":"number","minimum":0.1,"maximum":4},"isMobile":{"type":"boolean"},"isLandscape":{"type":"boolean"},"hasTouch":{"type":"boolean"}},"required":["width","height"],"additionalProperties":false},"userAgent":{"type":"string","maxLength":500},"emulateMediaType":{"enum":["screen","print"],"type":"string"},"setJavaScriptEnabled":{"type":"boolean"},"rejectResourceTypes":{"type":"array","items":{"enum":["document","stylesheet","image","media","font","script","texttrack","xhr","fetch","prefetch","eventsource","websocket","manifest","signedexchange","ping","cspviolationreport","preflight","other"],"type":"string"}},"rejectRequestPattern":{"type":"array","items":{"type":"string","maxLength":500},"maxItems":50},"bestAttempt":{"type":"boolean"}},"required":[],"additionalProperties":false},"credentials":{"type":"object","properties":{"headers":{"type":"object","propertyNames":{"type":"string","maxLength":256},"additionalProperties":{"type":"string","maxLength":8192}},"cookies":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","maxLength":256},"value":{"type":"string","maxLength":8192},"url":{"type":"string","maxLength":2048},"domain":{"type":"string","maxLength":256},"path":{"type":"string","maxLength":1024},"secure":{"type":"boolean"},"httpOnly":{"type":"boolean"},"sameSite":{"enum":["Strict","Lax","None"],"type":"string"}},"required":["name","value"],"additionalProperties":false},"maxItems":100},"authenticate":{"type":"object","properties":{"username":{"type":"string","maxLength":1024},"password":{"type":"string","maxLength":1024}},"required":["username","password"],"additionalProperties":false}},"required":[],"additionalProperties":false},"selector":{"type":"array","items":{"type":"string","minLength":1,"maxLength":500},"minItems":1,"maxItems":20},"intervalMinutes":{"type":"integer","minimum":15,"maximum":43200,"default":1440},"tag":{"type":"string","maxLength":200,"default":""},"webhook":{"type":"object","properties":{"url":{"type":"string","format":"uri","pattern":"^https:\\/\\/","maxLength":2048}},"required":["url"]},"maxCredits":{"type":"integer","minimum":0}},"required":["url","maxCredits"],"$schema":"http://json-schema.org/draft-07/schema#"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"watch":{"type":"object","properties":{"id":{"type":"string","pattern":"^watch_[0-9a-f]{32}$"},"url":{"type":"string"},"selector":{"anyOf":[{"type":"array","items":{"type":"string","minLength":1,"maxLength":500},"minItems":1,"maxItems":20},{"type":"null"}]},"render":{"anyOf":[{"type":"object","properties":{"gotoOptions":{"type":"object","properties":{"waitUntil":{"anyOf":[{"enum":["load","domcontentloaded","networkidle0","networkidle2"],"type":"string"},{"type":"array","items":{"enum":["load","domcontentloaded","networkidle0","networkidle2"],"type":"string"}}]},"timeout":{"type":"integer","minimum":0,"maximum":30000},"referer":{"type":"string","maxLength":2048}},"required":[],"additionalProperties":false},"waitForSelector":{"type":"object","properties":{"selector":{"type":"string","maxLength":500},"visible":{"const":true},"hidden":{"const":true},"timeout":{"type":"integer","minimum":0,"maximum":15000}},"required":["selector"],"additionalProperties":false},"waitForTimeout":{"type":"integer","minimum":0,"maximum":10000},"viewport":{"type":"object","properties":{"width":{"type":"integer","minimum":1,"maximum":4096},"height":{"type":"integer","minimum":1,"maximum":4096},"deviceScaleFactor":{"type":"number","minimum":0.1,"maximum":4},"isMobile":{"type":"boolean"},"isLandscape":{"type":"boolean"},"hasTouch":{"type":"boolean"}},"required":["width","height"],"additionalProperties":false},"userAgent":{"type":"string","maxLength":500},"emulateMediaType":{"enum":["screen","print"],"type":"string"},"setJavaScriptEnabled":{"type":"boolean"},"rejectResourceTypes":{"type":"array","items":{"enum":["document","stylesheet","image","media","font","script","texttrack","xhr","fetch","prefetch","eventsource","websocket","manifest","signedexchange","ping","cspviolationreport","preflight","other"],"type":"string"}},"rejectRequestPattern":{"type":"array","items":{"type":"string","maxLength":500},"maxItems":50},"bestAttempt":{"type":"boolean"}},"required":[],"additionalProperties":false},{"type":"null"}]},"credentials":{"type":"boolean"},"tag":{"type":"string"},"intervalMinutes":{"type":"number"},"webhook":{"anyOf":[{"type":"object","properties":{"url":{"type":"string","format":"uri","pattern":"^https:\\/\\/","maxLength":2048}},"required":["url"]},{"type":"null"}]},"status":{"enum":["active","paused"],"type":"string"},"pausedReason":{"anyOf":[{"enum":["requested","insufficient_credits","failing"],"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"lastCheckedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"nextCheckAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"failures":{"type":"number"},"lastEventSeq":{"type":"number"}},"required":["id","url","selector","render","credentials","tag","intervalMinutes","webhook","status","pausedReason","createdAt","lastCheckedAt","nextCheckAt","failures","lastEventSeq"]},"check":{"type":"object","properties":{"text":{"type":"string"},"diagnostics":{"type":"array","items":{"type":"string"}},"charged":{"type":"integer","minimum":0},"ref":{"type":"string"},"checkedAt":{"type":"string"},"previousCheckedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"id":{"type":"string","pattern":"^watch_[0-9a-f]{32}$"},"url":{"type":"string"},"status":{"enum":["new","same","changed","removed"],"type":"string"},"added":{"type":"integer","minimum":0},"removed":{"type":"integer","minimum":0},"diff":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["text","diagnostics","charged","ref","checkedAt","previousCheckedAt","id","url","status","added","removed","diff"]}},"required":["watch","check"],"$schema":"http://json-schema.org/draft-07/schema#"}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_request"},"status":{"const":400},"message":{"type":"string","default":"Invalid web request; change the input; nothing was charged"},"data":{"type":"object","properties":{"reason":{"type":"string"},"field":{"type":"string"}},"required":["reason"],"$schema":"http://json-schema.org/draft-07/schema#"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"unauthorized"},"status":{"const":401},"message":{"type":"string","default":"Missing, unknown or revoked API key"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"402":{"description":"402","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"insufficient_credits"},"status":{"const":402},"message":{"type":"string","default":"Not enough credits"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"not_found"},"status":{"const":404},"message":{"type":"string","default":"Web job not found"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"price_changed"},"status":{"const":409},"message":{"type":"string","default":"The accepted credit limit is too low"},"data":{"type":"object","properties":{"credits":{"type":"integer","minimum":0}},"required":["credits"],"$schema":"http://json-schema.org/draft-07/schema#"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"limit_reached"},"status":{"const":409},"message":{"type":"string","default":"The organization keeps the most it may; delete one first"},"data":{"type":"object","properties":{"limit":{"type":"number"}},"required":["limit"],"$schema":"http://json-schema.org/draft-07/schema#"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"target_failed"},"status":{"const":422},"message":{"type":"string","default":"The target page could not be loaded or answered an error status; check the URL; nothing was charged"},"data":{"type":"object","properties":{"reason":{"type":"string"},"httpStatus":{"type":"number"}},"required":["reason"],"$schema":"http://json-schema.org/draft-07/schema#"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"rate_limited"},"status":{"const":429},"message":{"type":"string","default":"Too many requests"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"502":{"description":"502","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"provider_unavailable"},"status":{"const":502},"message":{"type":"string","default":"The web provider is unavailable; retry; nothing was charged"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}},"get":{"operationId":"web.watches.list","tags":["web"],"parameters":[{"name":"tag","in":"query","required":false,"schema":{"type":"string","maxLength":200},"allowEmptyValue":true,"allowReserved":true},{"name":"limit","in":"query","required":false,"schema":{"anyOf":[{"type":"number"},{"type":"string"}],"type":"integer","minimum":1,"maximum":100,"default":50},"allowEmptyValue":true,"allowReserved":true},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","maxLength":200},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"tag":{"type":"string"},"subject":{"type":"string"},"status":{"enum":["active","paused"],"type":"string"},"intervalMinutes":{"type":"number"},"createdAt":{"type":"string"},"lastCheckedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","tag","subject","status","intervalMinutes","createdAt","lastCheckedAt"]}},"cursor":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["items","cursor"],"$schema":"http://json-schema.org/draft-07/schema#"}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_request"},"status":{"const":400},"message":{"type":"string","default":"Invalid web request; change the input; nothing was charged"},"data":{"type":"object","properties":{"reason":{"type":"string"},"field":{"type":"string"}},"required":["reason"],"$schema":"http://json-schema.org/draft-07/schema#"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"unauthorized"},"status":{"const":401},"message":{"type":"string","default":"Missing, unknown or revoked API key"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"402":{"description":"402","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"insufficient_credits"},"status":{"const":402},"message":{"type":"string","default":"Not enough credits"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"not_found"},"status":{"const":404},"message":{"type":"string","default":"Web job not found"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"price_changed"},"status":{"const":409},"message":{"type":"string","default":"The accepted credit limit is too low"},"data":{"type":"object","properties":{"credits":{"type":"integer","minimum":0}},"required":["credits"],"$schema":"http://json-schema.org/draft-07/schema#"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"limit_reached"},"status":{"const":409},"message":{"type":"string","default":"The organization keeps the most it may; delete one first"},"data":{"type":"object","properties":{"limit":{"type":"number"}},"required":["limit"],"$schema":"http://json-schema.org/draft-07/schema#"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"target_failed"},"status":{"const":422},"message":{"type":"string","default":"The target page could not be loaded or answered an error status; check the URL; nothing was charged"},"data":{"type":"object","properties":{"reason":{"type":"string"},"httpStatus":{"type":"number"}},"required":["reason"],"$schema":"http://json-schema.org/draft-07/schema#"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"rate_limited"},"status":{"const":429},"message":{"type":"string","default":"Too many requests"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"502":{"description":"502","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"provider_unavailable"},"status":{"const":502},"message":{"type":"string","default":"The web provider is unavailable; retry; nothing was charged"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/v1/web/watches/{id}":{"get":{"operationId":"web.watches.get","tags":["web"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^watch_[0-9a-f]{32}$"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","pattern":"^watch_[0-9a-f]{32}$"},"url":{"type":"string"},"selector":{"anyOf":[{"type":"array","items":{"type":"string","minLength":1,"maxLength":500},"minItems":1,"maxItems":20},{"type":"null"}]},"render":{"anyOf":[{"type":"object","properties":{"gotoOptions":{"type":"object","properties":{"waitUntil":{"anyOf":[{"enum":["load","domcontentloaded","networkidle0","networkidle2"],"type":"string"},{"type":"array","items":{"enum":["load","domcontentloaded","networkidle0","networkidle2"],"type":"string"}}]},"timeout":{"type":"integer","minimum":0,"maximum":30000},"referer":{"type":"string","maxLength":2048}},"required":[],"additionalProperties":false},"waitForSelector":{"type":"object","properties":{"selector":{"type":"string","maxLength":500},"visible":{"const":true},"hidden":{"const":true},"timeout":{"type":"integer","minimum":0,"maximum":15000}},"required":["selector"],"additionalProperties":false},"waitForTimeout":{"type":"integer","minimum":0,"maximum":10000},"viewport":{"type":"object","properties":{"width":{"type":"integer","minimum":1,"maximum":4096},"height":{"type":"integer","minimum":1,"maximum":4096},"deviceScaleFactor":{"type":"number","minimum":0.1,"maximum":4},"isMobile":{"type":"boolean"},"isLandscape":{"type":"boolean"},"hasTouch":{"type":"boolean"}},"required":["width","height"],"additionalProperties":false},"userAgent":{"type":"string","maxLength":500},"emulateMediaType":{"enum":["screen","print"],"type":"string"},"setJavaScriptEnabled":{"type":"boolean"},"rejectResourceTypes":{"type":"array","items":{"enum":["document","stylesheet","image","media","font","script","texttrack","xhr","fetch","prefetch","eventsource","websocket","manifest","signedexchange","ping","cspviolationreport","preflight","other"],"type":"string"}},"rejectRequestPattern":{"type":"array","items":{"type":"string","maxLength":500},"maxItems":50},"bestAttempt":{"type":"boolean"}},"required":[],"additionalProperties":false},{"type":"null"}]},"credentials":{"type":"boolean"},"tag":{"type":"string"},"intervalMinutes":{"type":"number"},"webhook":{"anyOf":[{"type":"object","properties":{"url":{"type":"string","format":"uri","pattern":"^https:\\/\\/","maxLength":2048}},"required":["url"]},{"type":"null"}]},"status":{"enum":["active","paused"],"type":"string"},"pausedReason":{"anyOf":[{"enum":["requested","insufficient_credits","failing"],"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"lastCheckedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"nextCheckAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"failures":{"type":"number"},"lastEventSeq":{"type":"number"}},"required":["id","url","selector","render","credentials","tag","intervalMinutes","webhook","status","pausedReason","createdAt","lastCheckedAt","nextCheckAt","failures","lastEventSeq"],"$schema":"http://json-schema.org/draft-07/schema#"}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_request"},"status":{"const":400},"message":{"type":"string","default":"Invalid web request; change the input; nothing was charged"},"data":{"type":"object","properties":{"reason":{"type":"string"},"field":{"type":"string"}},"required":["reason"],"$schema":"http://json-schema.org/draft-07/schema#"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"unauthorized"},"status":{"const":401},"message":{"type":"string","default":"Missing, unknown or revoked API key"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"402":{"description":"402","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"insufficient_credits"},"status":{"const":402},"message":{"type":"string","default":"Not enough credits"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"not_found"},"status":{"const":404},"message":{"type":"string","default":"Web job not found"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"price_changed"},"status":{"const":409},"message":{"type":"string","default":"The accepted credit limit is too low"},"data":{"type":"object","properties":{"credits":{"type":"integer","minimum":0}},"required":["credits"],"$schema":"http://json-schema.org/draft-07/schema#"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"limit_reached"},"status":{"const":409},"message":{"type":"string","default":"The organization keeps the most it may; delete one first"},"data":{"type":"object","properties":{"limit":{"type":"number"}},"required":["limit"],"$schema":"http://json-schema.org/draft-07/schema#"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"target_failed"},"status":{"const":422},"message":{"type":"string","default":"The target page could not be loaded or answered an error status; check the URL; nothing was charged"},"data":{"type":"object","properties":{"reason":{"type":"string"},"httpStatus":{"type":"number"}},"required":["reason"],"$schema":"http://json-schema.org/draft-07/schema#"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"rate_limited"},"status":{"const":429},"message":{"type":"string","default":"Too many requests"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"502":{"description":"502","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"provider_unavailable"},"status":{"const":502},"message":{"type":"string","default":"The web provider is unavailable; retry; nothing was charged"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}},"patch":{"operationId":"web.watches.update","summary":"Change a watch's schedule, webhook or tag, or pause it","tags":["web"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^watch_[0-9a-f]{32}$"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"intervalMinutes":{"type":"integer","minimum":15,"maximum":43200},"tag":{"type":"string","maxLength":200},"webhook":{"anyOf":[{"type":"object","properties":{"url":{"type":"string","format":"uri","pattern":"^https:\\/\\/","maxLength":2048}},"required":["url"]},{"type":"null"}]},"paused":{"type":"boolean"}},"$schema":"http://json-schema.org/draft-07/schema#"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","pattern":"^watch_[0-9a-f]{32}$"},"url":{"type":"string"},"selector":{"anyOf":[{"type":"array","items":{"type":"string","minLength":1,"maxLength":500},"minItems":1,"maxItems":20},{"type":"null"}]},"render":{"anyOf":[{"type":"object","properties":{"gotoOptions":{"type":"object","properties":{"waitUntil":{"anyOf":[{"enum":["load","domcontentloaded","networkidle0","networkidle2"],"type":"string"},{"type":"array","items":{"enum":["load","domcontentloaded","networkidle0","networkidle2"],"type":"string"}}]},"timeout":{"type":"integer","minimum":0,"maximum":30000},"referer":{"type":"string","maxLength":2048}},"required":[],"additionalProperties":false},"waitForSelector":{"type":"object","properties":{"selector":{"type":"string","maxLength":500},"visible":{"const":true},"hidden":{"const":true},"timeout":{"type":"integer","minimum":0,"maximum":15000}},"required":["selector"],"additionalProperties":false},"waitForTimeout":{"type":"integer","minimum":0,"maximum":10000},"viewport":{"type":"object","properties":{"width":{"type":"integer","minimum":1,"maximum":4096},"height":{"type":"integer","minimum":1,"maximum":4096},"deviceScaleFactor":{"type":"number","minimum":0.1,"maximum":4},"isMobile":{"type":"boolean"},"isLandscape":{"type":"boolean"},"hasTouch":{"type":"boolean"}},"required":["width","height"],"additionalProperties":false},"userAgent":{"type":"string","maxLength":500},"emulateMediaType":{"enum":["screen","print"],"type":"string"},"setJavaScriptEnabled":{"type":"boolean"},"rejectResourceTypes":{"type":"array","items":{"enum":["document","stylesheet","image","media","font","script","texttrack","xhr","fetch","prefetch","eventsource","websocket","manifest","signedexchange","ping","cspviolationreport","preflight","other"],"type":"string"}},"rejectRequestPattern":{"type":"array","items":{"type":"string","maxLength":500},"maxItems":50},"bestAttempt":{"type":"boolean"}},"required":[],"additionalProperties":false},{"type":"null"}]},"credentials":{"type":"boolean"},"tag":{"type":"string"},"intervalMinutes":{"type":"number"},"webhook":{"anyOf":[{"type":"object","properties":{"url":{"type":"string","format":"uri","pattern":"^https:\\/\\/","maxLength":2048}},"required":["url"]},{"type":"null"}]},"status":{"enum":["active","paused"],"type":"string"},"pausedReason":{"anyOf":[{"enum":["requested","insufficient_credits","failing"],"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"lastCheckedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"nextCheckAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"failures":{"type":"number"},"lastEventSeq":{"type":"number"}},"required":["id","url","selector","render","credentials","tag","intervalMinutes","webhook","status","pausedReason","createdAt","lastCheckedAt","nextCheckAt","failures","lastEventSeq"],"$schema":"http://json-schema.org/draft-07/schema#"}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_request"},"status":{"const":400},"message":{"type":"string","default":"Invalid web request; change the input; nothing was charged"},"data":{"type":"object","properties":{"reason":{"type":"string"},"field":{"type":"string"}},"required":["reason"],"$schema":"http://json-schema.org/draft-07/schema#"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"unauthorized"},"status":{"const":401},"message":{"type":"string","default":"Missing, unknown or revoked API key"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"402":{"description":"402","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"insufficient_credits"},"status":{"const":402},"message":{"type":"string","default":"Not enough credits"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"not_found"},"status":{"const":404},"message":{"type":"string","default":"Web job not found"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"price_changed"},"status":{"const":409},"message":{"type":"string","default":"The accepted credit limit is too low"},"data":{"type":"object","properties":{"credits":{"type":"integer","minimum":0}},"required":["credits"],"$schema":"http://json-schema.org/draft-07/schema#"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"limit_reached"},"status":{"const":409},"message":{"type":"string","default":"The organization keeps the most it may; delete one first"},"data":{"type":"object","properties":{"limit":{"type":"number"}},"required":["limit"],"$schema":"http://json-schema.org/draft-07/schema#"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"target_failed"},"status":{"const":422},"message":{"type":"string","default":"The target page could not be loaded or answered an error status; check the URL; nothing was charged"},"data":{"type":"object","properties":{"reason":{"type":"string"},"httpStatus":{"type":"number"}},"required":["reason"],"$schema":"http://json-schema.org/draft-07/schema#"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"rate_limited"},"status":{"const":429},"message":{"type":"string","default":"Too many requests"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"502":{"description":"502","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"provider_unavailable"},"status":{"const":502},"message":{"type":"string","default":"The web provider is unavailable; retry; nothing was charged"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}},"delete":{"operationId":"web.watches.delete","tags":["web"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^watch_[0-9a-f]{32}$"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","pattern":"^watch_[0-9a-f]{32}$"},"deleted":{"const":true}},"required":["id","deleted"],"$schema":"http://json-schema.org/draft-07/schema#"}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_request"},"status":{"const":400},"message":{"type":"string","default":"Invalid web request; change the input; nothing was charged"},"data":{"type":"object","properties":{"reason":{"type":"string"},"field":{"type":"string"}},"required":["reason"],"$schema":"http://json-schema.org/draft-07/schema#"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"unauthorized"},"status":{"const":401},"message":{"type":"string","default":"Missing, unknown or revoked API key"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"402":{"description":"402","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"insufficient_credits"},"status":{"const":402},"message":{"type":"string","default":"Not enough credits"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"not_found"},"status":{"const":404},"message":{"type":"string","default":"Web job not found"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"price_changed"},"status":{"const":409},"message":{"type":"string","default":"The accepted credit limit is too low"},"data":{"type":"object","properties":{"credits":{"type":"integer","minimum":0}},"required":["credits"],"$schema":"http://json-schema.org/draft-07/schema#"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"limit_reached"},"status":{"const":409},"message":{"type":"string","default":"The organization keeps the most it may; delete one first"},"data":{"type":"object","properties":{"limit":{"type":"number"}},"required":["limit"],"$schema":"http://json-schema.org/draft-07/schema#"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"target_failed"},"status":{"const":422},"message":{"type":"string","default":"The target page could not be loaded or answered an error status; check the URL; nothing was charged"},"data":{"type":"object","properties":{"reason":{"type":"string"},"httpStatus":{"type":"number"}},"required":["reason"],"$schema":"http://json-schema.org/draft-07/schema#"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"rate_limited"},"status":{"const":429},"message":{"type":"string","default":"Too many requests"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"502":{"description":"502","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"provider_unavailable"},"status":{"const":502},"message":{"type":"string","default":"The web provider is unavailable; retry; nothing was charged"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/v1/web/watches/{id}/check":{"post":{"operationId":"web.watches.check","summary":"Check a watched page now","description":"Charged like a scheduled check; refused (`rate_limited`) within a minute of the last check. The next scheduled check follows a full interval later.","tags":["web"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^watch_[0-9a-f]{32}$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"maxCredits":{"type":"integer","minimum":0}},"required":["maxCredits"],"$schema":"http://json-schema.org/draft-07/schema#"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"text":{"type":"string"},"diagnostics":{"type":"array","items":{"type":"string"}},"charged":{"type":"integer","minimum":0},"ref":{"type":"string"},"checkedAt":{"type":"string"},"previousCheckedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"id":{"type":"string","pattern":"^watch_[0-9a-f]{32}$"},"url":{"type":"string"},"status":{"enum":["new","same","changed","removed"],"type":"string"},"added":{"type":"integer","minimum":0},"removed":{"type":"integer","minimum":0},"diff":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["text","diagnostics","charged","ref","checkedAt","previousCheckedAt","id","url","status","added","removed","diff"],"$schema":"http://json-schema.org/draft-07/schema#"}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_request"},"status":{"const":400},"message":{"type":"string","default":"Invalid web request; change the input; nothing was charged"},"data":{"type":"object","properties":{"reason":{"type":"string"},"field":{"type":"string"}},"required":["reason"],"$schema":"http://json-schema.org/draft-07/schema#"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"unauthorized"},"status":{"const":401},"message":{"type":"string","default":"Missing, unknown or revoked API key"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"402":{"description":"402","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"insufficient_credits"},"status":{"const":402},"message":{"type":"string","default":"Not enough credits"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"not_found"},"status":{"const":404},"message":{"type":"string","default":"Web job not found"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"price_changed"},"status":{"const":409},"message":{"type":"string","default":"The accepted credit limit is too low"},"data":{"type":"object","properties":{"credits":{"type":"integer","minimum":0}},"required":["credits"],"$schema":"http://json-schema.org/draft-07/schema#"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"limit_reached"},"status":{"const":409},"message":{"type":"string","default":"The organization keeps the most it may; delete one first"},"data":{"type":"object","properties":{"limit":{"type":"number"}},"required":["limit"],"$schema":"http://json-schema.org/draft-07/schema#"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"target_failed"},"status":{"const":422},"message":{"type":"string","default":"The target page could not be loaded or answered an error status; check the URL; nothing was charged"},"data":{"type":"object","properties":{"reason":{"type":"string"},"httpStatus":{"type":"number"}},"required":["reason"],"$schema":"http://json-schema.org/draft-07/schema#"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"rate_limited"},"status":{"const":429},"message":{"type":"string","default":"Too many requests"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"502":{"description":"502","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"provider_unavailable"},"status":{"const":502},"message":{"type":"string","default":"The web provider is unavailable; retry; nothing was charged"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/v1/web/watches/{id}/events":{"get":{"operationId":"web.watches.events","summary":"A watch's events after `after`, oldest first","description":"Free. Kept for the last 100 events or 30 days. Polling with the last `seq` seen never misses an event a webhook failed to deliver.","tags":["web"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^watch_[0-9a-f]{32}$"}},{"name":"after","in":"query","schema":{"anyOf":[{"type":"number"},{"type":"string"}],"type":"integer","minimum":0,"maximum":9007199254740991,"default":0},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"events":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"seq":{"type":"number"},"timestamp":{"type":"string"},"type":{"enum":["watch.new","watch.changed","watch.removed"],"type":"string"},"data":{"type":"object","properties":{"id":{"type":"string","pattern":"^watch_[0-9a-f]{32}$"},"url":{"type":"string"},"added":{"type":"integer","minimum":0},"removed":{"type":"integer","minimum":0},"diff":{"anyOf":[{"type":"string"},{"type":"null"}]},"checkedAt":{"type":"string"},"previousCheckedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"text":{"type":"string"},"ref":{"type":"string"}},"required":["id","url","added","removed","diff","checkedAt","previousCheckedAt","text","ref"]}},"required":["seq","timestamp","type","data"]},{"type":"object","properties":{"seq":{"type":"number"},"timestamp":{"type":"string"},"type":{"const":"feed.results"},"data":{"type":"object","properties":{"id":{"type":"string","pattern":"^feed_[0-9a-f]{32}$"},"query":{"type":"string"},"results":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string"},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"publishedDate":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["url","title","publishedDate"]}},"summary":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null},"checkedAt":{"type":"string"},"previousCheckedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"text":{"type":"string"},"ref":{"type":"string"}},"required":["id","query","results","checkedAt","previousCheckedAt","text","ref"]}},"required":["seq","timestamp","type","data"]},{"type":"object","properties":{"seq":{"type":"number"},"timestamp":{"type":"string"},"type":{"enum":["watch.paused","feed.paused"],"type":"string"},"data":{"type":"object","properties":{"id":{"type":"string"},"reason":{"enum":["insufficient_credits","failing"],"type":"string"}},"required":["id","reason"]}},"required":["seq","timestamp","type","data"]}]}},"lastSeq":{"type":"number"}},"required":["events","lastSeq"],"$schema":"http://json-schema.org/draft-07/schema#"}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_request"},"status":{"const":400},"message":{"type":"string","default":"Invalid web request; change the input; nothing was charged"},"data":{"type":"object","properties":{"reason":{"type":"string"},"field":{"type":"string"}},"required":["reason"],"$schema":"http://json-schema.org/draft-07/schema#"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"unauthorized"},"status":{"const":401},"message":{"type":"string","default":"Missing, unknown or revoked API key"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"402":{"description":"402","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"insufficient_credits"},"status":{"const":402},"message":{"type":"string","default":"Not enough credits"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"not_found"},"status":{"const":404},"message":{"type":"string","default":"Web job not found"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"price_changed"},"status":{"const":409},"message":{"type":"string","default":"The accepted credit limit is too low"},"data":{"type":"object","properties":{"credits":{"type":"integer","minimum":0}},"required":["credits"],"$schema":"http://json-schema.org/draft-07/schema#"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"limit_reached"},"status":{"const":409},"message":{"type":"string","default":"The organization keeps the most it may; delete one first"},"data":{"type":"object","properties":{"limit":{"type":"number"}},"required":["limit"],"$schema":"http://json-schema.org/draft-07/schema#"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"target_failed"},"status":{"const":422},"message":{"type":"string","default":"The target page could not be loaded or answered an error status; check the URL; nothing was charged"},"data":{"type":"object","properties":{"reason":{"type":"string"},"httpStatus":{"type":"number"}},"required":["reason"],"$schema":"http://json-schema.org/draft-07/schema#"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"rate_limited"},"status":{"const":429},"message":{"type":"string","default":"Too many requests"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"502":{"description":"502","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"provider_unavailable"},"status":{"const":502},"message":{"type":"string","default":"The web provider is unavailable; retry; nothing was charged"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/v1/web/feeds":{"post":{"operationId":"web.feeds.create","summary":"Follow a query: search now, then on a schedule","description":"Creates a Search Feed and runs its first check at once, charged; if that check fails nothing is created or charged. Each check searches recent content and keeps only pages that are relevant, from a legitimate source and add information the feed has not returned (a new article retelling an old story is left out), with a summary citing them. getctx checks every `intervalMinutes` (at least 60; default a day), each check charged, and records each check that found something as an event, POSTed to `webhook.url` when set. The query and filters never change: follow another with a new feed. An organization keeps at most 200 feeds.","tags":["web"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"query":{"type":"string","pattern":"\\S","maxLength":2000},"num":{"type":"integer","minimum":1,"maximum":100,"default":10},"domain":{"type":"array","items":{"type":"string"},"default":[]},"exclude":{"type":"array","items":{"type":"string"},"default":[]},"text":{"type":"boolean","default":false},"intervalMinutes":{"type":"integer","minimum":60,"maximum":43200,"default":1440},"tag":{"type":"string","maxLength":200,"default":""},"webhook":{"type":"object","properties":{"url":{"type":"string","format":"uri","pattern":"^https:\\/\\/","maxLength":2048}},"required":["url"]},"maxCredits":{"type":"integer","minimum":0}},"required":["query","maxCredits"],"$schema":"http://json-schema.org/draft-07/schema#"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"feed":{"type":"object","properties":{"id":{"type":"string","pattern":"^feed_[0-9a-f]{32}$"},"search":{"type":"object","properties":{"query":{"type":"string"},"num":{"type":"number"},"domain":{"type":"array","items":{"type":"string"}},"exclude":{"type":"array","items":{"type":"string"}},"text":{"type":"boolean"}},"required":["query","num","domain","exclude","text"]},"tag":{"type":"string"},"intervalMinutes":{"type":"number"},"webhook":{"anyOf":[{"type":"object","properties":{"url":{"type":"string","format":"uri","pattern":"^https:\\/\\/","maxLength":2048}},"required":["url"]},{"type":"null"}]},"status":{"enum":["active","paused"],"type":"string"},"pausedReason":{"anyOf":[{"enum":["requested","insufficient_credits","failing"],"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"lastCheckedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"nextCheckAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"failures":{"type":"number"},"lastEventSeq":{"type":"number"}},"required":["id","search","tag","intervalMinutes","webhook","status","pausedReason","createdAt","lastCheckedAt","nextCheckAt","failures","lastEventSeq"]},"check":{"type":"object","properties":{"text":{"type":"string"},"diagnostics":{"type":"array","items":{"type":"string"}},"charged":{"type":"integer","minimum":0},"ref":{"type":"string"},"checkedAt":{"type":"string"},"previousCheckedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"id":{"type":"string","pattern":"^feed_[0-9a-f]{32}$"},"query":{"type":"string"},"results":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string"},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"publishedDate":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["url","title","publishedDate"]}},"summary":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["text","diagnostics","charged","ref","checkedAt","previousCheckedAt","id","query","results","summary"]}},"required":["feed","check"],"$schema":"http://json-schema.org/draft-07/schema#"}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_request"},"status":{"const":400},"message":{"type":"string","default":"Invalid web request; change the input; nothing was charged"},"data":{"type":"object","properties":{"reason":{"type":"string"},"field":{"type":"string"}},"required":["reason"],"$schema":"http://json-schema.org/draft-07/schema#"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"unauthorized"},"status":{"const":401},"message":{"type":"string","default":"Missing, unknown or revoked API key"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"402":{"description":"402","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"insufficient_credits"},"status":{"const":402},"message":{"type":"string","default":"Not enough credits"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"not_found"},"status":{"const":404},"message":{"type":"string","default":"Web job not found"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"price_changed"},"status":{"const":409},"message":{"type":"string","default":"The accepted credit limit is too low"},"data":{"type":"object","properties":{"credits":{"type":"integer","minimum":0}},"required":["credits"],"$schema":"http://json-schema.org/draft-07/schema#"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"limit_reached"},"status":{"const":409},"message":{"type":"string","default":"The organization keeps the most it may; delete one first"},"data":{"type":"object","properties":{"limit":{"type":"number"}},"required":["limit"],"$schema":"http://json-schema.org/draft-07/schema#"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"target_failed"},"status":{"const":422},"message":{"type":"string","default":"The target page could not be loaded or answered an error status; check the URL; nothing was charged"},"data":{"type":"object","properties":{"reason":{"type":"string"},"httpStatus":{"type":"number"}},"required":["reason"],"$schema":"http://json-schema.org/draft-07/schema#"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"rate_limited"},"status":{"const":429},"message":{"type":"string","default":"Too many requests"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"502":{"description":"502","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"provider_unavailable"},"status":{"const":502},"message":{"type":"string","default":"The web provider is unavailable; retry; nothing was charged"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}},"get":{"operationId":"web.feeds.list","tags":["web"],"parameters":[{"name":"tag","in":"query","required":false,"schema":{"type":"string","maxLength":200},"allowEmptyValue":true,"allowReserved":true},{"name":"limit","in":"query","required":false,"schema":{"anyOf":[{"type":"number"},{"type":"string"}],"type":"integer","minimum":1,"maximum":100,"default":50},"allowEmptyValue":true,"allowReserved":true},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","maxLength":200},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"tag":{"type":"string"},"subject":{"type":"string"},"status":{"enum":["active","paused"],"type":"string"},"intervalMinutes":{"type":"number"},"createdAt":{"type":"string"},"lastCheckedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","tag","subject","status","intervalMinutes","createdAt","lastCheckedAt"]}},"cursor":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["items","cursor"],"$schema":"http://json-schema.org/draft-07/schema#"}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_request"},"status":{"const":400},"message":{"type":"string","default":"Invalid web request; change the input; nothing was charged"},"data":{"type":"object","properties":{"reason":{"type":"string"},"field":{"type":"string"}},"required":["reason"],"$schema":"http://json-schema.org/draft-07/schema#"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"unauthorized"},"status":{"const":401},"message":{"type":"string","default":"Missing, unknown or revoked API key"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"402":{"description":"402","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"insufficient_credits"},"status":{"const":402},"message":{"type":"string","default":"Not enough credits"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"not_found"},"status":{"const":404},"message":{"type":"string","default":"Web job not found"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"price_changed"},"status":{"const":409},"message":{"type":"string","default":"The accepted credit limit is too low"},"data":{"type":"object","properties":{"credits":{"type":"integer","minimum":0}},"required":["credits"],"$schema":"http://json-schema.org/draft-07/schema#"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"limit_reached"},"status":{"const":409},"message":{"type":"string","default":"The organization keeps the most it may; delete one first"},"data":{"type":"object","properties":{"limit":{"type":"number"}},"required":["limit"],"$schema":"http://json-schema.org/draft-07/schema#"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"target_failed"},"status":{"const":422},"message":{"type":"string","default":"The target page could not be loaded or answered an error status; check the URL; nothing was charged"},"data":{"type":"object","properties":{"reason":{"type":"string"},"httpStatus":{"type":"number"}},"required":["reason"],"$schema":"http://json-schema.org/draft-07/schema#"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"rate_limited"},"status":{"const":429},"message":{"type":"string","default":"Too many requests"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"502":{"description":"502","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"provider_unavailable"},"status":{"const":502},"message":{"type":"string","default":"The web provider is unavailable; retry; nothing was charged"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/v1/web/feeds/{id}":{"get":{"operationId":"web.feeds.get","tags":["web"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^feed_[0-9a-f]{32}$"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","pattern":"^feed_[0-9a-f]{32}$"},"search":{"type":"object","properties":{"query":{"type":"string"},"num":{"type":"number"},"domain":{"type":"array","items":{"type":"string"}},"exclude":{"type":"array","items":{"type":"string"}},"text":{"type":"boolean"}},"required":["query","num","domain","exclude","text"]},"tag":{"type":"string"},"intervalMinutes":{"type":"number"},"webhook":{"anyOf":[{"type":"object","properties":{"url":{"type":"string","format":"uri","pattern":"^https:\\/\\/","maxLength":2048}},"required":["url"]},{"type":"null"}]},"status":{"enum":["active","paused"],"type":"string"},"pausedReason":{"anyOf":[{"enum":["requested","insufficient_credits","failing"],"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"lastCheckedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"nextCheckAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"failures":{"type":"number"},"lastEventSeq":{"type":"number"}},"required":["id","search","tag","intervalMinutes","webhook","status","pausedReason","createdAt","lastCheckedAt","nextCheckAt","failures","lastEventSeq"],"$schema":"http://json-schema.org/draft-07/schema#"}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_request"},"status":{"const":400},"message":{"type":"string","default":"Invalid web request; change the input; nothing was charged"},"data":{"type":"object","properties":{"reason":{"type":"string"},"field":{"type":"string"}},"required":["reason"],"$schema":"http://json-schema.org/draft-07/schema#"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"unauthorized"},"status":{"const":401},"message":{"type":"string","default":"Missing, unknown or revoked API key"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"402":{"description":"402","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"insufficient_credits"},"status":{"const":402},"message":{"type":"string","default":"Not enough credits"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"not_found"},"status":{"const":404},"message":{"type":"string","default":"Web job not found"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"price_changed"},"status":{"const":409},"message":{"type":"string","default":"The accepted credit limit is too low"},"data":{"type":"object","properties":{"credits":{"type":"integer","minimum":0}},"required":["credits"],"$schema":"http://json-schema.org/draft-07/schema#"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"limit_reached"},"status":{"const":409},"message":{"type":"string","default":"The organization keeps the most it may; delete one first"},"data":{"type":"object","properties":{"limit":{"type":"number"}},"required":["limit"],"$schema":"http://json-schema.org/draft-07/schema#"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"target_failed"},"status":{"const":422},"message":{"type":"string","default":"The target page could not be loaded or answered an error status; check the URL; nothing was charged"},"data":{"type":"object","properties":{"reason":{"type":"string"},"httpStatus":{"type":"number"}},"required":["reason"],"$schema":"http://json-schema.org/draft-07/schema#"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"rate_limited"},"status":{"const":429},"message":{"type":"string","default":"Too many requests"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"502":{"description":"502","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"provider_unavailable"},"status":{"const":502},"message":{"type":"string","default":"The web provider is unavailable; retry; nothing was charged"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}},"patch":{"operationId":"web.feeds.update","summary":"Change a feed's schedule, webhook or tag, or pause it","tags":["web"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^feed_[0-9a-f]{32}$"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"intervalMinutes":{"type":"integer","minimum":60,"maximum":43200},"tag":{"type":"string","maxLength":200},"webhook":{"anyOf":[{"type":"object","properties":{"url":{"type":"string","format":"uri","pattern":"^https:\\/\\/","maxLength":2048}},"required":["url"]},{"type":"null"}]},"paused":{"type":"boolean"}},"$schema":"http://json-schema.org/draft-07/schema#"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","pattern":"^feed_[0-9a-f]{32}$"},"search":{"type":"object","properties":{"query":{"type":"string"},"num":{"type":"number"},"domain":{"type":"array","items":{"type":"string"}},"exclude":{"type":"array","items":{"type":"string"}},"text":{"type":"boolean"}},"required":["query","num","domain","exclude","text"]},"tag":{"type":"string"},"intervalMinutes":{"type":"number"},"webhook":{"anyOf":[{"type":"object","properties":{"url":{"type":"string","format":"uri","pattern":"^https:\\/\\/","maxLength":2048}},"required":["url"]},{"type":"null"}]},"status":{"enum":["active","paused"],"type":"string"},"pausedReason":{"anyOf":[{"enum":["requested","insufficient_credits","failing"],"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"lastCheckedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"nextCheckAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"failures":{"type":"number"},"lastEventSeq":{"type":"number"}},"required":["id","search","tag","intervalMinutes","webhook","status","pausedReason","createdAt","lastCheckedAt","nextCheckAt","failures","lastEventSeq"],"$schema":"http://json-schema.org/draft-07/schema#"}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_request"},"status":{"const":400},"message":{"type":"string","default":"Invalid web request; change the input; nothing was charged"},"data":{"type":"object","properties":{"reason":{"type":"string"},"field":{"type":"string"}},"required":["reason"],"$schema":"http://json-schema.org/draft-07/schema#"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"unauthorized"},"status":{"const":401},"message":{"type":"string","default":"Missing, unknown or revoked API key"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"402":{"description":"402","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"insufficient_credits"},"status":{"const":402},"message":{"type":"string","default":"Not enough credits"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"not_found"},"status":{"const":404},"message":{"type":"string","default":"Web job not found"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"price_changed"},"status":{"const":409},"message":{"type":"string","default":"The accepted credit limit is too low"},"data":{"type":"object","properties":{"credits":{"type":"integer","minimum":0}},"required":["credits"],"$schema":"http://json-schema.org/draft-07/schema#"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"limit_reached"},"status":{"const":409},"message":{"type":"string","default":"The organization keeps the most it may; delete one first"},"data":{"type":"object","properties":{"limit":{"type":"number"}},"required":["limit"],"$schema":"http://json-schema.org/draft-07/schema#"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"target_failed"},"status":{"const":422},"message":{"type":"string","default":"The target page could not be loaded or answered an error status; check the URL; nothing was charged"},"data":{"type":"object","properties":{"reason":{"type":"string"},"httpStatus":{"type":"number"}},"required":["reason"],"$schema":"http://json-schema.org/draft-07/schema#"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"rate_limited"},"status":{"const":429},"message":{"type":"string","default":"Too many requests"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"502":{"description":"502","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"provider_unavailable"},"status":{"const":502},"message":{"type":"string","default":"The web provider is unavailable; retry; nothing was charged"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}},"delete":{"operationId":"web.feeds.delete","tags":["web"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^feed_[0-9a-f]{32}$"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","pattern":"^feed_[0-9a-f]{32}$"},"deleted":{"const":true}},"required":["id","deleted"],"$schema":"http://json-schema.org/draft-07/schema#"}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_request"},"status":{"const":400},"message":{"type":"string","default":"Invalid web request; change the input; nothing was charged"},"data":{"type":"object","properties":{"reason":{"type":"string"},"field":{"type":"string"}},"required":["reason"],"$schema":"http://json-schema.org/draft-07/schema#"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"unauthorized"},"status":{"const":401},"message":{"type":"string","default":"Missing, unknown or revoked API key"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"402":{"description":"402","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"insufficient_credits"},"status":{"const":402},"message":{"type":"string","default":"Not enough credits"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"not_found"},"status":{"const":404},"message":{"type":"string","default":"Web job not found"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"price_changed"},"status":{"const":409},"message":{"type":"string","default":"The accepted credit limit is too low"},"data":{"type":"object","properties":{"credits":{"type":"integer","minimum":0}},"required":["credits"],"$schema":"http://json-schema.org/draft-07/schema#"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"limit_reached"},"status":{"const":409},"message":{"type":"string","default":"The organization keeps the most it may; delete one first"},"data":{"type":"object","properties":{"limit":{"type":"number"}},"required":["limit"],"$schema":"http://json-schema.org/draft-07/schema#"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"target_failed"},"status":{"const":422},"message":{"type":"string","default":"The target page could not be loaded or answered an error status; check the URL; nothing was charged"},"data":{"type":"object","properties":{"reason":{"type":"string"},"httpStatus":{"type":"number"}},"required":["reason"],"$schema":"http://json-schema.org/draft-07/schema#"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"rate_limited"},"status":{"const":429},"message":{"type":"string","default":"Too many requests"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"502":{"description":"502","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"provider_unavailable"},"status":{"const":502},"message":{"type":"string","default":"The web provider is unavailable; retry; nothing was charged"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/v1/web/feeds/{id}/check":{"post":{"operationId":"web.feeds.check","summary":"Check a feed's query now","description":"Charged like a scheduled check; refused (`rate_limited`) within a minute of the last check.","tags":["web"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^feed_[0-9a-f]{32}$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"maxCredits":{"type":"integer","minimum":0}},"required":["maxCredits"],"$schema":"http://json-schema.org/draft-07/schema#"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"text":{"type":"string"},"diagnostics":{"type":"array","items":{"type":"string"}},"charged":{"type":"integer","minimum":0},"ref":{"type":"string"},"checkedAt":{"type":"string"},"previousCheckedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"id":{"type":"string","pattern":"^feed_[0-9a-f]{32}$"},"query":{"type":"string"},"results":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string"},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"publishedDate":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["url","title","publishedDate"]}},"summary":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["text","diagnostics","charged","ref","checkedAt","previousCheckedAt","id","query","results","summary"],"$schema":"http://json-schema.org/draft-07/schema#"}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_request"},"status":{"const":400},"message":{"type":"string","default":"Invalid web request; change the input; nothing was charged"},"data":{"type":"object","properties":{"reason":{"type":"string"},"field":{"type":"string"}},"required":["reason"],"$schema":"http://json-schema.org/draft-07/schema#"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"unauthorized"},"status":{"const":401},"message":{"type":"string","default":"Missing, unknown or revoked API key"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"402":{"description":"402","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"insufficient_credits"},"status":{"const":402},"message":{"type":"string","default":"Not enough credits"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"not_found"},"status":{"const":404},"message":{"type":"string","default":"Web job not found"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"price_changed"},"status":{"const":409},"message":{"type":"string","default":"The accepted credit limit is too low"},"data":{"type":"object","properties":{"credits":{"type":"integer","minimum":0}},"required":["credits"],"$schema":"http://json-schema.org/draft-07/schema#"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"limit_reached"},"status":{"const":409},"message":{"type":"string","default":"The organization keeps the most it may; delete one first"},"data":{"type":"object","properties":{"limit":{"type":"number"}},"required":["limit"],"$schema":"http://json-schema.org/draft-07/schema#"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"target_failed"},"status":{"const":422},"message":{"type":"string","default":"The target page could not be loaded or answered an error status; check the URL; nothing was charged"},"data":{"type":"object","properties":{"reason":{"type":"string"},"httpStatus":{"type":"number"}},"required":["reason"],"$schema":"http://json-schema.org/draft-07/schema#"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"rate_limited"},"status":{"const":429},"message":{"type":"string","default":"Too many requests"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"502":{"description":"502","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"provider_unavailable"},"status":{"const":502},"message":{"type":"string","default":"The web provider is unavailable; retry; nothing was charged"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/v1/web/feeds/{id}/events":{"get":{"operationId":"web.feeds.events","summary":"A feed's events after `after`, oldest first","description":"Free. Kept for the last 100 events or 30 days.","tags":["web"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^feed_[0-9a-f]{32}$"}},{"name":"after","in":"query","schema":{"anyOf":[{"type":"number"},{"type":"string"}],"type":"integer","minimum":0,"maximum":9007199254740991,"default":0},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"events":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"seq":{"type":"number"},"timestamp":{"type":"string"},"type":{"enum":["watch.new","watch.changed","watch.removed"],"type":"string"},"data":{"type":"object","properties":{"id":{"type":"string","pattern":"^watch_[0-9a-f]{32}$"},"url":{"type":"string"},"added":{"type":"integer","minimum":0},"removed":{"type":"integer","minimum":0},"diff":{"anyOf":[{"type":"string"},{"type":"null"}]},"checkedAt":{"type":"string"},"previousCheckedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"text":{"type":"string"},"ref":{"type":"string"}},"required":["id","url","added","removed","diff","checkedAt","previousCheckedAt","text","ref"]}},"required":["seq","timestamp","type","data"]},{"type":"object","properties":{"seq":{"type":"number"},"timestamp":{"type":"string"},"type":{"const":"feed.results"},"data":{"type":"object","properties":{"id":{"type":"string","pattern":"^feed_[0-9a-f]{32}$"},"query":{"type":"string"},"results":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string"},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"publishedDate":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["url","title","publishedDate"]}},"summary":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null},"checkedAt":{"type":"string"},"previousCheckedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"text":{"type":"string"},"ref":{"type":"string"}},"required":["id","query","results","checkedAt","previousCheckedAt","text","ref"]}},"required":["seq","timestamp","type","data"]},{"type":"object","properties":{"seq":{"type":"number"},"timestamp":{"type":"string"},"type":{"enum":["watch.paused","feed.paused"],"type":"string"},"data":{"type":"object","properties":{"id":{"type":"string"},"reason":{"enum":["insufficient_credits","failing"],"type":"string"}},"required":["id","reason"]}},"required":["seq","timestamp","type","data"]}]}},"lastSeq":{"type":"number"}},"required":["events","lastSeq"],"$schema":"http://json-schema.org/draft-07/schema#"}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_request"},"status":{"const":400},"message":{"type":"string","default":"Invalid web request; change the input; nothing was charged"},"data":{"type":"object","properties":{"reason":{"type":"string"},"field":{"type":"string"}},"required":["reason"],"$schema":"http://json-schema.org/draft-07/schema#"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"unauthorized"},"status":{"const":401},"message":{"type":"string","default":"Missing, unknown or revoked API key"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"402":{"description":"402","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"insufficient_credits"},"status":{"const":402},"message":{"type":"string","default":"Not enough credits"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"not_found"},"status":{"const":404},"message":{"type":"string","default":"Web job not found"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"price_changed"},"status":{"const":409},"message":{"type":"string","default":"The accepted credit limit is too low"},"data":{"type":"object","properties":{"credits":{"type":"integer","minimum":0}},"required":["credits"],"$schema":"http://json-schema.org/draft-07/schema#"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"limit_reached"},"status":{"const":409},"message":{"type":"string","default":"The organization keeps the most it may; delete one first"},"data":{"type":"object","properties":{"limit":{"type":"number"}},"required":["limit"],"$schema":"http://json-schema.org/draft-07/schema#"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"target_failed"},"status":{"const":422},"message":{"type":"string","default":"The target page could not be loaded or answered an error status; check the URL; nothing was charged"},"data":{"type":"object","properties":{"reason":{"type":"string"},"httpStatus":{"type":"number"}},"required":["reason"],"$schema":"http://json-schema.org/draft-07/schema#"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"rate_limited"},"status":{"const":429},"message":{"type":"string","default":"Too many requests"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"502":{"description":"502","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"provider_unavailable"},"status":{"const":502},"message":{"type":"string","default":"The web provider is unavailable; retry; nothing was charged"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/v1/webhooks/secret":{"get":{"operationId":"webhooks.secret","summary":"The organization's webhook signing secret","tags":["webhooks"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"secret":{"type":"string"}},"required":["secret"],"$schema":"http://json-schema.org/draft-07/schema#"}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_request"},"status":{"const":400},"message":{"type":"string","default":"Invalid web request; change the input; nothing was charged"},"data":{"type":"object","properties":{"reason":{"type":"string"},"field":{"type":"string"}},"required":["reason"],"$schema":"http://json-schema.org/draft-07/schema#"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"unauthorized"},"status":{"const":401},"message":{"type":"string","default":"Missing, unknown or revoked API key"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"402":{"description":"402","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"insufficient_credits"},"status":{"const":402},"message":{"type":"string","default":"Not enough credits"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"not_found"},"status":{"const":404},"message":{"type":"string","default":"Web job not found"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"price_changed"},"status":{"const":409},"message":{"type":"string","default":"The accepted credit limit is too low"},"data":{"type":"object","properties":{"credits":{"type":"integer","minimum":0}},"required":["credits"],"$schema":"http://json-schema.org/draft-07/schema#"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"limit_reached"},"status":{"const":409},"message":{"type":"string","default":"The organization keeps the most it may; delete one first"},"data":{"type":"object","properties":{"limit":{"type":"number"}},"required":["limit"],"$schema":"http://json-schema.org/draft-07/schema#"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"target_failed"},"status":{"const":422},"message":{"type":"string","default":"The target page could not be loaded or answered an error status; check the URL; nothing was charged"},"data":{"type":"object","properties":{"reason":{"type":"string"},"httpStatus":{"type":"number"}},"required":["reason"],"$schema":"http://json-schema.org/draft-07/schema#"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"rate_limited"},"status":{"const":429},"message":{"type":"string","default":"Too many requests"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"502":{"description":"502","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"provider_unavailable"},"status":{"const":502},"message":{"type":"string","default":"The web provider is unavailable; retry; nothing was charged"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}},"post":{"operationId":"webhooks.rotate","summary":"Replace the webhook signing secret","description":"Every delivery from now on, retries included, is signed with the new secret.","tags":["webhooks"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"secret":{"type":"string"}},"required":["secret"],"$schema":"http://json-schema.org/draft-07/schema#"}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_request"},"status":{"const":400},"message":{"type":"string","default":"Invalid web request; change the input; nothing was charged"},"data":{"type":"object","properties":{"reason":{"type":"string"},"field":{"type":"string"}},"required":["reason"],"$schema":"http://json-schema.org/draft-07/schema#"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"unauthorized"},"status":{"const":401},"message":{"type":"string","default":"Missing, unknown or revoked API key"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"402":{"description":"402","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"insufficient_credits"},"status":{"const":402},"message":{"type":"string","default":"Not enough credits"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"not_found"},"status":{"const":404},"message":{"type":"string","default":"Web job not found"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"price_changed"},"status":{"const":409},"message":{"type":"string","default":"The accepted credit limit is too low"},"data":{"type":"object","properties":{"credits":{"type":"integer","minimum":0}},"required":["credits"],"$schema":"http://json-schema.org/draft-07/schema#"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"limit_reached"},"status":{"const":409},"message":{"type":"string","default":"The organization keeps the most it may; delete one first"},"data":{"type":"object","properties":{"limit":{"type":"number"}},"required":["limit"],"$schema":"http://json-schema.org/draft-07/schema#"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"target_failed"},"status":{"const":422},"message":{"type":"string","default":"The target page could not be loaded or answered an error status; check the URL; nothing was charged"},"data":{"type":"object","properties":{"reason":{"type":"string"},"httpStatus":{"type":"number"}},"required":["reason"],"$schema":"http://json-schema.org/draft-07/schema#"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"rate_limited"},"status":{"const":429},"message":{"type":"string","default":"Too many requests"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"502":{"description":"502","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"provider_unavailable"},"status":{"const":502},"message":{"type":"string","default":"The web provider is unavailable; retry; nothing was charged"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/v1/files":{"post":{"operationId":"upload","summary":"Upload a file to parse, and learn the price of parsing it","description":"Free. Multipart field `file`, at most 30000000 bytes and, for a PDF, 60 pages: pdf, docx, doc, docm, odt, rtf, pptx, ppt, pptm, odp, xlsx, xls, xlsm, xlsb, ods, epub, csv, html, htm, xhtml. Answers with the file's id and `credits`, the price of parsing it: 1 per PDF page, 1 per file otherwise, 0 when the same bytes were parsed before (`cached`). Show the price, then call `POST /v1/parse` with it as `maxCredits`. A file is kept 7 days.","tags":["parse"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"file":{}},"required":["file"],"$schema":"http://json-schema.org/draft-07/schema#"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"fileId":{"type":"string"},"name":{"type":"string"},"format":{"enum":["pdf","docx","doc","docm","odt","rtf","pptx","ppt","pptm","odp","xlsx","xls","xlsm","xlsb","ods","epub","csv","html","htm","xhtml"],"type":"string"},"size":{"type":"number"},"pages":{"anyOf":[{"type":"number"},{"type":"null"}]},"credits":{"type":"integer","minimum":0},"cached":{"type":"boolean"}},"required":["fileId","name","format","size","pages","credits","cached"],"$schema":"http://json-schema.org/draft-07/schema#"}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"unauthorized"},"status":{"const":401},"message":{"type":"string","default":"Missing, unknown or revoked API key"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"forbidden"},"status":{"const":403},"message":{"type":"string","default":"The API key does not carry the scope this call needs"},"data":{"type":"object","properties":{"scope":{"enum":["parse"],"type":"string"}},"required":["scope"],"$schema":"http://json-schema.org/draft-07/schema#"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"413":{"description":"413","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"file_too_large"},"status":{"const":413},"message":{"type":"string","default":"Files above 30000000 bytes, and PDFs above 60 pages, are refused"},"data":{"anyOf":[{"type":"object","properties":{"maxBytes":{"type":"number"}},"required":["maxBytes"]},{"type":"object","properties":{"maxPages":{"type":"number"},"pages":{"type":"number"}},"required":["maxPages","pages"]}],"$schema":"http://json-schema.org/draft-07/schema#"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"415":{"description":"415","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"unsupported_format"},"status":{"const":415},"message":{"type":"string","default":"parse does not take this format"},"data":{"type":"object","properties":{"accepted":{"type":"array","items":{"type":"string"}}},"required":["accepted"],"$schema":"http://json-schema.org/draft-07/schema#"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"unreadable_document"},"status":{"const":422},"message":{"type":"string","default":"The file is empty, or a PDF whose pages cannot be counted; it was not stored"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"rate_limited"},"status":{"const":429},"message":{"type":"string","default":"Too many calls for this API key; retry after the window"},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"}},"required":["retryAfterSeconds"],"$schema":"http://json-schema.org/draft-07/schema#"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/v1/parse":{"post":{"operationId":"parse","summary":"Start a Job that turns an uploaded file into Markdown","description":"Admits a Job at the price `POST /v1/files` answered and charges it when the Job ends: at that price when it succeeds, nothing when it fails. `maxCredits` is the price you accepted; a higher price is refused, uncharged. Follow the Job with `GET /v1/parse/{jobId}`.","tags":["parse"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"fileId":{"type":"string"},"maxCredits":{"type":"integer","minimum":0}},"required":["fileId","maxCredits"],"$schema":"http://json-schema.org/draft-07/schema#"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"jobId":{"type":"string"},"credits":{"type":"integer","minimum":0}},"required":["jobId","credits"],"$schema":"http://json-schema.org/draft-07/schema#"}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"unauthorized"},"status":{"const":401},"message":{"type":"string","default":"Missing, unknown or revoked API key"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"402":{"description":"402","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"insufficient_credits"},"status":{"const":402},"message":{"type":"string","default":"The organization has fewer credits than this Job costs"},"data":{"type":"object","properties":{"price":{"type":"integer","minimum":0},"spendable":{"type":"integer","minimum":0}},"required":["price","spendable"],"$schema":"http://json-schema.org/draft-07/schema#"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"forbidden"},"status":{"const":403},"message":{"type":"string","default":"The API key does not carry the scope this call needs"},"data":{"type":"object","properties":{"scope":{"enum":["parse"],"type":"string"}},"required":["scope"],"$schema":"http://json-schema.org/draft-07/schema#"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"file_not_found"},"status":{"const":404},"message":{"type":"string","default":"No file with this id for this organization, or it expired (7 days); upload it again"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"price_changed"},"status":{"const":409},"message":{"type":"string","default":"maxCredits is below the price of parsing the file (`data.credits`); call again with maxCredits at that price; nothing was charged"},"data":{"type":"object","properties":{"credits":{"type":"integer","minimum":0}},"required":["credits"],"$schema":"http://json-schema.org/draft-07/schema#"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"rate_limited"},"status":{"const":429},"message":{"type":"string","default":"Too many calls for this API key; retry after the window"},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"}},"required":["retryAfterSeconds"],"$schema":"http://json-schema.org/draft-07/schema#"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"503":{"description":"503","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"provider_unavailable"},"status":{"const":503},"message":{"type":"string","default":"The Job could not be started; retry after the delay; nothing was charged"},"data":{"type":"object","properties":{"charged":{"const":0},"retryAfterSeconds":{"type":"number"}},"required":["charged","retryAfterSeconds"],"$schema":"http://json-schema.org/draft-07/schema#"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/v1/parse/{jobId}":{"get":{"operationId":"parseJob","summary":"A parse Job's status, and its artifact once it succeeded","description":"Free. `queued` (not started yet) and `running` carry the price the Job was admitted at; `succeeded` the artifact and what was charged; `failed` why, uncharged. A Job is kept 30 days.","tags":["parse"],"parameters":[{"name":"jobId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"status":{"const":"queued"},"credits":{"type":"integer","minimum":0}},"required":["status","credits"]},{"type":"object","properties":{"status":{"const":"running"},"credits":{"type":"integer","minimum":0}},"required":["status","credits"]},{"type":"object","properties":{"status":{"const":"succeeded"},"artifact":{"type":"object","properties":{"markdown":{"type":"string"},"pages":{"type":"array","items":{"type":"object","properties":{"pageNumber":{"type":"number"},"markdown":{"type":"string"}},"required":["pageNumber","markdown"]}},"metadata":{"type":"object","properties":{"format":{"enum":["pdf","docx","doc","docm","odt","rtf","pptx","ppt","pptm","odp","xlsx","xls","xlsm","xlsb","ods","epub","csv","html","htm","xhtml"],"type":"string"},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"pageCount":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["format","title","pageCount"]}},"required":["markdown","metadata"]},"charged":{"type":"integer","minimum":0}},"required":["status","artifact","charged"]},{"type":"object","properties":{"status":{"const":"failed"},"error":{"oneOf":[{"type":"object","properties":{"code":{"const":"unreadable_document"}},"required":["code"]},{"type":"object","properties":{"code":{"const":"provider_unavailable"},"retryAfterSeconds":{"type":"number"}},"required":["code","retryAfterSeconds"]},{"type":"object","properties":{"code":{"const":"cache_expired"}},"required":["code"]}]},"charged":{"const":0}},"required":["status","error","charged"]}],"$schema":"http://json-schema.org/draft-07/schema#"}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"unauthorized"},"status":{"const":401},"message":{"type":"string","default":"Missing, unknown or revoked API key"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"forbidden"},"status":{"const":403},"message":{"type":"string","default":"The API key does not carry the scope this call needs"},"data":{"type":"object","properties":{"scope":{"enum":["parse"],"type":"string"}},"required":["scope"],"$schema":"http://json-schema.org/draft-07/schema#"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"job_not_found"},"status":{"const":404},"message":{"type":"string","default":"No Job with this id for this organization, or it is older than 30 days"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"410":{"description":"410","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"result_expired"},"status":{"const":410},"message":{"type":"string","default":"The Job succeeded and was charged, but its artifact is no longer stored; parse the file again"},"data":{"type":"object","properties":{"charged":{"type":"integer","minimum":0}},"required":["charged"],"$schema":"http://json-schema.org/draft-07/schema#"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"rate_limited"},"status":{"const":429},"message":{"type":"string","default":"Too many calls for this API key; retry after the window"},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"}},"required":["retryAfterSeconds"],"$schema":"http://json-schema.org/draft-07/schema#"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/v1/status":{"get":{"operationId":"status","summary":"The calling key, its organization and spendable credits","description":"Free. Call it first: it tells an agent whether the key works and how many credits are left before it spends any.","tags":["account"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"organization":{"type":"string"},"key":{"type":"object","properties":{"id":{"type":"string"},"scopes":{"type":"array","items":{"enum":["parse"],"type":"string"}}},"required":["id","scopes"]},"credits":{"type":"object","properties":{"spendable":{"type":"integer","minimum":0}},"required":["spendable"]},"prices":{"type":"object","properties":{"web":{"type":"object","properties":{"links":{"type":"integer","minimum":0},"scrape":{"type":"integer","minimum":0},"screenshot":{"type":"integer","minimum":0},"json":{"type":"integer","minimum":0},"crawlPage":{"type":"integer","minimum":0},"watch":{"type":"integer","minimum":0}},"required":["links","scrape","screenshot","json","crawlPage","watch"]},"search":{"type":"integer","minimum":0},"feed":{"type":"integer","minimum":0},"parse":{"type":"object","properties":{"pdfPage":{"type":"integer","minimum":0},"file":{"type":"integer","minimum":0}},"required":["pdfPage","file"]},"read":{"type":"object","properties":{"fetch":{"type":"integer","minimum":0},"browser":{"type":"integer","minimum":0},"document":{"type":"integer","minimum":0}},"required":["fetch","browser","document"]},"browser":{"type":"object","properties":{"content":{"type":"integer","minimum":0},"markdown":{"type":"integer","minimum":0},"screenshot":{"type":"integer","minimum":0},"pdf":{"type":"integer","minimum":0},"snapshot":{"type":"integer","minimum":0},"scrape":{"type":"integer","minimum":0},"links":{"type":"integer","minimum":0},"accessibilityTree":{"type":"integer","minimum":0}},"required":["content","markdown","screenshot","pdf","snapshot","scrape","links","accessibilityTree"]},"brand":{"type":"object","properties":{"profile":{"type":"integer","minimum":0},"styleguide":{"type":"integer","minimum":0},"cached":{"type":"integer","minimum":0}},"required":["profile","styleguide","cached"]}},"required":["web","search","feed","parse","read","browser","brand"]}},"required":["organization","key","credits","prices"],"$schema":"http://json-schema.org/draft-07/schema#"}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"unauthorized"},"status":{"const":401},"message":{"type":"string","default":"Missing, unknown or revoked API key"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"forbidden"},"status":{"const":403},"message":{"type":"string","default":"The API key does not carry the scope this call needs"},"data":{"type":"object","properties":{"scope":{"enum":["parse"],"type":"string"}},"required":["scope"],"$schema":"http://json-schema.org/draft-07/schema#"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"rate_limited"},"status":{"const":429},"message":{"type":"string","default":"Too many calls for this API key; retry after the window"},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"}},"required":["retryAfterSeconds"],"$schema":"http://json-schema.org/draft-07/schema#"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/v1/read":{"post":{"operationId":"read","summary":"Read a URL as clean Markdown, budgeted for an agent","description":"Web pages (a plain fetch, rendered in a browser when the page needs JavaScript), GitHub files, directories, READMEs, issues and pull requests, Codeberg issues, PDF and office documents up to 10485760 bytes, and `ctx://cache/<key>` documents a read returned. `text` is the document when it fits the window (8k estimated tokens, or `budget.maxTokens`). Past that it is a table of contents with each entry's size, a sampled list of parts for a section too large to read at once, and `$ctx` front matter saying how to read on (`section` on `ref`); a document without headings answers with its first part. A fresh read costs 1 credit, 2 when the page was rendered, 2 for a document (`charged`); a cached read (1 hour; 7 days for a commit-pinned GitHub file), navigating `ref`, empty output and every failure cost nothing.","tags":["read"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","minLength":1,"maxLength":4096},"toc":{"type":"boolean"},"section":{"type":"string","minLength":1,"maxLength":500},"budget":{"type":"object","properties":{"maxTokens":{"type":"integer","minimum":2000,"maximum":16000}},"required":[],"additionalProperties":false},"fresh":{"type":"boolean"},"noClean":{"type":"boolean"},"render":{"type":"object","properties":{"gotoOptions":{"type":"object","properties":{"waitUntil":{"anyOf":[{"enum":["load","domcontentloaded","networkidle0","networkidle2"],"type":"string"},{"type":"array","items":{"enum":["load","domcontentloaded","networkidle0","networkidle2"],"type":"string"}}]},"timeout":{"type":"integer","minimum":0,"maximum":30000},"referer":{"type":"string","maxLength":2048}},"required":[],"additionalProperties":false},"waitForSelector":{"type":"object","properties":{"selector":{"type":"string","maxLength":500},"visible":{"const":true},"hidden":{"const":true},"timeout":{"type":"integer","minimum":0,"maximum":15000}},"required":["selector"],"additionalProperties":false},"waitForTimeout":{"type":"integer","minimum":0,"maximum":10000},"viewport":{"type":"object","properties":{"width":{"type":"integer","minimum":1,"maximum":4096},"height":{"type":"integer","minimum":1,"maximum":4096},"deviceScaleFactor":{"type":"number","minimum":0.1,"maximum":4},"isMobile":{"type":"boolean"},"isLandscape":{"type":"boolean"},"hasTouch":{"type":"boolean"}},"required":["width","height"],"additionalProperties":false},"userAgent":{"type":"string","maxLength":500},"emulateMediaType":{"enum":["screen","print"],"type":"string"},"setJavaScriptEnabled":{"type":"boolean"},"rejectResourceTypes":{"type":"array","items":{"enum":["document","stylesheet","image","media","font","script","texttrack","xhr","fetch","prefetch","eventsource","websocket","manifest","signedexchange","ping","cspviolationreport","preflight","other"],"type":"string"}},"rejectRequestPattern":{"type":"array","items":{"type":"string","maxLength":500},"maxItems":50},"bestAttempt":{"type":"boolean"}},"required":[],"additionalProperties":false},"credentials":{"type":"object","properties":{"headers":{"type":"object","propertyNames":{"type":"string","maxLength":256},"additionalProperties":{"type":"string","maxLength":8192}},"cookies":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","maxLength":256},"value":{"type":"string","maxLength":8192},"url":{"type":"string","maxLength":2048},"domain":{"type":"string","maxLength":256},"path":{"type":"string","maxLength":1024},"secure":{"type":"boolean"},"httpOnly":{"type":"boolean"},"sameSite":{"enum":["Strict","Lax","None"],"type":"string"}},"required":["name","value"],"additionalProperties":false},"maxItems":100},"authenticate":{"type":"object","properties":{"username":{"type":"string","maxLength":1024},"password":{"type":"string","maxLength":1024}},"required":["username","password"],"additionalProperties":false}},"required":[],"additionalProperties":false}},"required":["url"],"$schema":"http://json-schema.org/draft-07/schema#"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"text":{"type":"string"},"ref":{"anyOf":[{"type":"string"},{"type":"null"}]},"source":{"enum":["exa","http","cloudflare","document","github","jsdelivr","github-dir-index","issue-conversation","github-pull"],"type":"string"},"contentType":{"type":"string"},"view":{"type":"object","properties":{"kind":{"enum":["full","section","toc"],"type":"string"}},"required":["kind"]},"diagnostics":{"type":"array","items":{"type":"string"}},"cached":{"type":"boolean"},"charged":{"type":"integer","minimum":0},"tier":{"anyOf":[{"enum":["fetch","browser","document"],"type":"string"},{"type":"null"}]}},"required":["text","ref","source","contentType","view","diagnostics","cached","charged","tier"],"$schema":"http://json-schema.org/draft-07/schema#"}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_target"},"status":{"const":400},"message":{"type":"string","default":"The URL names nothing read serves (a local path, a malformed GitHub, issue or ctx://cache target, a YouTube video, or options that do not apply to it); change the input; nothing was charged"},"data":{"type":"object","properties":{"reason":{"type":"string"},"charged":{"const":0}},"required":["reason","charged"],"$schema":"http://json-schema.org/draft-07/schema#"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_section"},"status":{"const":400},"message":{"type":"string","default":"The section expression is malformed (e.g. @1, @1-@3, @1.2,@3.1-@5.1, @1.2#0, or the document's own heading number 4.1); nothing was charged"},"data":{"type":"object","properties":{"reason":{"type":"string"},"charged":{"const":0}},"required":["reason","charged"],"$schema":"http://json-schema.org/draft-07/schema#"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"unauthorized"},"status":{"const":401},"message":{"type":"string","default":"Missing, unknown or revoked API key"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"402":{"description":"402","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"insufficient_credits"},"status":{"const":402},"message":{"type":"string","default":"A fresh read is admitted at its highest price and the organization has fewer credits; nothing was charged"},"data":{"type":"object","properties":{"price":{"type":"integer","minimum":0},"spendable":{"type":"integer","minimum":0},"charged":{"const":0}},"required":["price","spendable","charged"],"$schema":"http://json-schema.org/draft-07/schema#"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"cache_miss"},"status":{"const":404},"message":{"type":"string","default":"No cached document under this ctx://cache key for this organization, or it expired; read its URL again"},"data":{"type":"object","properties":{"url":{"anyOf":[{"type":"string"},{"type":"null"}]},"charged":{"const":0}},"required":["url","charged"],"$schema":"http://json-schema.org/draft-07/schema#"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"not_found"},"status":{"const":404},"message":{"type":"string","default":"The source answered that the target does not exist; check the URL; nothing was charged"},"data":{"type":"object","properties":{"reason":{"type":"string"},"charged":{"const":0}},"required":["reason","charged"],"$schema":"http://json-schema.org/draft-07/schema#"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"413":{"description":"413","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"too_large"},"status":{"const":413},"message":{"type":"string","default":"The content is larger than read takes; for a document, upload it to `parse` (`POST /v1/files`); nothing was charged"},"data":{"type":"object","properties":{"maxBytes":{"type":"number"},"alternative":{"anyOf":[{"const":"parse"},{"type":"null"}]},"charged":{"const":0}},"required":["maxBytes","alternative","charged"],"$schema":"http://json-schema.org/draft-07/schema#"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"415":{"description":"415","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"unsupported_document"},"status":{"const":415},"message":{"type":"string","default":"read converts PDF, Word (.docx), Excel and OpenDocument text and spreadsheets; upload other documents to `parse`; nothing was charged"},"data":{"type":"object","properties":{"contentType":{"type":"string"},"alternative":{"const":"parse"},"charged":{"const":0}},"required":["contentType","alternative","charged"],"$schema":"http://json-schema.org/draft-07/schema#"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"section_not_found"},"status":{"const":422},"message":{"type":"string","default":"The document has no such section (or the selectors overlap); read `ref` with `toc` for its locators. A fresh fetch was charged and cached, so that is free"},"data":{"type":"object","properties":{"reason":{"type":"string"},"ref":{"anyOf":[{"type":"string"},{"type":"null"}]},"charged":{"type":"integer","minimum":0}},"required":["reason","ref","charged"],"$schema":"http://json-schema.org/draft-07/schema#"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"render_failed"},"status":{"const":422},"message":{"type":"string","default":"Browser Rendering could not render the page with these options (a bad selector, a conversion failure); change the render options; nothing was charged"},"data":{"type":"object","properties":{"reason":{"type":"string"},"charged":{"const":0}},"required":["reason","charged"],"$schema":"http://json-schema.org/draft-07/schema#"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"unreadable_document"},"status":{"const":422},"message":{"type":"string","default":"The document could not be converted (corrupt or protected); nothing was charged"},"data":{"type":"object","properties":{"charged":{"const":0}},"required":["charged"],"$schema":"http://json-schema.org/draft-07/schema#"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"rate_limited"},"status":{"const":429},"message":{"type":"string","default":"Too many calls for this API key; retry after the window; nothing was charged"},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"charged":{"const":0}},"required":["retryAfterSeconds","charged"],"$schema":"http://json-schema.org/draft-07/schema#"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"502":{"description":"502","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"upstream_error"},"status":{"const":502},"message":{"type":"string","default":"The source refused or failed (an HTTP error, a GitHub rate limit, credentials it rejects); retry after the delay when one is given, or change the credentials; nothing was charged"},"data":{"type":"object","properties":{"reason":{"type":"string"},"status":{"anyOf":[{"type":"number"},{"type":"null"}]},"retryAfterSeconds":{"anyOf":[{"type":"number"},{"type":"null"}]},"charged":{"const":0}},"required":["reason","status","retryAfterSeconds","charged"],"$schema":"http://json-schema.org/draft-07/schema#"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"503":{"description":"503","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"provider_unavailable"},"status":{"const":503},"message":{"type":"string","default":"Browser Rendering or Workers AI is unavailable; retry after the delay; nothing was charged"},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"},"charged":{"const":0}},"required":["retryAfterSeconds","charged"],"$schema":"http://json-schema.org/draft-07/schema#"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"504":{"description":"504","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"render_timeout"},"status":{"const":504},"message":{"type":"string","default":"Rendering ran past its timeout; use shorter waits, or retry; nothing was charged"},"data":{"type":"object","properties":{"timeoutSeconds":{"type":"number"},"charged":{"const":0}},"required":["timeoutSeconds","charged"],"$schema":"http://json-schema.org/draft-07/schema#"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/v1/brand":{"post":{"operationId":"brand","summary":"Start a Job that reads a brand from its site","description":"Give `domain` (`linear.app`) or `url` (a page to read the brand from), and `depth`: `profile` (identity, logos, colors, semantic profile) or `styleguide` (those, plus the visual system and font files). A domain, or a url naming a site's root, is the site, cached by its host (`www.` folded); a url naming any other page (a path or a query) is cached for that page alone. Both are rendered over https. Admits a Job at the depth's price, 10 credits for `profile` and 15 for `styleguide`, or 1 when the brand is cached (read within 30 days, by anyone), and charges it only when the Job succeeds. Follow it with `GET /v1/brand/{jobId}/events` (Server-Sent Events: one event per stage as it finishes, then `done` or `failed`) or poll `GET /v1/brand/{jobId}`.","tags":["brand"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"domain":{"type":"string","maxLength":253},"url":{"type":"string","maxLength":2048},"depth":{"enum":["profile","styleguide"],"type":"string"}},"required":["depth"],"$schema":"http://json-schema.org/draft-07/schema#"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"jobId":{"type":"string"},"domain":{"type":"string"},"credits":{"type":"integer","minimum":0},"cached":{"type":"boolean"}},"required":["jobId","domain","credits","cached"],"$schema":"http://json-schema.org/draft-07/schema#"}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_domain"},"status":{"const":400},"message":{"type":"string","default":"Give exactly one of domain or url, naming a public site over http(s)"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"unauthorized"},"status":{"const":401},"message":{"type":"string","default":"Missing, unknown or revoked API key"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"402":{"description":"402","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"insufficient_credits"},"status":{"const":402},"message":{"type":"string","default":"The organization has fewer credits than this Job costs"},"data":{"type":"object","properties":{"price":{"type":"integer","minimum":0},"spendable":{"type":"integer","minimum":0}},"required":["price","spendable"],"$schema":"http://json-schema.org/draft-07/schema#"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"forbidden"},"status":{"const":403},"message":{"type":"string","default":"The API key does not carry the scope this call needs"},"data":{"type":"object","properties":{"scope":{"enum":["parse"],"type":"string"}},"required":["scope"],"$schema":"http://json-schema.org/draft-07/schema#"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"rate_limited"},"status":{"const":429},"message":{"type":"string","default":"Too many calls for this API key; retry after the window"},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"}},"required":["retryAfterSeconds"],"$schema":"http://json-schema.org/draft-07/schema#"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"503":{"description":"503","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"provider_unavailable"},"status":{"const":503},"message":{"type":"string","default":"The Job could not be started; retry after the delay; nothing was charged"},"data":{"type":"object","properties":{"charged":{"const":0},"retryAfterSeconds":{"type":"number"}},"required":["charged","retryAfterSeconds"],"$schema":"http://json-schema.org/draft-07/schema#"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/v1/brand/{jobId}":{"get":{"operationId":"brandJob","summary":"A brand Job's whole state","description":"Free. The brand so far (each finished stage's part), the price it was admitted at and `lastEventId`; `succeeded` adds what was charged, `failed` why, uncharged. The same events stream from `GET /v1/brand/{jobId}/events`: Server-Sent Events, each with `id`, `event` (the stage, `done` or `failed`) and `data` (JSON); send `Last-Event-ID` to resume after an event, and a subscriber that joins late replays every event from the first. A Job is kept 30 days.","tags":["brand"],"parameters":[{"name":"jobId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"status":{"const":"queued"},"domain":{"type":"string"},"depth":{"enum":["profile","styleguide"],"type":"string"},"credits":{"type":"integer","minimum":0},"cached":{"type":"boolean"},"lastEventId":{"type":"number"},"brand":{"type":"object","properties":{"render":{"type":"object","properties":{"url":{"type":"string"},"finalUrl":{"type":"string"},"status":{"type":"number"},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"screenshot":{"type":"object","properties":{"url":{"type":"string"},"sourceUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"format":{"enum":["svg","png","jpeg","gif","webp","ico","avif"],"type":"string"},"width":{"anyOf":[{"type":"number"},{"type":"null"}]},"height":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["url","sourceUrl","format","width","height"]}},"required":["url","finalUrl","status","title","screenshot"]},"identity":{"type":"object","properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"slogan":{"anyOf":[{"type":"string"},{"type":"null"}]},"language":{"anyOf":[{"type":"string"},{"type":"null"}]},"socials":{"type":"array","items":{"type":"object","properties":{"type":{"enum":["x","linkedin","github","youtube","instagram","facebook","tiktok","discord","threads","bluesky","mastodon","pinterest","reddit","medium","dribbble","producthunt","crunchbase"],"type":"string"},"url":{"type":"string"}},"required":["type","url"]}},"links":{"type":"object","properties":{"pricing":{"anyOf":[{"type":"string"},{"type":"null"}]},"blog":{"anyOf":[{"type":"string"},{"type":"null"}]},"docs":{"anyOf":[{"type":"string"},{"type":"null"}]},"careers":{"anyOf":[{"type":"string"},{"type":"null"}]},"contact":{"anyOf":[{"type":"string"},{"type":"null"}]},"privacy":{"anyOf":[{"type":"string"},{"type":"null"}]},"terms":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["pricing","blog","docs","careers","contact","privacy","terms"]},"email":{"anyOf":[{"type":"string"},{"type":"null"}]},"phone":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["name","title","description","slogan","language","socials","links","email","phone"]},"logos":{"type":"object","properties":{"logos":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string"},"sourceUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"format":{"enum":["svg","png","jpeg","gif","webp","ico","avif"],"type":"string"},"width":{"anyOf":[{"type":"number"},{"type":"null"}]},"height":{"anyOf":[{"type":"number"},{"type":"null"}]},"type":{"enum":["icon","logo"],"type":"string"},"mode":{"enum":["light","dark","opaque"],"type":"string"},"source":{"enum":["header","json-ld","apple-touch-icon","icon","mask-icon","manifest","favicon"],"type":"string"},"colors":{"type":"array","items":{"type":"string","pattern":"^#[0-9a-f]{6}$"}}},"required":["url","sourceUrl","format","width","height","type","mode","source","colors"]}},"backdrops":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string"},"sourceUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"format":{"enum":["svg","png","jpeg","gif","webp","ico","avif"],"type":"string"},"width":{"anyOf":[{"type":"number"},{"type":"null"}]},"height":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["url","sourceUrl","format","width","height"]}}},"required":["logos","backdrops"]},"colors":{"type":"object","properties":{"colors":{"type":"array","items":{"type":"object","properties":{"hex":{"type":"string","pattern":"^#[0-9a-f]{6}$"},"source":{"enum":["logo","site"],"type":"string"},"role":{"enum":["mark","accent","theme","background","text"],"type":"string"}},"required":["hex","source","role"]}}},"required":["colors"]},"styleguide":{"type":"object","properties":{"colors":{"type":"object","properties":{"background":{"type":"string","pattern":"^#[0-9a-f]{6}$"},"text":{"type":"string","pattern":"^#[0-9a-f]{6}$"},"accent":{"anyOf":[{"type":"string","pattern":"^#[0-9a-f]{6}$"},{"type":"null"}]},"surface":{"anyOf":[{"type":"string","pattern":"^#[0-9a-f]{6}$"},{"type":"null"}]},"muted":{"anyOf":[{"type":"string","pattern":"^#[0-9a-f]{6}$"},{"type":"null"}]},"border":{"anyOf":[{"type":"string","pattern":"^#[0-9a-f]{6}$"},{"type":"null"}]},"palette":{"type":"array","items":{"type":"object","properties":{"hex":{"type":"string","pattern":"^#[0-9a-f]{6}$"},"role":{"enum":["background","surface","text"],"type":"string"},"share":{"type":"number"}},"required":["hex","role","share"]}}},"required":["background","text","accent","surface","muted","border","palette"]},"typography":{"type":"object","properties":{"headings":{"type":"object","properties":{"h1":{"anyOf":[{"type":"object","properties":{"family":{"type":"string"},"stack":{"type":"string"},"size":{"type":"number"},"weight":{"type":"number"},"lineHeight":{"anyOf":[{"type":"number"},{"type":"null"}]},"letterSpacing":{"type":"number"},"transform":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"type":"string","pattern":"^#[0-9a-f]{6}$"},"css":{"type":"string"}},"required":["family","stack","size","weight","lineHeight","letterSpacing","transform","color","css"]},{"type":"null"}]},"h2":{"anyOf":[{"type":"object","properties":{"family":{"type":"string"},"stack":{"type":"string"},"size":{"type":"number"},"weight":{"type":"number"},"lineHeight":{"anyOf":[{"type":"number"},{"type":"null"}]},"letterSpacing":{"type":"number"},"transform":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"type":"string","pattern":"^#[0-9a-f]{6}$"},"css":{"type":"string"}},"required":["family","stack","size","weight","lineHeight","letterSpacing","transform","color","css"]},{"type":"null"}]},"h3":{"anyOf":[{"type":"object","properties":{"family":{"type":"string"},"stack":{"type":"string"},"size":{"type":"number"},"weight":{"type":"number"},"lineHeight":{"anyOf":[{"type":"number"},{"type":"null"}]},"letterSpacing":{"type":"number"},"transform":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"type":"string","pattern":"^#[0-9a-f]{6}$"},"css":{"type":"string"}},"required":["family","stack","size","weight","lineHeight","letterSpacing","transform","color","css"]},{"type":"null"}]},"h4":{"anyOf":[{"type":"object","properties":{"family":{"type":"string"},"stack":{"type":"string"},"size":{"type":"number"},"weight":{"type":"number"},"lineHeight":{"anyOf":[{"type":"number"},{"type":"null"}]},"letterSpacing":{"type":"number"},"transform":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"type":"string","pattern":"^#[0-9a-f]{6}$"},"css":{"type":"string"}},"required":["family","stack","size","weight","lineHeight","letterSpacing","transform","color","css"]},{"type":"null"}]}},"required":["h1","h2","h3","h4"]},"body":{"anyOf":[{"type":"object","properties":{"family":{"type":"string"},"stack":{"type":"string"},"size":{"type":"number"},"weight":{"type":"number"},"lineHeight":{"anyOf":[{"type":"number"},{"type":"null"}]},"letterSpacing":{"type":"number"},"transform":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"type":"string","pattern":"^#[0-9a-f]{6}$"},"css":{"type":"string"}},"required":["family","stack","size","weight","lineHeight","letterSpacing","transform","color","css"]},{"type":"null"}]},"scale":{"type":"array","items":{"type":"object","properties":{"family":{"type":"string"},"stack":{"type":"string"},"size":{"type":"number"},"weight":{"type":"number"},"lineHeight":{"anyOf":[{"type":"number"},{"type":"null"}]},"letterSpacing":{"type":"number"},"transform":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"type":"string","pattern":"^#[0-9a-f]{6}$"},"css":{"type":"string"}},"required":["family","stack","size","weight","lineHeight","letterSpacing","transform","color","css"]}}},"required":["headings","body","scale"]},"spacing":{"type":"array","items":{"type":"number"}},"radii":{"type":"array","items":{"type":"number"}},"shadows":{"type":"array","items":{"type":"string"}},"components":{"type":"object","properties":{"button":{"type":"object","properties":{"primary":{"anyOf":[{"type":"object","properties":{"family":{"type":"string"},"stack":{"type":"string"},"size":{"type":"number"},"weight":{"type":"number"},"lineHeight":{"anyOf":[{"type":"number"},{"type":"null"}]},"letterSpacing":{"type":"number"},"transform":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"type":"string","pattern":"^#[0-9a-f]{6}$"},"css":{"type":"string"},"background":{"anyOf":[{"type":"string"},{"type":"null"}]},"backgroundImage":{"anyOf":[{"type":"string"},{"type":"null"}]},"border":{"anyOf":[{"type":"string"},{"type":"null"}]},"radius":{"type":"number"},"padding":{"type":"string"},"shadow":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["family","stack","size","weight","lineHeight","letterSpacing","transform","color","css","background","backgroundImage","border","radius","padding","shadow"]},{"type":"null"}]},"secondary":{"anyOf":[{"type":"object","properties":{"family":{"type":"string"},"stack":{"type":"string"},"size":{"type":"number"},"weight":{"type":"number"},"lineHeight":{"anyOf":[{"type":"number"},{"type":"null"}]},"letterSpacing":{"type":"number"},"transform":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"type":"string","pattern":"^#[0-9a-f]{6}$"},"css":{"type":"string"},"background":{"anyOf":[{"type":"string"},{"type":"null"}]},"backgroundImage":{"anyOf":[{"type":"string"},{"type":"null"}]},"border":{"anyOf":[{"type":"string"},{"type":"null"}]},"radius":{"type":"number"},"padding":{"type":"string"},"shadow":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["family","stack","size","weight","lineHeight","letterSpacing","transform","color","css","background","backgroundImage","border","radius","padding","shadow"]},{"type":"null"}]},"link":{"anyOf":[{"type":"object","properties":{"family":{"type":"string"},"stack":{"type":"string"},"size":{"type":"number"},"weight":{"type":"number"},"lineHeight":{"anyOf":[{"type":"number"},{"type":"null"}]},"letterSpacing":{"type":"number"},"transform":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"type":"string","pattern":"^#[0-9a-f]{6}$"},"css":{"type":"string"},"decoration":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["family","stack","size","weight","lineHeight","letterSpacing","transform","color","css","decoration"]},{"type":"null"}]}},"required":["primary","secondary","link"]},"input":{"anyOf":[{"type":"object","properties":{"family":{"type":"string"},"stack":{"type":"string"},"size":{"type":"number"},"weight":{"type":"number"},"lineHeight":{"anyOf":[{"type":"number"},{"type":"null"}]},"letterSpacing":{"type":"number"},"transform":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"type":"string","pattern":"^#[0-9a-f]{6}$"},"css":{"type":"string"},"background":{"anyOf":[{"type":"string"},{"type":"null"}]},"backgroundImage":{"anyOf":[{"type":"string"},{"type":"null"}]},"border":{"anyOf":[{"type":"string"},{"type":"null"}]},"radius":{"type":"number"},"padding":{"type":"string"},"shadow":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["family","stack","size","weight","lineHeight","letterSpacing","transform","color","css","background","backgroundImage","border","radius","padding","shadow"]},{"type":"null"}]},"card":{"anyOf":[{"type":"object","properties":{"family":{"type":"string"},"stack":{"type":"string"},"size":{"type":"number"},"weight":{"type":"number"},"lineHeight":{"anyOf":[{"type":"number"},{"type":"null"}]},"letterSpacing":{"type":"number"},"transform":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"type":"string","pattern":"^#[0-9a-f]{6}$"},"css":{"type":"string"},"background":{"anyOf":[{"type":"string"},{"type":"null"}]},"backgroundImage":{"anyOf":[{"type":"string"},{"type":"null"}]},"border":{"anyOf":[{"type":"string"},{"type":"null"}]},"radius":{"type":"number"},"padding":{"type":"string"},"shadow":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["family","stack","size","weight","lineHeight","letterSpacing","transform","color","css","background","backgroundImage","border","radius","padding","shadow"]},{"type":"null"}]}},"required":["button","input","card"]}},"required":["colors","typography","spacing","radii","shadows","components"]},"fonts":{"type":"object","properties":{"families":{"type":"array","items":{"type":"object","properties":{"family":{"type":"string"},"provider":{"anyOf":[{"enum":["google-fonts","adobe-fonts","bunny-fonts","fontshare","system"],"type":"string"},{"type":"null"}]},"stylesheet":{"anyOf":[{"type":"string"},{"type":"null"}]},"weights":{"type":"array","items":{"type":"number"}},"files":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string"},"sourceUrl":{"type":"string"},"format":{"enum":["woff2","woff","ttf","otf"],"type":"string"},"weight":{"type":"string"},"style":{"type":"string"},"unicodeRange":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["url","sourceUrl","format","weight","style","unicodeRange"]}}},"required":["family","provider","stylesheet","weights","files"]}},"css":{"type":"string"}},"required":["families","css"]},"profile":{"type":"object","properties":{"description":{"type":"string"},"category":{"type":"string"},"offerings":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"}},"required":["name","description"]}},"audience":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"}},"required":["name","description"]}},"competitors":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"domain":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["name","domain"]}}},"required":["description","category","offerings","audience","competitors"]}},"required":[]}},"required":["status","domain","depth","credits","cached","lastEventId","brand"]},{"type":"object","properties":{"status":{"const":"running"},"domain":{"type":"string"},"depth":{"enum":["profile","styleguide"],"type":"string"},"credits":{"type":"integer","minimum":0},"cached":{"type":"boolean"},"lastEventId":{"type":"number"},"brand":{"type":"object","properties":{"render":{"type":"object","properties":{"url":{"type":"string"},"finalUrl":{"type":"string"},"status":{"type":"number"},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"screenshot":{"type":"object","properties":{"url":{"type":"string"},"sourceUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"format":{"enum":["svg","png","jpeg","gif","webp","ico","avif"],"type":"string"},"width":{"anyOf":[{"type":"number"},{"type":"null"}]},"height":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["url","sourceUrl","format","width","height"]}},"required":["url","finalUrl","status","title","screenshot"]},"identity":{"type":"object","properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"slogan":{"anyOf":[{"type":"string"},{"type":"null"}]},"language":{"anyOf":[{"type":"string"},{"type":"null"}]},"socials":{"type":"array","items":{"type":"object","properties":{"type":{"enum":["x","linkedin","github","youtube","instagram","facebook","tiktok","discord","threads","bluesky","mastodon","pinterest","reddit","medium","dribbble","producthunt","crunchbase"],"type":"string"},"url":{"type":"string"}},"required":["type","url"]}},"links":{"type":"object","properties":{"pricing":{"anyOf":[{"type":"string"},{"type":"null"}]},"blog":{"anyOf":[{"type":"string"},{"type":"null"}]},"docs":{"anyOf":[{"type":"string"},{"type":"null"}]},"careers":{"anyOf":[{"type":"string"},{"type":"null"}]},"contact":{"anyOf":[{"type":"string"},{"type":"null"}]},"privacy":{"anyOf":[{"type":"string"},{"type":"null"}]},"terms":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["pricing","blog","docs","careers","contact","privacy","terms"]},"email":{"anyOf":[{"type":"string"},{"type":"null"}]},"phone":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["name","title","description","slogan","language","socials","links","email","phone"]},"logos":{"type":"object","properties":{"logos":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string"},"sourceUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"format":{"enum":["svg","png","jpeg","gif","webp","ico","avif"],"type":"string"},"width":{"anyOf":[{"type":"number"},{"type":"null"}]},"height":{"anyOf":[{"type":"number"},{"type":"null"}]},"type":{"enum":["icon","logo"],"type":"string"},"mode":{"enum":["light","dark","opaque"],"type":"string"},"source":{"enum":["header","json-ld","apple-touch-icon","icon","mask-icon","manifest","favicon"],"type":"string"},"colors":{"type":"array","items":{"type":"string","pattern":"^#[0-9a-f]{6}$"}}},"required":["url","sourceUrl","format","width","height","type","mode","source","colors"]}},"backdrops":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string"},"sourceUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"format":{"enum":["svg","png","jpeg","gif","webp","ico","avif"],"type":"string"},"width":{"anyOf":[{"type":"number"},{"type":"null"}]},"height":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["url","sourceUrl","format","width","height"]}}},"required":["logos","backdrops"]},"colors":{"type":"object","properties":{"colors":{"type":"array","items":{"type":"object","properties":{"hex":{"type":"string","pattern":"^#[0-9a-f]{6}$"},"source":{"enum":["logo","site"],"type":"string"},"role":{"enum":["mark","accent","theme","background","text"],"type":"string"}},"required":["hex","source","role"]}}},"required":["colors"]},"styleguide":{"type":"object","properties":{"colors":{"type":"object","properties":{"background":{"type":"string","pattern":"^#[0-9a-f]{6}$"},"text":{"type":"string","pattern":"^#[0-9a-f]{6}$"},"accent":{"anyOf":[{"type":"string","pattern":"^#[0-9a-f]{6}$"},{"type":"null"}]},"surface":{"anyOf":[{"type":"string","pattern":"^#[0-9a-f]{6}$"},{"type":"null"}]},"muted":{"anyOf":[{"type":"string","pattern":"^#[0-9a-f]{6}$"},{"type":"null"}]},"border":{"anyOf":[{"type":"string","pattern":"^#[0-9a-f]{6}$"},{"type":"null"}]},"palette":{"type":"array","items":{"type":"object","properties":{"hex":{"type":"string","pattern":"^#[0-9a-f]{6}$"},"role":{"enum":["background","surface","text"],"type":"string"},"share":{"type":"number"}},"required":["hex","role","share"]}}},"required":["background","text","accent","surface","muted","border","palette"]},"typography":{"type":"object","properties":{"headings":{"type":"object","properties":{"h1":{"anyOf":[{"type":"object","properties":{"family":{"type":"string"},"stack":{"type":"string"},"size":{"type":"number"},"weight":{"type":"number"},"lineHeight":{"anyOf":[{"type":"number"},{"type":"null"}]},"letterSpacing":{"type":"number"},"transform":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"type":"string","pattern":"^#[0-9a-f]{6}$"},"css":{"type":"string"}},"required":["family","stack","size","weight","lineHeight","letterSpacing","transform","color","css"]},{"type":"null"}]},"h2":{"anyOf":[{"type":"object","properties":{"family":{"type":"string"},"stack":{"type":"string"},"size":{"type":"number"},"weight":{"type":"number"},"lineHeight":{"anyOf":[{"type":"number"},{"type":"null"}]},"letterSpacing":{"type":"number"},"transform":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"type":"string","pattern":"^#[0-9a-f]{6}$"},"css":{"type":"string"}},"required":["family","stack","size","weight","lineHeight","letterSpacing","transform","color","css"]},{"type":"null"}]},"h3":{"anyOf":[{"type":"object","properties":{"family":{"type":"string"},"stack":{"type":"string"},"size":{"type":"number"},"weight":{"type":"number"},"lineHeight":{"anyOf":[{"type":"number"},{"type":"null"}]},"letterSpacing":{"type":"number"},"transform":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"type":"string","pattern":"^#[0-9a-f]{6}$"},"css":{"type":"string"}},"required":["family","stack","size","weight","lineHeight","letterSpacing","transform","color","css"]},{"type":"null"}]},"h4":{"anyOf":[{"type":"object","properties":{"family":{"type":"string"},"stack":{"type":"string"},"size":{"type":"number"},"weight":{"type":"number"},"lineHeight":{"anyOf":[{"type":"number"},{"type":"null"}]},"letterSpacing":{"type":"number"},"transform":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"type":"string","pattern":"^#[0-9a-f]{6}$"},"css":{"type":"string"}},"required":["family","stack","size","weight","lineHeight","letterSpacing","transform","color","css"]},{"type":"null"}]}},"required":["h1","h2","h3","h4"]},"body":{"anyOf":[{"type":"object","properties":{"family":{"type":"string"},"stack":{"type":"string"},"size":{"type":"number"},"weight":{"type":"number"},"lineHeight":{"anyOf":[{"type":"number"},{"type":"null"}]},"letterSpacing":{"type":"number"},"transform":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"type":"string","pattern":"^#[0-9a-f]{6}$"},"css":{"type":"string"}},"required":["family","stack","size","weight","lineHeight","letterSpacing","transform","color","css"]},{"type":"null"}]},"scale":{"type":"array","items":{"type":"object","properties":{"family":{"type":"string"},"stack":{"type":"string"},"size":{"type":"number"},"weight":{"type":"number"},"lineHeight":{"anyOf":[{"type":"number"},{"type":"null"}]},"letterSpacing":{"type":"number"},"transform":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"type":"string","pattern":"^#[0-9a-f]{6}$"},"css":{"type":"string"}},"required":["family","stack","size","weight","lineHeight","letterSpacing","transform","color","css"]}}},"required":["headings","body","scale"]},"spacing":{"type":"array","items":{"type":"number"}},"radii":{"type":"array","items":{"type":"number"}},"shadows":{"type":"array","items":{"type":"string"}},"components":{"type":"object","properties":{"button":{"type":"object","properties":{"primary":{"anyOf":[{"type":"object","properties":{"family":{"type":"string"},"stack":{"type":"string"},"size":{"type":"number"},"weight":{"type":"number"},"lineHeight":{"anyOf":[{"type":"number"},{"type":"null"}]},"letterSpacing":{"type":"number"},"transform":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"type":"string","pattern":"^#[0-9a-f]{6}$"},"css":{"type":"string"},"background":{"anyOf":[{"type":"string"},{"type":"null"}]},"backgroundImage":{"anyOf":[{"type":"string"},{"type":"null"}]},"border":{"anyOf":[{"type":"string"},{"type":"null"}]},"radius":{"type":"number"},"padding":{"type":"string"},"shadow":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["family","stack","size","weight","lineHeight","letterSpacing","transform","color","css","background","backgroundImage","border","radius","padding","shadow"]},{"type":"null"}]},"secondary":{"anyOf":[{"type":"object","properties":{"family":{"type":"string"},"stack":{"type":"string"},"size":{"type":"number"},"weight":{"type":"number"},"lineHeight":{"anyOf":[{"type":"number"},{"type":"null"}]},"letterSpacing":{"type":"number"},"transform":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"type":"string","pattern":"^#[0-9a-f]{6}$"},"css":{"type":"string"},"background":{"anyOf":[{"type":"string"},{"type":"null"}]},"backgroundImage":{"anyOf":[{"type":"string"},{"type":"null"}]},"border":{"anyOf":[{"type":"string"},{"type":"null"}]},"radius":{"type":"number"},"padding":{"type":"string"},"shadow":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["family","stack","size","weight","lineHeight","letterSpacing","transform","color","css","background","backgroundImage","border","radius","padding","shadow"]},{"type":"null"}]},"link":{"anyOf":[{"type":"object","properties":{"family":{"type":"string"},"stack":{"type":"string"},"size":{"type":"number"},"weight":{"type":"number"},"lineHeight":{"anyOf":[{"type":"number"},{"type":"null"}]},"letterSpacing":{"type":"number"},"transform":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"type":"string","pattern":"^#[0-9a-f]{6}$"},"css":{"type":"string"},"decoration":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["family","stack","size","weight","lineHeight","letterSpacing","transform","color","css","decoration"]},{"type":"null"}]}},"required":["primary","secondary","link"]},"input":{"anyOf":[{"type":"object","properties":{"family":{"type":"string"},"stack":{"type":"string"},"size":{"type":"number"},"weight":{"type":"number"},"lineHeight":{"anyOf":[{"type":"number"},{"type":"null"}]},"letterSpacing":{"type":"number"},"transform":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"type":"string","pattern":"^#[0-9a-f]{6}$"},"css":{"type":"string"},"background":{"anyOf":[{"type":"string"},{"type":"null"}]},"backgroundImage":{"anyOf":[{"type":"string"},{"type":"null"}]},"border":{"anyOf":[{"type":"string"},{"type":"null"}]},"radius":{"type":"number"},"padding":{"type":"string"},"shadow":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["family","stack","size","weight","lineHeight","letterSpacing","transform","color","css","background","backgroundImage","border","radius","padding","shadow"]},{"type":"null"}]},"card":{"anyOf":[{"type":"object","properties":{"family":{"type":"string"},"stack":{"type":"string"},"size":{"type":"number"},"weight":{"type":"number"},"lineHeight":{"anyOf":[{"type":"number"},{"type":"null"}]},"letterSpacing":{"type":"number"},"transform":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"type":"string","pattern":"^#[0-9a-f]{6}$"},"css":{"type":"string"},"background":{"anyOf":[{"type":"string"},{"type":"null"}]},"backgroundImage":{"anyOf":[{"type":"string"},{"type":"null"}]},"border":{"anyOf":[{"type":"string"},{"type":"null"}]},"radius":{"type":"number"},"padding":{"type":"string"},"shadow":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["family","stack","size","weight","lineHeight","letterSpacing","transform","color","css","background","backgroundImage","border","radius","padding","shadow"]},{"type":"null"}]}},"required":["button","input","card"]}},"required":["colors","typography","spacing","radii","shadows","components"]},"fonts":{"type":"object","properties":{"families":{"type":"array","items":{"type":"object","properties":{"family":{"type":"string"},"provider":{"anyOf":[{"enum":["google-fonts","adobe-fonts","bunny-fonts","fontshare","system"],"type":"string"},{"type":"null"}]},"stylesheet":{"anyOf":[{"type":"string"},{"type":"null"}]},"weights":{"type":"array","items":{"type":"number"}},"files":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string"},"sourceUrl":{"type":"string"},"format":{"enum":["woff2","woff","ttf","otf"],"type":"string"},"weight":{"type":"string"},"style":{"type":"string"},"unicodeRange":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["url","sourceUrl","format","weight","style","unicodeRange"]}}},"required":["family","provider","stylesheet","weights","files"]}},"css":{"type":"string"}},"required":["families","css"]},"profile":{"type":"object","properties":{"description":{"type":"string"},"category":{"type":"string"},"offerings":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"}},"required":["name","description"]}},"audience":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"}},"required":["name","description"]}},"competitors":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"domain":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["name","domain"]}}},"required":["description","category","offerings","audience","competitors"]}},"required":[]}},"required":["status","domain","depth","credits","cached","lastEventId","brand"]},{"type":"object","properties":{"status":{"const":"succeeded"},"domain":{"type":"string"},"depth":{"enum":["profile","styleguide"],"type":"string"},"credits":{"type":"integer","minimum":0},"cached":{"type":"boolean"},"lastEventId":{"type":"number"},"brand":{"type":"object","properties":{"render":{"type":"object","properties":{"url":{"type":"string"},"finalUrl":{"type":"string"},"status":{"type":"number"},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"screenshot":{"type":"object","properties":{"url":{"type":"string"},"sourceUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"format":{"enum":["svg","png","jpeg","gif","webp","ico","avif"],"type":"string"},"width":{"anyOf":[{"type":"number"},{"type":"null"}]},"height":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["url","sourceUrl","format","width","height"]}},"required":["url","finalUrl","status","title","screenshot"]},"identity":{"type":"object","properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"slogan":{"anyOf":[{"type":"string"},{"type":"null"}]},"language":{"anyOf":[{"type":"string"},{"type":"null"}]},"socials":{"type":"array","items":{"type":"object","properties":{"type":{"enum":["x","linkedin","github","youtube","instagram","facebook","tiktok","discord","threads","bluesky","mastodon","pinterest","reddit","medium","dribbble","producthunt","crunchbase"],"type":"string"},"url":{"type":"string"}},"required":["type","url"]}},"links":{"type":"object","properties":{"pricing":{"anyOf":[{"type":"string"},{"type":"null"}]},"blog":{"anyOf":[{"type":"string"},{"type":"null"}]},"docs":{"anyOf":[{"type":"string"},{"type":"null"}]},"careers":{"anyOf":[{"type":"string"},{"type":"null"}]},"contact":{"anyOf":[{"type":"string"},{"type":"null"}]},"privacy":{"anyOf":[{"type":"string"},{"type":"null"}]},"terms":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["pricing","blog","docs","careers","contact","privacy","terms"]},"email":{"anyOf":[{"type":"string"},{"type":"null"}]},"phone":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["name","title","description","slogan","language","socials","links","email","phone"]},"logos":{"type":"object","properties":{"logos":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string"},"sourceUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"format":{"enum":["svg","png","jpeg","gif","webp","ico","avif"],"type":"string"},"width":{"anyOf":[{"type":"number"},{"type":"null"}]},"height":{"anyOf":[{"type":"number"},{"type":"null"}]},"type":{"enum":["icon","logo"],"type":"string"},"mode":{"enum":["light","dark","opaque"],"type":"string"},"source":{"enum":["header","json-ld","apple-touch-icon","icon","mask-icon","manifest","favicon"],"type":"string"},"colors":{"type":"array","items":{"type":"string","pattern":"^#[0-9a-f]{6}$"}}},"required":["url","sourceUrl","format","width","height","type","mode","source","colors"]}},"backdrops":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string"},"sourceUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"format":{"enum":["svg","png","jpeg","gif","webp","ico","avif"],"type":"string"},"width":{"anyOf":[{"type":"number"},{"type":"null"}]},"height":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["url","sourceUrl","format","width","height"]}}},"required":["logos","backdrops"]},"colors":{"type":"object","properties":{"colors":{"type":"array","items":{"type":"object","properties":{"hex":{"type":"string","pattern":"^#[0-9a-f]{6}$"},"source":{"enum":["logo","site"],"type":"string"},"role":{"enum":["mark","accent","theme","background","text"],"type":"string"}},"required":["hex","source","role"]}}},"required":["colors"]},"styleguide":{"type":"object","properties":{"colors":{"type":"object","properties":{"background":{"type":"string","pattern":"^#[0-9a-f]{6}$"},"text":{"type":"string","pattern":"^#[0-9a-f]{6}$"},"accent":{"anyOf":[{"type":"string","pattern":"^#[0-9a-f]{6}$"},{"type":"null"}]},"surface":{"anyOf":[{"type":"string","pattern":"^#[0-9a-f]{6}$"},{"type":"null"}]},"muted":{"anyOf":[{"type":"string","pattern":"^#[0-9a-f]{6}$"},{"type":"null"}]},"border":{"anyOf":[{"type":"string","pattern":"^#[0-9a-f]{6}$"},{"type":"null"}]},"palette":{"type":"array","items":{"type":"object","properties":{"hex":{"type":"string","pattern":"^#[0-9a-f]{6}$"},"role":{"enum":["background","surface","text"],"type":"string"},"share":{"type":"number"}},"required":["hex","role","share"]}}},"required":["background","text","accent","surface","muted","border","palette"]},"typography":{"type":"object","properties":{"headings":{"type":"object","properties":{"h1":{"anyOf":[{"type":"object","properties":{"family":{"type":"string"},"stack":{"type":"string"},"size":{"type":"number"},"weight":{"type":"number"},"lineHeight":{"anyOf":[{"type":"number"},{"type":"null"}]},"letterSpacing":{"type":"number"},"transform":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"type":"string","pattern":"^#[0-9a-f]{6}$"},"css":{"type":"string"}},"required":["family","stack","size","weight","lineHeight","letterSpacing","transform","color","css"]},{"type":"null"}]},"h2":{"anyOf":[{"type":"object","properties":{"family":{"type":"string"},"stack":{"type":"string"},"size":{"type":"number"},"weight":{"type":"number"},"lineHeight":{"anyOf":[{"type":"number"},{"type":"null"}]},"letterSpacing":{"type":"number"},"transform":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"type":"string","pattern":"^#[0-9a-f]{6}$"},"css":{"type":"string"}},"required":["family","stack","size","weight","lineHeight","letterSpacing","transform","color","css"]},{"type":"null"}]},"h3":{"anyOf":[{"type":"object","properties":{"family":{"type":"string"},"stack":{"type":"string"},"size":{"type":"number"},"weight":{"type":"number"},"lineHeight":{"anyOf":[{"type":"number"},{"type":"null"}]},"letterSpacing":{"type":"number"},"transform":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"type":"string","pattern":"^#[0-9a-f]{6}$"},"css":{"type":"string"}},"required":["family","stack","size","weight","lineHeight","letterSpacing","transform","color","css"]},{"type":"null"}]},"h4":{"anyOf":[{"type":"object","properties":{"family":{"type":"string"},"stack":{"type":"string"},"size":{"type":"number"},"weight":{"type":"number"},"lineHeight":{"anyOf":[{"type":"number"},{"type":"null"}]},"letterSpacing":{"type":"number"},"transform":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"type":"string","pattern":"^#[0-9a-f]{6}$"},"css":{"type":"string"}},"required":["family","stack","size","weight","lineHeight","letterSpacing","transform","color","css"]},{"type":"null"}]}},"required":["h1","h2","h3","h4"]},"body":{"anyOf":[{"type":"object","properties":{"family":{"type":"string"},"stack":{"type":"string"},"size":{"type":"number"},"weight":{"type":"number"},"lineHeight":{"anyOf":[{"type":"number"},{"type":"null"}]},"letterSpacing":{"type":"number"},"transform":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"type":"string","pattern":"^#[0-9a-f]{6}$"},"css":{"type":"string"}},"required":["family","stack","size","weight","lineHeight","letterSpacing","transform","color","css"]},{"type":"null"}]},"scale":{"type":"array","items":{"type":"object","properties":{"family":{"type":"string"},"stack":{"type":"string"},"size":{"type":"number"},"weight":{"type":"number"},"lineHeight":{"anyOf":[{"type":"number"},{"type":"null"}]},"letterSpacing":{"type":"number"},"transform":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"type":"string","pattern":"^#[0-9a-f]{6}$"},"css":{"type":"string"}},"required":["family","stack","size","weight","lineHeight","letterSpacing","transform","color","css"]}}},"required":["headings","body","scale"]},"spacing":{"type":"array","items":{"type":"number"}},"radii":{"type":"array","items":{"type":"number"}},"shadows":{"type":"array","items":{"type":"string"}},"components":{"type":"object","properties":{"button":{"type":"object","properties":{"primary":{"anyOf":[{"type":"object","properties":{"family":{"type":"string"},"stack":{"type":"string"},"size":{"type":"number"},"weight":{"type":"number"},"lineHeight":{"anyOf":[{"type":"number"},{"type":"null"}]},"letterSpacing":{"type":"number"},"transform":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"type":"string","pattern":"^#[0-9a-f]{6}$"},"css":{"type":"string"},"background":{"anyOf":[{"type":"string"},{"type":"null"}]},"backgroundImage":{"anyOf":[{"type":"string"},{"type":"null"}]},"border":{"anyOf":[{"type":"string"},{"type":"null"}]},"radius":{"type":"number"},"padding":{"type":"string"},"shadow":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["family","stack","size","weight","lineHeight","letterSpacing","transform","color","css","background","backgroundImage","border","radius","padding","shadow"]},{"type":"null"}]},"secondary":{"anyOf":[{"type":"object","properties":{"family":{"type":"string"},"stack":{"type":"string"},"size":{"type":"number"},"weight":{"type":"number"},"lineHeight":{"anyOf":[{"type":"number"},{"type":"null"}]},"letterSpacing":{"type":"number"},"transform":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"type":"string","pattern":"^#[0-9a-f]{6}$"},"css":{"type":"string"},"background":{"anyOf":[{"type":"string"},{"type":"null"}]},"backgroundImage":{"anyOf":[{"type":"string"},{"type":"null"}]},"border":{"anyOf":[{"type":"string"},{"type":"null"}]},"radius":{"type":"number"},"padding":{"type":"string"},"shadow":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["family","stack","size","weight","lineHeight","letterSpacing","transform","color","css","background","backgroundImage","border","radius","padding","shadow"]},{"type":"null"}]},"link":{"anyOf":[{"type":"object","properties":{"family":{"type":"string"},"stack":{"type":"string"},"size":{"type":"number"},"weight":{"type":"number"},"lineHeight":{"anyOf":[{"type":"number"},{"type":"null"}]},"letterSpacing":{"type":"number"},"transform":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"type":"string","pattern":"^#[0-9a-f]{6}$"},"css":{"type":"string"},"decoration":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["family","stack","size","weight","lineHeight","letterSpacing","transform","color","css","decoration"]},{"type":"null"}]}},"required":["primary","secondary","link"]},"input":{"anyOf":[{"type":"object","properties":{"family":{"type":"string"},"stack":{"type":"string"},"size":{"type":"number"},"weight":{"type":"number"},"lineHeight":{"anyOf":[{"type":"number"},{"type":"null"}]},"letterSpacing":{"type":"number"},"transform":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"type":"string","pattern":"^#[0-9a-f]{6}$"},"css":{"type":"string"},"background":{"anyOf":[{"type":"string"},{"type":"null"}]},"backgroundImage":{"anyOf":[{"type":"string"},{"type":"null"}]},"border":{"anyOf":[{"type":"string"},{"type":"null"}]},"radius":{"type":"number"},"padding":{"type":"string"},"shadow":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["family","stack","size","weight","lineHeight","letterSpacing","transform","color","css","background","backgroundImage","border","radius","padding","shadow"]},{"type":"null"}]},"card":{"anyOf":[{"type":"object","properties":{"family":{"type":"string"},"stack":{"type":"string"},"size":{"type":"number"},"weight":{"type":"number"},"lineHeight":{"anyOf":[{"type":"number"},{"type":"null"}]},"letterSpacing":{"type":"number"},"transform":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"type":"string","pattern":"^#[0-9a-f]{6}$"},"css":{"type":"string"},"background":{"anyOf":[{"type":"string"},{"type":"null"}]},"backgroundImage":{"anyOf":[{"type":"string"},{"type":"null"}]},"border":{"anyOf":[{"type":"string"},{"type":"null"}]},"radius":{"type":"number"},"padding":{"type":"string"},"shadow":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["family","stack","size","weight","lineHeight","letterSpacing","transform","color","css","background","backgroundImage","border","radius","padding","shadow"]},{"type":"null"}]}},"required":["button","input","card"]}},"required":["colors","typography","spacing","radii","shadows","components"]},"fonts":{"type":"object","properties":{"families":{"type":"array","items":{"type":"object","properties":{"family":{"type":"string"},"provider":{"anyOf":[{"enum":["google-fonts","adobe-fonts","bunny-fonts","fontshare","system"],"type":"string"},{"type":"null"}]},"stylesheet":{"anyOf":[{"type":"string"},{"type":"null"}]},"weights":{"type":"array","items":{"type":"number"}},"files":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string"},"sourceUrl":{"type":"string"},"format":{"enum":["woff2","woff","ttf","otf"],"type":"string"},"weight":{"type":"string"},"style":{"type":"string"},"unicodeRange":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["url","sourceUrl","format","weight","style","unicodeRange"]}}},"required":["family","provider","stylesheet","weights","files"]}},"css":{"type":"string"}},"required":["families","css"]},"profile":{"type":"object","properties":{"description":{"type":"string"},"category":{"type":"string"},"offerings":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"}},"required":["name","description"]}},"audience":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"}},"required":["name","description"]}},"competitors":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"domain":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["name","domain"]}}},"required":["description","category","offerings","audience","competitors"]}},"required":[]},"charged":{"type":"integer","minimum":0}},"required":["status","domain","depth","credits","cached","lastEventId","brand","charged"]},{"type":"object","properties":{"status":{"const":"failed"},"domain":{"type":"string"},"depth":{"enum":["profile","styleguide"],"type":"string"},"credits":{"type":"integer","minimum":0},"cached":{"type":"boolean"},"lastEventId":{"type":"number"},"brand":{"type":"object","properties":{"render":{"type":"object","properties":{"url":{"type":"string"},"finalUrl":{"type":"string"},"status":{"type":"number"},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"screenshot":{"type":"object","properties":{"url":{"type":"string"},"sourceUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"format":{"enum":["svg","png","jpeg","gif","webp","ico","avif"],"type":"string"},"width":{"anyOf":[{"type":"number"},{"type":"null"}]},"height":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["url","sourceUrl","format","width","height"]}},"required":["url","finalUrl","status","title","screenshot"]},"identity":{"type":"object","properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"slogan":{"anyOf":[{"type":"string"},{"type":"null"}]},"language":{"anyOf":[{"type":"string"},{"type":"null"}]},"socials":{"type":"array","items":{"type":"object","properties":{"type":{"enum":["x","linkedin","github","youtube","instagram","facebook","tiktok","discord","threads","bluesky","mastodon","pinterest","reddit","medium","dribbble","producthunt","crunchbase"],"type":"string"},"url":{"type":"string"}},"required":["type","url"]}},"links":{"type":"object","properties":{"pricing":{"anyOf":[{"type":"string"},{"type":"null"}]},"blog":{"anyOf":[{"type":"string"},{"type":"null"}]},"docs":{"anyOf":[{"type":"string"},{"type":"null"}]},"careers":{"anyOf":[{"type":"string"},{"type":"null"}]},"contact":{"anyOf":[{"type":"string"},{"type":"null"}]},"privacy":{"anyOf":[{"type":"string"},{"type":"null"}]},"terms":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["pricing","blog","docs","careers","contact","privacy","terms"]},"email":{"anyOf":[{"type":"string"},{"type":"null"}]},"phone":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["name","title","description","slogan","language","socials","links","email","phone"]},"logos":{"type":"object","properties":{"logos":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string"},"sourceUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"format":{"enum":["svg","png","jpeg","gif","webp","ico","avif"],"type":"string"},"width":{"anyOf":[{"type":"number"},{"type":"null"}]},"height":{"anyOf":[{"type":"number"},{"type":"null"}]},"type":{"enum":["icon","logo"],"type":"string"},"mode":{"enum":["light","dark","opaque"],"type":"string"},"source":{"enum":["header","json-ld","apple-touch-icon","icon","mask-icon","manifest","favicon"],"type":"string"},"colors":{"type":"array","items":{"type":"string","pattern":"^#[0-9a-f]{6}$"}}},"required":["url","sourceUrl","format","width","height","type","mode","source","colors"]}},"backdrops":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string"},"sourceUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"format":{"enum":["svg","png","jpeg","gif","webp","ico","avif"],"type":"string"},"width":{"anyOf":[{"type":"number"},{"type":"null"}]},"height":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["url","sourceUrl","format","width","height"]}}},"required":["logos","backdrops"]},"colors":{"type":"object","properties":{"colors":{"type":"array","items":{"type":"object","properties":{"hex":{"type":"string","pattern":"^#[0-9a-f]{6}$"},"source":{"enum":["logo","site"],"type":"string"},"role":{"enum":["mark","accent","theme","background","text"],"type":"string"}},"required":["hex","source","role"]}}},"required":["colors"]},"styleguide":{"type":"object","properties":{"colors":{"type":"object","properties":{"background":{"type":"string","pattern":"^#[0-9a-f]{6}$"},"text":{"type":"string","pattern":"^#[0-9a-f]{6}$"},"accent":{"anyOf":[{"type":"string","pattern":"^#[0-9a-f]{6}$"},{"type":"null"}]},"surface":{"anyOf":[{"type":"string","pattern":"^#[0-9a-f]{6}$"},{"type":"null"}]},"muted":{"anyOf":[{"type":"string","pattern":"^#[0-9a-f]{6}$"},{"type":"null"}]},"border":{"anyOf":[{"type":"string","pattern":"^#[0-9a-f]{6}$"},{"type":"null"}]},"palette":{"type":"array","items":{"type":"object","properties":{"hex":{"type":"string","pattern":"^#[0-9a-f]{6}$"},"role":{"enum":["background","surface","text"],"type":"string"},"share":{"type":"number"}},"required":["hex","role","share"]}}},"required":["background","text","accent","surface","muted","border","palette"]},"typography":{"type":"object","properties":{"headings":{"type":"object","properties":{"h1":{"anyOf":[{"type":"object","properties":{"family":{"type":"string"},"stack":{"type":"string"},"size":{"type":"number"},"weight":{"type":"number"},"lineHeight":{"anyOf":[{"type":"number"},{"type":"null"}]},"letterSpacing":{"type":"number"},"transform":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"type":"string","pattern":"^#[0-9a-f]{6}$"},"css":{"type":"string"}},"required":["family","stack","size","weight","lineHeight","letterSpacing","transform","color","css"]},{"type":"null"}]},"h2":{"anyOf":[{"type":"object","properties":{"family":{"type":"string"},"stack":{"type":"string"},"size":{"type":"number"},"weight":{"type":"number"},"lineHeight":{"anyOf":[{"type":"number"},{"type":"null"}]},"letterSpacing":{"type":"number"},"transform":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"type":"string","pattern":"^#[0-9a-f]{6}$"},"css":{"type":"string"}},"required":["family","stack","size","weight","lineHeight","letterSpacing","transform","color","css"]},{"type":"null"}]},"h3":{"anyOf":[{"type":"object","properties":{"family":{"type":"string"},"stack":{"type":"string"},"size":{"type":"number"},"weight":{"type":"number"},"lineHeight":{"anyOf":[{"type":"number"},{"type":"null"}]},"letterSpacing":{"type":"number"},"transform":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"type":"string","pattern":"^#[0-9a-f]{6}$"},"css":{"type":"string"}},"required":["family","stack","size","weight","lineHeight","letterSpacing","transform","color","css"]},{"type":"null"}]},"h4":{"anyOf":[{"type":"object","properties":{"family":{"type":"string"},"stack":{"type":"string"},"size":{"type":"number"},"weight":{"type":"number"},"lineHeight":{"anyOf":[{"type":"number"},{"type":"null"}]},"letterSpacing":{"type":"number"},"transform":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"type":"string","pattern":"^#[0-9a-f]{6}$"},"css":{"type":"string"}},"required":["family","stack","size","weight","lineHeight","letterSpacing","transform","color","css"]},{"type":"null"}]}},"required":["h1","h2","h3","h4"]},"body":{"anyOf":[{"type":"object","properties":{"family":{"type":"string"},"stack":{"type":"string"},"size":{"type":"number"},"weight":{"type":"number"},"lineHeight":{"anyOf":[{"type":"number"},{"type":"null"}]},"letterSpacing":{"type":"number"},"transform":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"type":"string","pattern":"^#[0-9a-f]{6}$"},"css":{"type":"string"}},"required":["family","stack","size","weight","lineHeight","letterSpacing","transform","color","css"]},{"type":"null"}]},"scale":{"type":"array","items":{"type":"object","properties":{"family":{"type":"string"},"stack":{"type":"string"},"size":{"type":"number"},"weight":{"type":"number"},"lineHeight":{"anyOf":[{"type":"number"},{"type":"null"}]},"letterSpacing":{"type":"number"},"transform":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"type":"string","pattern":"^#[0-9a-f]{6}$"},"css":{"type":"string"}},"required":["family","stack","size","weight","lineHeight","letterSpacing","transform","color","css"]}}},"required":["headings","body","scale"]},"spacing":{"type":"array","items":{"type":"number"}},"radii":{"type":"array","items":{"type":"number"}},"shadows":{"type":"array","items":{"type":"string"}},"components":{"type":"object","properties":{"button":{"type":"object","properties":{"primary":{"anyOf":[{"type":"object","properties":{"family":{"type":"string"},"stack":{"type":"string"},"size":{"type":"number"},"weight":{"type":"number"},"lineHeight":{"anyOf":[{"type":"number"},{"type":"null"}]},"letterSpacing":{"type":"number"},"transform":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"type":"string","pattern":"^#[0-9a-f]{6}$"},"css":{"type":"string"},"background":{"anyOf":[{"type":"string"},{"type":"null"}]},"backgroundImage":{"anyOf":[{"type":"string"},{"type":"null"}]},"border":{"anyOf":[{"type":"string"},{"type":"null"}]},"radius":{"type":"number"},"padding":{"type":"string"},"shadow":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["family","stack","size","weight","lineHeight","letterSpacing","transform","color","css","background","backgroundImage","border","radius","padding","shadow"]},{"type":"null"}]},"secondary":{"anyOf":[{"type":"object","properties":{"family":{"type":"string"},"stack":{"type":"string"},"size":{"type":"number"},"weight":{"type":"number"},"lineHeight":{"anyOf":[{"type":"number"},{"type":"null"}]},"letterSpacing":{"type":"number"},"transform":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"type":"string","pattern":"^#[0-9a-f]{6}$"},"css":{"type":"string"},"background":{"anyOf":[{"type":"string"},{"type":"null"}]},"backgroundImage":{"anyOf":[{"type":"string"},{"type":"null"}]},"border":{"anyOf":[{"type":"string"},{"type":"null"}]},"radius":{"type":"number"},"padding":{"type":"string"},"shadow":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["family","stack","size","weight","lineHeight","letterSpacing","transform","color","css","background","backgroundImage","border","radius","padding","shadow"]},{"type":"null"}]},"link":{"anyOf":[{"type":"object","properties":{"family":{"type":"string"},"stack":{"type":"string"},"size":{"type":"number"},"weight":{"type":"number"},"lineHeight":{"anyOf":[{"type":"number"},{"type":"null"}]},"letterSpacing":{"type":"number"},"transform":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"type":"string","pattern":"^#[0-9a-f]{6}$"},"css":{"type":"string"},"decoration":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["family","stack","size","weight","lineHeight","letterSpacing","transform","color","css","decoration"]},{"type":"null"}]}},"required":["primary","secondary","link"]},"input":{"anyOf":[{"type":"object","properties":{"family":{"type":"string"},"stack":{"type":"string"},"size":{"type":"number"},"weight":{"type":"number"},"lineHeight":{"anyOf":[{"type":"number"},{"type":"null"}]},"letterSpacing":{"type":"number"},"transform":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"type":"string","pattern":"^#[0-9a-f]{6}$"},"css":{"type":"string"},"background":{"anyOf":[{"type":"string"},{"type":"null"}]},"backgroundImage":{"anyOf":[{"type":"string"},{"type":"null"}]},"border":{"anyOf":[{"type":"string"},{"type":"null"}]},"radius":{"type":"number"},"padding":{"type":"string"},"shadow":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["family","stack","size","weight","lineHeight","letterSpacing","transform","color","css","background","backgroundImage","border","radius","padding","shadow"]},{"type":"null"}]},"card":{"anyOf":[{"type":"object","properties":{"family":{"type":"string"},"stack":{"type":"string"},"size":{"type":"number"},"weight":{"type":"number"},"lineHeight":{"anyOf":[{"type":"number"},{"type":"null"}]},"letterSpacing":{"type":"number"},"transform":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"type":"string","pattern":"^#[0-9a-f]{6}$"},"css":{"type":"string"},"background":{"anyOf":[{"type":"string"},{"type":"null"}]},"backgroundImage":{"anyOf":[{"type":"string"},{"type":"null"}]},"border":{"anyOf":[{"type":"string"},{"type":"null"}]},"radius":{"type":"number"},"padding":{"type":"string"},"shadow":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["family","stack","size","weight","lineHeight","letterSpacing","transform","color","css","background","backgroundImage","border","radius","padding","shadow"]},{"type":"null"}]}},"required":["button","input","card"]}},"required":["colors","typography","spacing","radii","shadows","components"]},"fonts":{"type":"object","properties":{"families":{"type":"array","items":{"type":"object","properties":{"family":{"type":"string"},"provider":{"anyOf":[{"enum":["google-fonts","adobe-fonts","bunny-fonts","fontshare","system"],"type":"string"},{"type":"null"}]},"stylesheet":{"anyOf":[{"type":"string"},{"type":"null"}]},"weights":{"type":"array","items":{"type":"number"}},"files":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string"},"sourceUrl":{"type":"string"},"format":{"enum":["woff2","woff","ttf","otf"],"type":"string"},"weight":{"type":"string"},"style":{"type":"string"},"unicodeRange":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["url","sourceUrl","format","weight","style","unicodeRange"]}}},"required":["family","provider","stylesheet","weights","files"]}},"css":{"type":"string"}},"required":["families","css"]},"profile":{"type":"object","properties":{"description":{"type":"string"},"category":{"type":"string"},"offerings":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"}},"required":["name","description"]}},"audience":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"}},"required":["name","description"]}},"competitors":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"domain":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["name","domain"]}}},"required":["description","category","offerings","audience","competitors"]}},"required":[]},"error":{"oneOf":[{"type":"object","properties":{"code":{"const":"site_unreachable"},"status":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["code","status"]},{"type":"object","properties":{"code":{"const":"page_too_large"},"maxBytes":{"type":"number"}},"required":["code","maxBytes"]},{"type":"object","properties":{"code":{"const":"style_unreadable"}},"required":["code"]},{"type":"object","properties":{"code":{"const":"provider_unavailable"},"retryAfterSeconds":{"type":"number"}},"required":["code","retryAfterSeconds"]}]},"charged":{"const":0}},"required":["status","domain","depth","credits","cached","lastEventId","brand","error","charged"]}],"$schema":"http://json-schema.org/draft-07/schema#"}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"unauthorized"},"status":{"const":401},"message":{"type":"string","default":"Missing, unknown or revoked API key"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"forbidden"},"status":{"const":403},"message":{"type":"string","default":"The API key does not carry the scope this call needs"},"data":{"type":"object","properties":{"scope":{"enum":["parse"],"type":"string"}},"required":["scope"],"$schema":"http://json-schema.org/draft-07/schema#"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"job_not_found"},"status":{"const":404},"message":{"type":"string","default":"No brand Job with this id for this organization, or it is older than 30 days"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"rate_limited"},"status":{"const":429},"message":{"type":"string","default":"Too many calls for this API key; retry after the window"},"data":{"type":"object","properties":{"retryAfterSeconds":{"type":"number"}},"required":["retryAfterSeconds"],"$schema":"http://json-schema.org/draft-07/schema#"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}}}}