{"openapi":"3.1.0","info":{"title":"ActionLayer API","version":"1.0.0","description":"The live web and everyday utilities for AI agents."},"servers":[{"url":"https://actionlayer.fiftyseven.is"}],"security":[{"bearer":[]}],"paths":{"/v1/fetch":{"get":{"tags":["Web"],"summary":"Fetch","description":"Fetches a page at the edge, extracts the main content and converts it to LLM-ready Markdown. Falls back to Jina Reader for JavaScript-rendered or blocked pages.\n\nCost: 1 credit(s) per uncached call. Cached results are free.","operationId":"fetchGet","responses":{"200":{"description":"Success","headers":{"x-cache":{"schema":{"type":"string","enum":["HIT","STALE","MISS","BYPASS"]}},"x-credits":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"},"502":{"$ref":"#/components/responses/Error"}},"parameters":[{"name":"url","in":"query","required":true,"schema":{"type":"string","minLength":4,"maxLength":2048,"description":"Absolute http(s) URL. A bare domain is accepted and upgraded to https."},"description":"Absolute http(s) URL. A bare domain is accepted and upgraded to https."},{"name":"format","in":"query","required":false,"schema":{"default":"markdown","description":"Output format of `content`.","type":"string","enum":["markdown","html","text"]},"description":"Output format of `content`."},{"name":"engine","in":"query","required":false,"schema":{"default":"auto","description":"`native` fetches and parses at the edge. `jina` renders through Jina Reader (handles JS-heavy pages). `auto` tries native and falls back to Jina when the page is blocked, empty or client-rendered.","type":"string","enum":["auto","native","jina"]},"description":"`native` fetches and parses at the edge. `jina` renders through Jina Reader (handles JS-heavy pages). `auto` tries native and falls back to Jina when the page is blocked, empty or client-rendered."},{"name":"main_content","in":"query","required":false,"schema":{"default":true,"description":"Strip navigation, ads and boilerplate.","type":"boolean"},"description":"Strip navigation, ads and boilerplate."},{"name":"include_links","in":"query","required":false,"schema":{"default":false,"description":"Return outbound links found in the content.","type":"boolean"},"description":"Return outbound links found in the content."},{"name":"max_age","in":"query","required":false,"schema":{"description":"Oldest cached result you will accept, in seconds. 0 forces a fresh fetch. Omit to use the endpoint default.","type":"integer","minimum":0,"maximum":2592000},"description":"Oldest cached result you will accept, in seconds. 0 forces a fresh fetch. Omit to use the endpoint default."}]},"post":{"tags":["Web"],"summary":"Fetch","description":"Fetches a page at the edge, extracts the main content and converts it to LLM-ready Markdown. Falls back to Jina Reader for JavaScript-rendered or blocked pages.\n\nCost: 1 credit(s) per uncached call. Cached results are free.","operationId":"fetch","responses":{"200":{"description":"Success","headers":{"x-cache":{"schema":{"type":"string","enum":["HIT","STALE","MISS","BYPASS"]}},"x-credits":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"},"502":{"$ref":"#/components/responses/Error"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","minLength":4,"maxLength":2048,"description":"Absolute http(s) URL. A bare domain is accepted and upgraded to https."},"format":{"default":"markdown","description":"Output format of `content`.","type":"string","enum":["markdown","html","text"]},"engine":{"default":"auto","description":"`native` fetches and parses at the edge. `jina` renders through Jina Reader (handles JS-heavy pages). `auto` tries native and falls back to Jina when the page is blocked, empty or client-rendered.","type":"string","enum":["auto","native","jina"]},"main_content":{"default":true,"description":"Strip navigation, ads and boilerplate.","type":"boolean"},"include_links":{"default":false,"description":"Return outbound links found in the content.","type":"boolean"},"max_age":{"description":"Oldest cached result you will accept, in seconds. 0 forces a fresh fetch. Omit to use the endpoint default.","type":"integer","minimum":0,"maximum":2592000}},"required":["url"]},"example":{"url":"https://blog.cloudflare.com"}}}}}},"/v1/search":{"get":{"tags":["Web"],"summary":"Search","description":"Searches the live web and returns ranked results with snippets. Set `include_content` to read the top results in the same call.\n\nCost: 2 credit(s) per uncached call. Cached results are free.","operationId":"searchGet","responses":{"200":{"description":"Success","headers":{"x-cache":{"schema":{"type":"string","enum":["HIT","STALE","MISS","BYPASS"]}},"x-credits":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"},"502":{"$ref":"#/components/responses/Error"}},"parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":400,"description":"Search query."},"description":"Search query."},{"name":"limit","in":"query","required":false,"schema":{"default":8,"description":"Number of results.","type":"integer","minimum":1,"maximum":20},"description":"Number of results."},{"name":"site","in":"query","required":false,"schema":{"description":"Restrict results to one domain, e.g. docs.python.org.","type":"string","maxLength":253},"description":"Restrict results to one domain, e.g. docs.python.org."},{"name":"include_content","in":"query","required":false,"schema":{"default":false,"description":"Also read the top 3 results and return their content as Markdown (+1 credit each).","type":"boolean"},"description":"Also read the top 3 results and return their content as Markdown (+1 credit each)."},{"name":"max_age","in":"query","required":false,"schema":{"description":"Oldest cached result you will accept, in seconds. 0 forces a fresh fetch. Omit to use the endpoint default.","type":"integer","minimum":0,"maximum":2592000},"description":"Oldest cached result you will accept, in seconds. 0 forces a fresh fetch. Omit to use the endpoint default."}]},"post":{"tags":["Web"],"summary":"Search","description":"Searches the live web and returns ranked results with snippets. Set `include_content` to read the top results in the same call.\n\nCost: 2 credit(s) per uncached call. Cached results are free.","operationId":"search","responses":{"200":{"description":"Success","headers":{"x-cache":{"schema":{"type":"string","enum":["HIT","STALE","MISS","BYPASS"]}},"x-credits":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"},"502":{"$ref":"#/components/responses/Error"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"q":{"type":"string","minLength":1,"maxLength":400,"description":"Search query."},"limit":{"default":8,"description":"Number of results.","type":"integer","minimum":1,"maximum":20},"site":{"description":"Restrict results to one domain, e.g. docs.python.org.","type":"string","maxLength":253},"include_content":{"default":false,"description":"Also read the top 3 results and return their content as Markdown (+1 credit each).","type":"boolean"},"max_age":{"description":"Oldest cached result you will accept, in seconds. 0 forces a fresh fetch. Omit to use the endpoint default.","type":"integer","minimum":0,"maximum":2592000}},"required":["q"]},"example":{"q":"durable objects vs d1 consistency","limit":5}}}}}},"/v1/design":{"get":{"tags":["Web"],"summary":"Design.md","description":"Reads a page and its stylesheets, then returns the design tokens (colors, type, radii, shadows, spacing) and a DESIGN.md an agent can follow to build on-brand UI.\n\nCost: 3 credit(s) per uncached call. Cached results are free.","operationId":"designGet","responses":{"200":{"description":"Success","headers":{"x-cache":{"schema":{"type":"string","enum":["HIT","STALE","MISS","BYPASS"]}},"x-credits":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"},"502":{"$ref":"#/components/responses/Error"}},"parameters":[{"name":"url","in":"query","required":true,"schema":{"type":"string","minLength":4,"maxLength":2048,"description":"Absolute http(s) URL. A bare domain is accepted and upgraded to https."},"description":"Absolute http(s) URL. A bare domain is accepted and upgraded to https."},{"name":"max_age","in":"query","required":false,"schema":{"description":"Oldest cached result you will accept, in seconds. 0 forces a fresh fetch. Omit to use the endpoint default.","type":"integer","minimum":0,"maximum":2592000},"description":"Oldest cached result you will accept, in seconds. 0 forces a fresh fetch. Omit to use the endpoint default."}]},"post":{"tags":["Web"],"summary":"Design.md","description":"Reads a page and its stylesheets, then returns the design tokens (colors, type, radii, shadows, spacing) and a DESIGN.md an agent can follow to build on-brand UI.\n\nCost: 3 credit(s) per uncached call. Cached results are free.","operationId":"design","responses":{"200":{"description":"Success","headers":{"x-cache":{"schema":{"type":"string","enum":["HIT","STALE","MISS","BYPASS"]}},"x-credits":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"},"502":{"$ref":"#/components/responses/Error"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","minLength":4,"maxLength":2048,"description":"Absolute http(s) URL. A bare domain is accepted and upgraded to https."},"max_age":{"description":"Oldest cached result you will accept, in seconds. 0 forces a fresh fetch. Omit to use the endpoint default.","type":"integer","minimum":0,"maximum":2592000}},"required":["url"]},"example":{"url":"https://linear.app"}}}}}},"/v1/brand":{"get":{"tags":["Web"],"summary":"Brand","description":"Resolves a domain to a brand profile: name, description, logo candidates, palette, typography, social profiles and company facts from Wikidata, plus the site's DESIGN.md.\n\nCost: 5 credit(s) per uncached call. Cached results are free.","operationId":"brandGet","responses":{"200":{"description":"Success","headers":{"x-cache":{"schema":{"type":"string","enum":["HIT","STALE","MISS","BYPASS"]}},"x-credits":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"},"502":{"$ref":"#/components/responses/Error"}},"parameters":[{"name":"domain","in":"query","required":true,"schema":{"type":"string","minLength":3,"maxLength":253,"description":"Domain (stripe.com) or any URL on it."},"description":"Domain (stripe.com) or any URL on it."},{"name":"include_design_md","in":"query","required":false,"schema":{"default":true,"description":"Include the generated DESIGN.md for the site.","type":"boolean"},"description":"Include the generated DESIGN.md for the site."},{"name":"max_age","in":"query","required":false,"schema":{"description":"Oldest cached result you will accept, in seconds. 0 forces a fresh fetch. Omit to use the endpoint default.","type":"integer","minimum":0,"maximum":2592000},"description":"Oldest cached result you will accept, in seconds. 0 forces a fresh fetch. Omit to use the endpoint default."}]},"post":{"tags":["Web"],"summary":"Brand","description":"Resolves a domain to a brand profile: name, description, logo candidates, palette, typography, social profiles and company facts from Wikidata, plus the site's DESIGN.md.\n\nCost: 5 credit(s) per uncached call. Cached results are free.","operationId":"brand","responses":{"200":{"description":"Success","headers":{"x-cache":{"schema":{"type":"string","enum":["HIT","STALE","MISS","BYPASS"]}},"x-credits":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"},"502":{"$ref":"#/components/responses/Error"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"domain":{"type":"string","minLength":3,"maxLength":253,"description":"Domain (stripe.com) or any URL on it."},"include_design_md":{"default":true,"description":"Include the generated DESIGN.md for the site.","type":"boolean"},"max_age":{"description":"Oldest cached result you will accept, in seconds. 0 forces a fresh fetch. Omit to use the endpoint default.","type":"integer","minimum":0,"maximum":2592000}},"required":["domain"]},"example":{"domain":"stripe.com"}}}}}},"/v1/map":{"get":{"tags":["Web"],"summary":"Map","description":"Reads robots.txt and sitemaps (including sitemap indexes) to list a site's URLs, falling back to on-page links when no sitemap exists.\n\nCost: 2 credit(s) per uncached call. Cached results are free.","operationId":"mapGet","responses":{"200":{"description":"Success","headers":{"x-cache":{"schema":{"type":"string","enum":["HIT","STALE","MISS","BYPASS"]}},"x-credits":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"},"502":{"$ref":"#/components/responses/Error"}},"parameters":[{"name":"url","in":"query","required":true,"schema":{"type":"string","minLength":3,"maxLength":253,"description":"Domain (stripe.com) or any URL on it."},"description":"Domain (stripe.com) or any URL on it."},{"name":"limit","in":"query","required":false,"schema":{"default":200,"description":"Maximum URLs to return.","type":"integer","minimum":1,"maximum":5000},"description":"Maximum URLs to return."},{"name":"search","in":"query","required":false,"schema":{"description":"Only return URLs containing this text.","type":"string","maxLength":200},"description":"Only return URLs containing this text."},{"name":"include_subdomains","in":"query","required":false,"schema":{"default":false,"type":"boolean"}},{"name":"max_age","in":"query","required":false,"schema":{"description":"Oldest cached result you will accept, in seconds. 0 forces a fresh fetch. Omit to use the endpoint default.","type":"integer","minimum":0,"maximum":2592000},"description":"Oldest cached result you will accept, in seconds. 0 forces a fresh fetch. Omit to use the endpoint default."}]},"post":{"tags":["Web"],"summary":"Map","description":"Reads robots.txt and sitemaps (including sitemap indexes) to list a site's URLs, falling back to on-page links when no sitemap exists.\n\nCost: 2 credit(s) per uncached call. Cached results are free.","operationId":"map","responses":{"200":{"description":"Success","headers":{"x-cache":{"schema":{"type":"string","enum":["HIT","STALE","MISS","BYPASS"]}},"x-credits":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"},"502":{"$ref":"#/components/responses/Error"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","minLength":3,"maxLength":253,"description":"Domain (stripe.com) or any URL on it."},"limit":{"default":200,"description":"Maximum URLs to return.","type":"integer","minimum":1,"maximum":5000},"search":{"description":"Only return URLs containing this text.","type":"string","maxLength":200},"include_subdomains":{"default":false,"type":"boolean"},"max_age":{"description":"Oldest cached result you will accept, in seconds. 0 forces a fresh fetch. Omit to use the endpoint default.","type":"integer","minimum":0,"maximum":2592000}},"required":["url"]},"example":{"url":"vercel.com","limit":50,"search":"blog"}}}}}},"/v1/weather":{"get":{"tags":["Utilities"],"summary":"Weather","description":"Geocodes a place name and returns current weather plus up to a 16-day forecast.\n\nCost: 1 credit(s) per uncached call. Cached results are free.","operationId":"weatherGet","responses":{"200":{"description":"Success","headers":{"x-cache":{"schema":{"type":"string","enum":["HIT","STALE","MISS","BYPASS"]}},"x-credits":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"},"502":{"$ref":"#/components/responses/Error"}},"parameters":[{"name":"q","in":"query","required":false,"schema":{"description":"Place name, e.g. `Berlin` or `Austin, TX`.","type":"string","minLength":1,"maxLength":120},"description":"Place name, e.g. `Berlin` or `Austin, TX`."},{"name":"lat","in":"query","required":false,"schema":{"type":"number","minimum":-90,"maximum":90}},{"name":"lon","in":"query","required":false,"schema":{"type":"number","minimum":-180,"maximum":180}},{"name":"days","in":"query","required":false,"schema":{"default":3,"description":"Forecast days.","type":"integer","minimum":1,"maximum":16},"description":"Forecast days."},{"name":"units","in":"query","required":false,"schema":{"default":"metric","type":"string","enum":["metric","imperial"]}},{"name":"max_age","in":"query","required":false,"schema":{"description":"Oldest cached result you will accept, in seconds. 0 forces a fresh fetch. Omit to use the endpoint default.","type":"integer","minimum":0,"maximum":2592000},"description":"Oldest cached result you will accept, in seconds. 0 forces a fresh fetch. Omit to use the endpoint default."}]},"post":{"tags":["Utilities"],"summary":"Weather","description":"Geocodes a place name and returns current weather plus up to a 16-day forecast.\n\nCost: 1 credit(s) per uncached call. Cached results are free.","operationId":"weather","responses":{"200":{"description":"Success","headers":{"x-cache":{"schema":{"type":"string","enum":["HIT","STALE","MISS","BYPASS"]}},"x-credits":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"},"502":{"$ref":"#/components/responses/Error"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"q":{"description":"Place name, e.g. `Berlin` or `Austin, TX`.","type":"string","minLength":1,"maxLength":120},"lat":{"type":"number","minimum":-90,"maximum":90},"lon":{"type":"number","minimum":-180,"maximum":180},"days":{"default":3,"description":"Forecast days.","type":"integer","minimum":1,"maximum":16},"units":{"default":"metric","type":"string","enum":["metric","imperial"]},"max_age":{"description":"Oldest cached result you will accept, in seconds. 0 forces a fresh fetch. Omit to use the endpoint default.","type":"integer","minimum":0,"maximum":2592000}}},"example":{"q":"Bengaluru","days":3}}}}}},"/v1/fx":{"get":{"tags":["Utilities"],"summary":"Exchange rates","description":"Daily reference exchange rates published by the European Central Bank, with amount conversion.\n\nCost: 1 credit(s) per uncached call. Cached results are free.","operationId":"fxGet","responses":{"200":{"description":"Success","headers":{"x-cache":{"schema":{"type":"string","enum":["HIT","STALE","MISS","BYPASS"]}},"x-credits":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"},"502":{"$ref":"#/components/responses/Error"}},"parameters":[{"name":"base","in":"query","required":false,"schema":{"default":"USD","description":"ISO 4217 base currency.","type":"string","minLength":3,"maxLength":3},"description":"ISO 4217 base currency."},{"name":"symbols","in":"query","required":false,"schema":{"description":"Comma-separated target currencies, e.g. `EUR,GBP,INR`. Omit for all.","type":"string","maxLength":200},"description":"Comma-separated target currencies, e.g. `EUR,GBP,INR`. Omit for all."},{"name":"amount","in":"query","required":false,"schema":{"default":1,"type":"number","exclusiveMinimum":0,"maximum":1000000000000}},{"name":"date","in":"query","required":false,"schema":{"description":"Historical date (YYYY-MM-DD). Omit for latest.","type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"description":"Historical date (YYYY-MM-DD). Omit for latest."},{"name":"max_age","in":"query","required":false,"schema":{"description":"Oldest cached result you will accept, in seconds. 0 forces a fresh fetch. Omit to use the endpoint default.","type":"integer","minimum":0,"maximum":2592000},"description":"Oldest cached result you will accept, in seconds. 0 forces a fresh fetch. Omit to use the endpoint default."}]},"post":{"tags":["Utilities"],"summary":"Exchange rates","description":"Daily reference exchange rates published by the European Central Bank, with amount conversion.\n\nCost: 1 credit(s) per uncached call. Cached results are free.","operationId":"fx","responses":{"200":{"description":"Success","headers":{"x-cache":{"schema":{"type":"string","enum":["HIT","STALE","MISS","BYPASS"]}},"x-credits":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"},"502":{"$ref":"#/components/responses/Error"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"base":{"default":"USD","description":"ISO 4217 base currency.","type":"string","minLength":3,"maxLength":3},"symbols":{"description":"Comma-separated target currencies, e.g. `EUR,GBP,INR`. Omit for all.","type":"string","maxLength":200},"amount":{"default":1,"type":"number","exclusiveMinimum":0,"maximum":1000000000000},"date":{"description":"Historical date (YYYY-MM-DD). Omit for latest.","type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"max_age":{"description":"Oldest cached result you will accept, in seconds. 0 forces a fresh fetch. Omit to use the endpoint default.","type":"integer","minimum":0,"maximum":2592000}}},"example":{"base":"USD","symbols":"EUR,INR,JPY","amount":250}}}}}},"/v1/dns":{"get":{"tags":["Utilities"],"summary":"DNS","description":"Resolves records through Cloudflare's 1.1.1.1 resolver. Results are cached for the record's own TTL.\n\nCost: 1 credit(s) per uncached call. Cached results are free.","operationId":"dnsGet","responses":{"200":{"description":"Success","headers":{"x-cache":{"schema":{"type":"string","enum":["HIT","STALE","MISS","BYPASS"]}},"x-credits":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"},"502":{"$ref":"#/components/responses/Error"}},"parameters":[{"name":"name","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":253,"description":"Hostname to resolve."},"description":"Hostname to resolve."},{"name":"type","in":"query","required":false,"schema":{"default":"A","description":"Record type. `ALL` resolves A, AAAA, CNAME, MX, TXT, NS and CAA in parallel.","type":"string","enum":["A","AAAA","CNAME","MX","TXT","NS","SOA","CAA","SRV","HTTPS","ALL"]},"description":"Record type. `ALL` resolves A, AAAA, CNAME, MX, TXT, NS and CAA in parallel."},{"name":"max_age","in":"query","required":false,"schema":{"description":"Oldest cached result you will accept, in seconds. 0 forces a fresh fetch. Omit to use the endpoint default.","type":"integer","minimum":0,"maximum":2592000},"description":"Oldest cached result you will accept, in seconds. 0 forces a fresh fetch. Omit to use the endpoint default."}]},"post":{"tags":["Utilities"],"summary":"DNS","description":"Resolves records through Cloudflare's 1.1.1.1 resolver. Results are cached for the record's own TTL.\n\nCost: 1 credit(s) per uncached call. Cached results are free.","operationId":"dns","responses":{"200":{"description":"Success","headers":{"x-cache":{"schema":{"type":"string","enum":["HIT","STALE","MISS","BYPASS"]}},"x-credits":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"},"502":{"$ref":"#/components/responses/Error"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":253,"description":"Hostname to resolve."},"type":{"default":"A","description":"Record type. `ALL` resolves A, AAAA, CNAME, MX, TXT, NS and CAA in parallel.","type":"string","enum":["A","AAAA","CNAME","MX","TXT","NS","SOA","CAA","SRV","HTTPS","ALL"]},"max_age":{"description":"Oldest cached result you will accept, in seconds. 0 forces a fresh fetch. Omit to use the endpoint default.","type":"integer","minimum":0,"maximum":2592000}},"required":["name"]},"example":{"name":"github.com","type":"ALL"}}}}}},"/v1/whois":{"get":{"tags":["Utilities"],"summary":"WHOIS","description":"Registrar, dates, status and nameservers for a domain, or network owner for an IP, via RDAP.\n\nCost: 1 credit(s) per uncached call. Cached results are free.","operationId":"whoisGet","responses":{"200":{"description":"Success","headers":{"x-cache":{"schema":{"type":"string","enum":["HIT","STALE","MISS","BYPASS"]}},"x-credits":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"},"502":{"$ref":"#/components/responses/Error"}},"parameters":[{"name":"query","in":"query","required":true,"schema":{"type":"string","minLength":2,"maxLength":253,"description":"Domain name or IP address."},"description":"Domain name or IP address."},{"name":"max_age","in":"query","required":false,"schema":{"description":"Oldest cached result you will accept, in seconds. 0 forces a fresh fetch. Omit to use the endpoint default.","type":"integer","minimum":0,"maximum":2592000},"description":"Oldest cached result you will accept, in seconds. 0 forces a fresh fetch. Omit to use the endpoint default."}]},"post":{"tags":["Utilities"],"summary":"WHOIS","description":"Registrar, dates, status and nameservers for a domain, or network owner for an IP, via RDAP.\n\nCost: 1 credit(s) per uncached call. Cached results are free.","operationId":"whois","responses":{"200":{"description":"Success","headers":{"x-cache":{"schema":{"type":"string","enum":["HIT","STALE","MISS","BYPASS"]}},"x-credits":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"},"502":{"$ref":"#/components/responses/Error"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"query":{"type":"string","minLength":2,"maxLength":253,"description":"Domain name or IP address."},"max_age":{"description":"Oldest cached result you will accept, in seconds. 0 forces a fresh fetch. Omit to use the endpoint default.","type":"integer","minimum":0,"maximum":2592000}},"required":["query"]},"example":{"query":"openai.com"}}}}}},"/v1/wiki":{"get":{"tags":["Utilities"],"summary":"Wikipedia","description":"Finds the best-matching Wikipedia article and returns its summary, thumbnail and Wikidata ID.\n\nCost: 1 credit(s) per uncached call. Cached results are free.","operationId":"wikiGet","responses":{"200":{"description":"Success","headers":{"x-cache":{"schema":{"type":"string","enum":["HIT","STALE","MISS","BYPASS"]}},"x-credits":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"},"502":{"$ref":"#/components/responses/Error"}},"parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":200,"description":"Topic, person, company or place."},"description":"Topic, person, company or place."},{"name":"lang","in":"query","required":false,"schema":{"default":"en","type":"string","pattern":"^[a-z]{2,3}(-[a-z]+)?$"}},{"name":"max_age","in":"query","required":false,"schema":{"description":"Oldest cached result you will accept, in seconds. 0 forces a fresh fetch. Omit to use the endpoint default.","type":"integer","minimum":0,"maximum":2592000},"description":"Oldest cached result you will accept, in seconds. 0 forces a fresh fetch. Omit to use the endpoint default."}]},"post":{"tags":["Utilities"],"summary":"Wikipedia","description":"Finds the best-matching Wikipedia article and returns its summary, thumbnail and Wikidata ID.\n\nCost: 1 credit(s) per uncached call. Cached results are free.","operationId":"wiki","responses":{"200":{"description":"Success","headers":{"x-cache":{"schema":{"type":"string","enum":["HIT","STALE","MISS","BYPASS"]}},"x-credits":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"},"502":{"$ref":"#/components/responses/Error"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"q":{"type":"string","minLength":1,"maxLength":200,"description":"Topic, person, company or place."},"lang":{"default":"en","type":"string","pattern":"^[a-z]{2,3}(-[a-z]+)?$"},"max_age":{"description":"Oldest cached result you will accept, in seconds. 0 forces a fresh fetch. Omit to use the endpoint default.","type":"integer","minimum":0,"maximum":2592000}},"required":["q"]},"example":{"q":"Cloudflare"}}}}}},"/v1/holidays":{"get":{"tags":["Utilities"],"summary":"Public holidays","description":"National and regional public holidays for a country and year.\n\nCost: 1 credit(s) per uncached call. Cached results are free.","operationId":"holidaysGet","responses":{"200":{"description":"Success","headers":{"x-cache":{"schema":{"type":"string","enum":["HIT","STALE","MISS","BYPASS"]}},"x-credits":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"},"502":{"$ref":"#/components/responses/Error"}},"parameters":[{"name":"country","in":"query","required":true,"schema":{"type":"string","minLength":2,"maxLength":2,"description":"ISO 3166-1 alpha-2 country code."},"description":"ISO 3166-1 alpha-2 country code."},{"name":"year","in":"query","required":false,"schema":{"description":"Defaults to the current year.","type":"integer","minimum":1975,"maximum":2075},"description":"Defaults to the current year."},{"name":"max_age","in":"query","required":false,"schema":{"description":"Oldest cached result you will accept, in seconds. 0 forces a fresh fetch. Omit to use the endpoint default.","type":"integer","minimum":0,"maximum":2592000},"description":"Oldest cached result you will accept, in seconds. 0 forces a fresh fetch. Omit to use the endpoint default."}]},"post":{"tags":["Utilities"],"summary":"Public holidays","description":"National and regional public holidays for a country and year.\n\nCost: 1 credit(s) per uncached call. Cached results are free.","operationId":"holidays","responses":{"200":{"description":"Success","headers":{"x-cache":{"schema":{"type":"string","enum":["HIT","STALE","MISS","BYPASS"]}},"x-credits":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"},"502":{"$ref":"#/components/responses/Error"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"country":{"type":"string","minLength":2,"maxLength":2,"description":"ISO 3166-1 alpha-2 country code."},"year":{"description":"Defaults to the current year.","type":"integer","minimum":1975,"maximum":2075},"max_age":{"description":"Oldest cached result you will accept, in seconds. 0 forces a fresh fetch. Omit to use the endpoint default.","type":"integer","minimum":0,"maximum":2592000}},"required":["country"]},"example":{"country":"US"}}}}}},"/v1/stock":{"get":{"tags":["Utilities"],"summary":"Stock quote","description":"Current price, daily change and range for a listed company, plus its exchange, industry, market cap, website and logo.\n\nCost: 1 credit(s) per uncached call. Cached results are free.","operationId":"stockGet","responses":{"200":{"description":"Success","headers":{"x-cache":{"schema":{"type":"string","enum":["HIT","STALE","MISS","BYPASS"]}},"x-credits":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"},"502":{"$ref":"#/components/responses/Error"}},"parameters":[{"name":"symbol","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":60,"description":"Ticker such as AAPL or NVDA. A company name also works and resolves to its primary listing."},"description":"Ticker such as AAPL or NVDA. A company name also works and resolves to its primary listing."},{"name":"max_age","in":"query","required":false,"schema":{"description":"Oldest cached result you will accept, in seconds. 0 forces a fresh fetch. Omit to use the endpoint default.","type":"integer","minimum":0,"maximum":2592000},"description":"Oldest cached result you will accept, in seconds. 0 forces a fresh fetch. Omit to use the endpoint default."}]},"post":{"tags":["Utilities"],"summary":"Stock quote","description":"Current price, daily change and range for a listed company, plus its exchange, industry, market cap, website and logo.\n\nCost: 1 credit(s) per uncached call. Cached results are free.","operationId":"stock","responses":{"200":{"description":"Success","headers":{"x-cache":{"schema":{"type":"string","enum":["HIT","STALE","MISS","BYPASS"]}},"x-credits":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"},"502":{"$ref":"#/components/responses/Error"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"symbol":{"type":"string","minLength":1,"maxLength":60,"description":"Ticker such as AAPL or NVDA. A company name also works and resolves to its primary listing."},"max_age":{"description":"Oldest cached result you will accept, in seconds. 0 forces a fresh fetch. Omit to use the endpoint default.","type":"integer","minimum":0,"maximum":2592000}},"required":["symbol"]},"example":{"symbol":"NVDA"}}}}}}},"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","description":"API key (al_live_...)"}},"schemas":{"Envelope":{"type":"object","properties":{"success":{"type":"boolean"},"data":{"type":"object"},"meta":{"type":"object","properties":{"request_id":{"type":"string"},"endpoint":{"type":"string"},"cache":{"type":"string"},"age":{"type":"integer"},"credits":{"type":"integer"},"latency_ms":{"type":"integer"}}},"ui":{"type":"object","description":"json-render spec, when `?ui=true`."}}}},"responses":{"Error":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"const":false},"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}}},"meta":{"type":"object","properties":{"request_id":{"type":"string"}}}}}}}}}}}