{"openapi":"3.1.0","info":{"title":"EarningsLens API","version":"1.0.0","description":"A company's earnings release, as checked figures: each one with where it was read in the filing, and graded against the company's own XBRL once its 10-Q or 10-K is out. No key is needed: a visitor gets 5 live extractions a day. A key, from a Latitude 10 workspace's settings (at most 5 a workspace), gets 20 live extractions and 2,000 reads a day. Releases already extracted never count as live. Filings are public records from SEC; nothing here is investment advice."},"servers":[{"url":"https://earningslens.latitude10.tech/api/v1"},{"url":"https://latitude10.tech/api/earningslens/v1"}],"tags":[{"name":"Companies","description":"Find a company and its releases."},{"name":"Releases","description":"Read or extract a release."},{"name":"Usage","description":"What the caller has left."}],"security":[{},{"earningsKey":[]}],"paths":{"/companies":{"get":{"security":[{},{"earningsKey":[]}],"operationId":"searchCompanies","tags":["Companies"],"summary":"Search companies by ticker or name","description":"SEC’s list of companies, refreshed daily: tickers that start with the query first, then names that start with it, then names that contain it. At most 20.","parameters":[{"name":"q","in":"query","required":true,"description":"A ticker or part of a company name, at most 60 characters.","schema":{"type":"string","minLength":1,"maxLength":60,"examples":["apple"]}}],"responses":{"200":{"description":"The companies found.","content":{"application/json":{"schema":{"type":"object","required":["companies"],"properties":{"companies":{"type":"array","description":"Best match first.","items":{"$ref":"#/components/schemas/Company"}}}},"example":{"companies":[{"cik":320193,"ticker":"AAPL","name":"Apple Inc."}]}}}},"400":{"description":"The query is empty or too long. `code` is one of: `invalid`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"code":"invalid","message":"See the message."}}}},"401":{"description":"The key is wrong or revoked. A request with an Authorization header is never served as a visitor. `code` is one of: `bad_key`.","headers":{"WWW-Authenticate":{"description":"`Bearer`.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"code":"bad_key","message":"That API key is wrong or revoked. Make a new one in your workspace settings."}}}},"404":{"description":"The API is not published yet. `code` is one of: `not_found`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"code":"not_found","message":"See the message."}}}},"429":{"description":"Too many requests: 60 a minute, or a key's 2,000 reads a day. `code` is one of: `slow_down`, `read_limit`.","headers":{"Retry-After":{"description":"Seconds to wait before asking again.","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"code":"slow_down","message":"Too many requests. Wait a minute and try again."}}}},"503":{"description":"The extractor or its storage isn’t reachable. `code` is one of: `engine_down`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"code":"engine_down","message":"The extractor isn't answering. Try again in a few minutes."}}}}}}},"/companies/{ticker}/releases":{"get":{"security":[{},{"earningsKey":[]}],"operationId":"listCompanyReleases","tags":["Companies"],"summary":"List a company’s earnings releases","description":"The company’s earnings releases (8-K, Item 2.02) from the last two years, newest first, each saying whether it has been extracted. Cached for 15 minutes.","parameters":[{"name":"ticker","in":"path","required":true,"description":"The company’s ticker, any case: 1 to 10 letters, digits, dots or dashes.","schema":{"type":"string","pattern":"^[A-Za-z0-9.-]{1,10}$","examples":["AAPL"]}}],"responses":{"200":{"description":"The company and its releases.","content":{"application/json":{"schema":{"type":"object","required":["company","releases"],"properties":{"company":{"$ref":"#/components/schemas/Company"},"releases":{"type":"array","description":"Newest first.","items":{"type":"object","required":["accession","form","filed","extracted","url"],"properties":{"accession":{"type":"string","description":"SEC’s accession number."},"form":{"type":"string","description":"The form, 8-K or 8-K/A."},"filed":{"type":"string","format":"date","description":"When it was filed."},"extracted":{"type":"boolean","description":"Whether its figures are stored: reading it then costs no live extraction."},"url":{"type":"string","format":"uri","description":"The filing on SEC."}}}}}},"example":{"company":{"cik":320193,"ticker":"AAPL","name":"Apple Inc."},"releases":[{"accession":"0000320193-26-000024","form":"8-K","filed":"2026-11-02","extracted":true,"url":"https://www.sec.gov/Archives/edgar/data/320193/000032019326000024/0000320193-26-000024-index.htm"}]}}}},"400":{"description":"The ticker isn’t a ticker. `code` is one of: `invalid`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"code":"invalid","message":"See the message."}}}},"401":{"description":"The key is wrong or revoked. A request with an Authorization header is never served as a visitor. `code` is one of: `bad_key`.","headers":{"WWW-Authenticate":{"description":"`Bearer`.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"code":"bad_key","message":"That API key is wrong or revoked. Make a new one in your workspace settings."}}}},"404":{"description":"The API isn’t published yet, or the ticker isn’t in SEC’s list. `code` is one of: `unknown_ticker`, `not_found`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"code":"unknown_ticker","message":"See the message."}}}},"429":{"description":"Too many requests: 60 a minute, or a key's 2,000 reads a day. `code` is one of: `slow_down`, `read_limit`.","headers":{"Retry-After":{"description":"Seconds to wait before asking again.","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"code":"slow_down","message":"Too many requests. Wait a minute and try again."}}}},"502":{"description":"SEC didn’t answer for this company. `code` is one of: `sec_unavailable`, `sec_refused`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"code":"sec_unavailable","message":"SEC didn't answer for this company. Try again in a few minutes."}}}},"503":{"description":"The extractor or its storage isn’t reachable. `code` is one of: `engine_down`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"code":"engine_down","message":"The extractor isn't answering. Try again in a few minutes."}}}}}}},"/companies/{ticker}/latest":{"get":{"security":[{},{"earningsKey":[]}],"operationId":"getLatestRelease","tags":["Releases"],"summary":"Get a company’s latest earnings release","description":"The figures of the company's newest earnings release. A release nobody extracted yet is extracted live: that counts against the caller's live extractions (a visitor's 5 a day, a key's 20), and `X-EarningsLens-Left` says what's left. One already extracted is served from storage and never counts. With `Accept: text/event-stream`, the steps arrive as server-sent events as they happen (`fetching`, `rendering`, `locating`, `checking`, `retrying`), then `done` with the release, or `error` with a code and message. A release already extracted streams as one `done`.","parameters":[{"name":"ticker","in":"path","required":true,"description":"The company’s ticker, any case: 1 to 10 letters, digits, dots or dashes.","schema":{"type":"string","pattern":"^[A-Za-z0-9.-]{1,10}$","examples":["AAPL"]}},{"name":"format","in":"query","required":false,"description":"One of `json` (the default) or `csv`.","schema":{"type":"string","enum":["json","csv"],"default":"json"}}],"responses":{"200":{"description":"The release’s figures.","headers":{"X-EarningsLens-Left":{"description":"Live extractions the caller has left today, on a live extraction.","schema":{"type":"integer","minimum":0}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Release"},"example":{"company":{"cik":320193,"ticker":"AAPL","name":"Apple Inc."},"release":{"accession":"0000320193-26-000018","form":"8-K","filed":"2026-07-30","fiscal_period":"Q3","period_end":"2026-06-27","currency":"USD","url":"https://www.sec.gov/Archives/edgar/data/320193/000032019326000018/0000320193-26-000018-index.htm"},"figures":[{"field":"revenue","period":"quarter","state":"checked","value":"109417000000","scale":"millions","source":{"exhibit":"a8-kex991q3202606272026.htm","address":"t28/r6/c3","printed":"109,417","url":"https://www.sec.gov/Archives/edgar/data/320193/000032019326000018/a8-kex991q3202606272026.htm"},"xbrl_value":"109417000000","why":null}],"extraction":{"model":"claude-haiku-5-5","prompt_version":"23852c05b90f5bc1","extracted_at":"2026-11-20T21:48:32.423000Z","cost_usd":"0.00096141","checked_at":"2026-11-21T00:30:00Z","graded_by":"0000320193-26-000020"}}},"text/event-stream":{"schema":{"type":"string","description":"Server-sent events: the steps, then `done` with the release or `error`."}},"text/csv":{"schema":{"type":"string","description":"One row per figure, with its source."}}}},"400":{"description":"The ticker isn’t a ticker. `code` is one of: `invalid`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"code":"invalid","message":"See the message."}}}},"401":{"description":"The key is wrong or revoked. A request with an Authorization header is never served as a visitor. `code` is one of: `bad_key`.","headers":{"WWW-Authenticate":{"description":"`Bearer`.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"code":"bad_key","message":"That API key is wrong or revoked. Make a new one in your workspace settings."}}}},"404":{"description":"The API isn’t published yet, the ticker isn’t in SEC’s list, the company filed no earnings release in two years, or the filing isn’t one of its earnings releases. `code` is one of: `no_releases`, `unknown_ticker`, `not_an_earnings_release`, `not_found`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"code":"no_releases","message":"See the message."}}}},"409":{"description":"Someone is extracting this release right now; it will come from storage in a few seconds. `code` is one of: `extracting`.","headers":{"Retry-After":{"description":"Seconds to wait before asking again.","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"code":"extracting","message":"Someone is extracting this release right now. Ask again in a few seconds and it will come from the cache."}}}},"422":{"description":"The filing has no HTML release to read. `code` is one of: `no_release_exhibit`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"code":"no_release_exhibit","message":"That filing has no HTML release to read."}}}},"429":{"description":"Too many requests: 60 a minute, a key's 2,000 reads a day, the caller's live extractions for today, or three extractions running at once. `code` is one of: `limit`, `busy`, `slow_down`, `read_limit`.","headers":{"Retry-After":{"description":"Seconds to wait before asking again.","schema":{"type":"integer","minimum":1}},"X-EarningsLens-Left":{"description":"Live extractions the caller has left today, on a live extraction.","schema":{"type":"integer","minimum":0}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"code":"limit","message":"You've used today's 5 live extractions. Releases already extracted are still served, and the count resets at midnight UTC."}}}},"502":{"description":"SEC or the model failed, or the model’s answer didn’t pass its checks. Nothing is stored. `code` is one of: `extraction_failed`, `sec_refused`, `sec_unavailable`, `failed`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"code":"extraction_failed","message":"The model's answer didn't pass its checks, so no figures are shown."}}}},"503":{"description":"Live extractions are resting (this month’s model budget is spent), unavailable, or the extractor isn’t reachable. Releases already extracted are still served. `code` is one of: `resting`, `live_unavailable`, `engine_down`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"code":"resting","message":"Live extractions are resting: this month's model budget is spent. Releases already extracted are still served."}}}}}}},"/releases/{accession}":{"get":{"security":[{},{"earningsKey":[]}],"operationId":"getRelease","tags":["Releases"],"summary":"Read an extracted release","description":"A release already extracted, from storage. It never counts as a live extraction. A release nobody extracted yet is a 404 that names the request that would extract it.","parameters":[{"name":"accession","in":"path","required":true,"description":"SEC’s accession number of the earnings release (8-K, Item 2.02).","schema":{"type":"string","pattern":"^\\d{10}-\\d{2}-\\d{6}$","examples":["0000320193-26-000018"]}},{"name":"format","in":"query","required":false,"description":"One of `json` (the default) or `csv`.","schema":{"type":"string","enum":["json","csv"],"default":"json"}}],"responses":{"200":{"description":"The release’s figures.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Release"},"example":{"company":{"cik":320193,"ticker":"AAPL","name":"Apple Inc."},"release":{"accession":"0000320193-26-000018","form":"8-K","filed":"2026-07-30","fiscal_period":"Q3","period_end":"2026-06-27","currency":"USD","url":"https://www.sec.gov/Archives/edgar/data/320193/000032019326000018/0000320193-26-000018-index.htm"},"figures":[{"field":"revenue","period":"quarter","state":"checked","value":"109417000000","scale":"millions","source":{"exhibit":"a8-kex991q3202606272026.htm","address":"t28/r6/c3","printed":"109,417","url":"https://www.sec.gov/Archives/edgar/data/320193/000032019326000018/a8-kex991q3202606272026.htm"},"xbrl_value":"109417000000","why":null}],"extraction":{"model":"claude-haiku-5-5","prompt_version":"23852c05b90f5bc1","extracted_at":"2026-11-20T21:48:32.423000Z","cost_usd":"0.00096141","checked_at":"2026-11-21T00:30:00Z","graded_by":"0000320193-26-000020"}}},"text/csv":{"schema":{"type":"string","description":"One row per figure, with its source."}}}},"400":{"description":"That isn’t an accession number. `code` is one of: `invalid`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"code":"invalid","message":"See the message."}}}},"401":{"description":"The key is wrong or revoked. A request with an Authorization header is never served as a visitor. `code` is one of: `bad_key`.","headers":{"WWW-Authenticate":{"description":"`Bearer`.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"code":"bad_key","message":"That API key is wrong or revoked. Make a new one in your workspace settings."}}}},"404":{"description":"The API isn’t published yet, or the release hasn’t been extracted: `extract` names the request that would extract it.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","properties":{"extract":{"type":"string","description":"The request that would extract it."}}}]},"example":{"code":"not_extracted","message":"This release hasn’t been extracted yet.","extract":"POST /api/earningslens/v1/releases/0000320193-26-000018/extract?ticker=<the company's ticker>"}}}},"429":{"description":"Too many requests: 60 a minute, or a key's 2,000 reads a day. `code` is one of: `slow_down`, `read_limit`.","headers":{"Retry-After":{"description":"Seconds to wait before asking again.","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"code":"slow_down","message":"Too many requests. Wait a minute and try again."}}}},"503":{"description":"The extractor or its storage isn’t reachable. `code` is one of: `engine_down`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"code":"engine_down","message":"The extractor isn't answering. Try again in a few minutes."}}}}}}},"/releases/{accession}/extract":{"post":{"security":[{},{"earningsKey":[]}],"operationId":"extractRelease","tags":["Releases"],"summary":"Extract a release","description":"Extracts the release, or serves it from storage when it was extracted before. Asking again never extracts it twice, so it is safe to retry. A release nobody extracted yet is extracted live: that counts against the caller's live extractions (a visitor's 5 a day, a key's 20), and `X-EarningsLens-Left` says what's left. One already extracted is served from storage and never counts. With `Accept: text/event-stream`, the steps arrive as server-sent events as they happen (`fetching`, `rendering`, `locating`, `checking`, `retrying`), then `done` with the release, or `error` with a code and message. A release already extracted streams as one `done`.","x-idempotent":true,"parameters":[{"name":"accession","in":"path","required":true,"description":"SEC’s accession number of the earnings release (8-K, Item 2.02).","schema":{"type":"string","pattern":"^\\d{10}-\\d{2}-\\d{6}$","examples":["0000320193-26-000018"]}},{"name":"ticker","in":"query","required":true,"description":"The company’s ticker: an accession number’s prefix is the filer’s, often a filing agent’s.","schema":{"type":"string","pattern":"^[A-Za-z0-9.-]{1,10}$","examples":["AAPL"]}},{"name":"format","in":"query","required":false,"description":"One of `json` (the default) or `csv`.","schema":{"type":"string","enum":["json","csv"],"default":"json"}}],"responses":{"200":{"description":"The release’s figures.","headers":{"X-EarningsLens-Left":{"description":"Live extractions the caller has left today, on a live extraction.","schema":{"type":"integer","minimum":0}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Release"},"example":{"company":{"cik":320193,"ticker":"AAPL","name":"Apple Inc."},"release":{"accession":"0000320193-26-000018","form":"8-K","filed":"2026-07-30","fiscal_period":"Q3","period_end":"2026-06-27","currency":"USD","url":"https://www.sec.gov/Archives/edgar/data/320193/000032019326000018/0000320193-26-000018-index.htm"},"figures":[{"field":"revenue","period":"quarter","state":"checked","value":"109417000000","scale":"millions","source":{"exhibit":"a8-kex991q3202606272026.htm","address":"t28/r6/c3","printed":"109,417","url":"https://www.sec.gov/Archives/edgar/data/320193/000032019326000018/a8-kex991q3202606272026.htm"},"xbrl_value":"109417000000","why":null}],"extraction":{"model":"claude-haiku-5-5","prompt_version":"23852c05b90f5bc1","extracted_at":"2026-11-20T21:48:32.423000Z","cost_usd":"0.00096141","checked_at":"2026-11-21T00:30:00Z","graded_by":"0000320193-26-000020"}}},"text/event-stream":{"schema":{"type":"string","description":"Server-sent events: the steps, then `done` with the release or `error`."}},"text/csv":{"schema":{"type":"string","description":"One row per figure, with its source."}}}},"400":{"description":"The ticker is missing, or something isn’t a ticker or an accession number. `code` is one of: `invalid`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"code":"invalid","message":"See the message."}}}},"401":{"description":"The key is wrong or revoked. A request with an Authorization header is never served as a visitor. `code` is one of: `bad_key`.","headers":{"WWW-Authenticate":{"description":"`Bearer`.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"code":"bad_key","message":"That API key is wrong or revoked. Make a new one in your workspace settings."}}}},"404":{"description":"The API isn’t published yet, the ticker isn’t in SEC’s list, or the filing isn’t one of the company’s earnings releases. `code` is one of: `not_an_earnings_release`, `unknown_ticker`, `not_found`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"code":"not_an_earnings_release","message":"That filing isn't one of this company's earnings releases."}}}},"409":{"description":"Someone is extracting this release right now; it will come from storage in a few seconds. `code` is one of: `extracting`.","headers":{"Retry-After":{"description":"Seconds to wait before asking again.","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"code":"extracting","message":"Someone is extracting this release right now. Ask again in a few seconds and it will come from the cache."}}}},"422":{"description":"The filing has no HTML release to read. `code` is one of: `no_release_exhibit`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"code":"no_release_exhibit","message":"That filing has no HTML release to read."}}}},"429":{"description":"Too many requests: 60 a minute, a key's 2,000 reads a day, the caller's live extractions for today, or three extractions running at once. `code` is one of: `limit`, `busy`, `slow_down`, `read_limit`.","headers":{"Retry-After":{"description":"Seconds to wait before asking again.","schema":{"type":"integer","minimum":1}},"X-EarningsLens-Left":{"description":"Live extractions the caller has left today, on a live extraction.","schema":{"type":"integer","minimum":0}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"code":"limit","message":"You've used today's 5 live extractions. Releases already extracted are still served, and the count resets at midnight UTC."}}}},"502":{"description":"SEC or the model failed, or the model’s answer didn’t pass its checks. Nothing is stored. `code` is one of: `extraction_failed`, `sec_refused`, `sec_unavailable`, `failed`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"code":"extraction_failed","message":"The model's answer didn't pass its checks, so no figures are shown."}}}},"503":{"description":"Live extractions are resting (this month’s model budget is spent), unavailable, or the extractor isn’t reachable. Releases already extracted are still served. `code` is one of: `resting`, `live_unavailable`, `engine_down`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"code":"resting","message":"Live extractions are resting: this month's model budget is spent. Releases already extracted are still served."}}}}}}},"/usage":{"get":{"security":[{},{"earningsKey":[]}],"operationId":"getUsage","tags":["Usage"],"summary":"Get today’s use and what’s left","description":"With a key, its live extractions and reads today. Without one, the visitor's live extractions today. Both reset at midnight UTC. A key's request here counts as one read.","responses":{"200":{"description":"Today’s use.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Usage"},"example":{"caller":"key","key":{"prefix":"l10e_t2NBweJ","label":"notebook"},"day":"2026-11-21","resets_at":"2026-11-22T00:00:00.000Z","live":{"used":1,"limit":20,"left":19},"reads":{"used":2,"limit":2000,"left":1998}}}}},"401":{"description":"The key is wrong or revoked. A request with an Authorization header is never served as a visitor. `code` is one of: `bad_key`.","headers":{"WWW-Authenticate":{"description":"`Bearer`.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"code":"bad_key","message":"That API key is wrong or revoked. Make a new one in your workspace settings."}}}},"404":{"description":"The API is not published yet. `code` is one of: `not_found`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"code":"not_found","message":"See the message."}}}},"429":{"description":"Too many requests: 60 a minute, or a key's 2,000 reads a day. `code` is one of: `slow_down`, `read_limit`.","headers":{"Retry-After":{"description":"Seconds to wait before asking again.","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"code":"slow_down","message":"Too many requests. Wait a minute and try again."}}}},"503":{"description":"Live extractions aren’t available, or the extractor isn’t reachable. `code` is one of: `live_unavailable`, `engine_down`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"code":"live_unavailable","message":"Live extractions aren't available right now. Releases already extracted are still served."}}}}}}},"/openapi.json":{"get":{"security":[{},{"earningsKey":[]}],"operationId":"getOpenApiDocument","tags":["Usage"],"summary":"Get this OpenAPI document","description":"This API’s OpenAPI 3.1 document, as JSON: its routes, parameters, responses and limits. It is built from the code, so it always matches the routes. Use it to generate a client or to give an agent the API’s tools.","responses":{"200":{"description":"The OpenAPI 3.1 document.","content":{"application/json":{"schema":{"type":"object","description":"OpenAPI 3.1."},"example":{"openapi":"3.1.0"}}}},"401":{"description":"The key is wrong or revoked. A request with an Authorization header is never served as a visitor. `code` is one of: `bad_key`.","headers":{"WWW-Authenticate":{"description":"`Bearer`.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"code":"bad_key","message":"That API key is wrong or revoked. Make a new one in your workspace settings."}}}},"404":{"description":"The API is not published yet. `code` is one of: `not_found`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"code":"not_found","message":"See the message."}}}},"429":{"description":"Too many requests: 60 a minute, or a key's 2,000 reads a day. `code` is one of: `slow_down`, `read_limit`.","headers":{"Retry-After":{"description":"Seconds to wait before asking again.","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"code":"slow_down","message":"Too many requests. Wait a minute and try again."}}}},"503":{"description":"The extractor or its storage isn’t reachable. `code` is one of: `engine_down`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"code":"engine_down","message":"The extractor isn't answering. Try again in a few minutes."}}}}}}}},"components":{"securitySchemes":{"earningsKey":{"type":"http","scheme":"bearer","description":"An `l10e_` key from a Latitude 10 workspace's settings: 20 live extractions and 2,000 reads a day. Leave it out to be served as a visitor (5 live extractions a day)."}},"schemas":{"Company":{"type":"object","description":"A company in SEC’s list of tickers.","required":["cik","ticker","name"],"properties":{"cik":{"type":"integer","description":"SEC’s Central Index Key.","examples":[320193]},"ticker":{"type":"string","description":"Its ticker.","examples":["AAPL"]},"name":{"type":"string","description":"Its name, as SEC lists it.","examples":["Apple Inc."]}}},"Figure":{"type":"object","description":"One figure. A value always comes with its source; `not_found` never has one. `checked`: the company’s XBRL for the period agrees. `differs`: it doesn’t, and both numbers are given. `cannot_check`: XBRL can’t grade it, and `why` says so. `unchecked`: the 10-Q or 10-K isn’t out yet.","required":["field","period","state","value","scale","source","xbrl_value","why"],"properties":{"field":{"type":"string","enum":["revenue","operating_income","net_income","eps_basic","eps_diluted","diluted_shares","cash","total_assets"],"description":"Which figure."},"period":{"type":"string","enum":["quarter","quarter_prior","year","year_prior","balance"],"description":"Which period: the quarter, the same quarter a year earlier, the year, the year before, or the balance sheet date."},"state":{"type":"string","enum":["unchecked","not_found","checked","differs","cannot_check"],"description":"How far it was checked."},"value":{"type":["string","null"],"description":"The value in units (dollars, shares or dollars per share), as a decimal string.","examples":["109417000000"]},"scale":{"type":["string","null"],"description":"The scale the release printed it in.","examples":["millions"]},"source":{"type":["object","null"],"description":"Where in the release it was read.","required":["exhibit","address","printed","url"],"properties":{"exhibit":{"type":"string","description":"The exhibit’s file name."},"address":{"type":"string","description":"The table cell: table, row and column.","examples":["t28/r6/c3"]},"printed":{"type":"string","description":"The text as printed.","examples":["109,417"]},"url":{"type":"string","format":"uri","description":"The exhibit on SEC."}}},"xbrl_value":{"type":["string","null"],"description":"What the company’s XBRL says, once checked."},"why":{"type":["string","null"],"description":"Why it couldn’t be checked, or how it differs."}}},"Release":{"type":"object","description":"An earnings release’s figures, each with its source, and how they were read.","required":["company","release","figures","extraction"],"properties":{"company":{"type":"object","description":"The company that filed it.","required":["cik","ticker","name"],"properties":{"cik":{"type":"integer","description":"SEC’s Central Index Key."},"ticker":{"type":["string","null"],"description":"Its ticker."},"name":{"type":["string","null"],"description":"Its name."}}},"release":{"type":"object","description":"The filing.","required":["accession","form","filed","fiscal_period","period_end","currency","url"],"properties":{"accession":{"type":"string","pattern":"^\\d{10}-\\d{2}-\\d{6}$","description":"SEC’s accession number."},"form":{"type":"string","description":"The form, 8-K or 8-K/A."},"filed":{"type":"string","format":"date","description":"When it was filed."},"fiscal_period":{"type":["string","null"],"description":"The fiscal period it reports, such as Q3."},"period_end":{"type":["string","null"],"format":"date","description":"The last day of that period."},"currency":{"type":["string","null"],"description":"The currency of its figures."},"url":{"type":"string","format":"uri","description":"The filing on SEC."}}},"figures":{"type":"array","description":"Every figure asked of the release.","items":{"$ref":"#/components/schemas/Figure"}},"extraction":{"type":"object","description":"How it was read and checked.","required":["model","prompt_version","extracted_at","cost_usd","checked_at","graded_by"],"properties":{"model":{"type":"string","description":"The model that read it."},"prompt_version":{"type":"string","description":"The prompt’s version: a new one doesn’t re-read old releases."},"extracted_at":{"type":"string","format":"date-time","description":"When it was read."},"cost_usd":{"type":"string","description":"What reading it cost, in US dollars."},"checked_at":{"type":["string","null"],"format":"date-time","description":"When it was last checked against XBRL."},"graded_by":{"type":["string","null"],"description":"The 10-Q or 10-K whose XBRL graded it."}}}}},"Usage":{"type":"object","description":"Today’s use. `key` and `reads` are there for a key only.","required":["caller","day","resets_at","live"],"properties":{"caller":{"type":"string","enum":["key","visitor"],"description":"Who asked."},"key":{"type":"object","description":"The key, by its first 12 characters and label.","properties":{"prefix":{"type":"string","description":"Its first 12 characters."},"label":{"type":"string","description":"Its label."}}},"day":{"type":"string","format":"date","description":"Today, UTC."},"resets_at":{"type":"string","format":"date-time","description":"When the counts reset."},"live":{"$ref":"#/components/schemas/Count"},"reads":{"$ref":"#/components/schemas/Count"}}},"Count":{"type":"object","description":"A daily count.","required":["used","limit","left"],"properties":{"used":{"type":"integer","description":"Used today."},"limit":{"type":"integer","description":"The daily limit."},"left":{"type":"integer","description":"Left today."}}},"Error":{"type":"object","description":"What went wrong, in a fixed message per code.","required":["code","message"],"properties":{"code":{"type":"string","enum":["bad_key","busy","engine_down","extracting","extraction_failed","failed","invalid","limit","live_unavailable","no_release_exhibit","no_releases","not_an_earnings_release","not_extracted","not_found","read_limit","resting","sec_refused","sec_unavailable","slow_down","unknown_ticker"],"description":"A stable code to branch on."},"message":{"type":"string","description":"A sentence for a person."},"left":{"type":"integer","description":"With `limit`: 0."},"resets_at":{"type":"string","format":"date-time","description":"With `limit`: when the count resets."}}}}}}