{"openapi":"3.0.3","info":{"title":"DataSinking API","version":"1.0.0","description":"Full-text financial reports from the US (NYSE / NASDAQ / CBOE), China (SSE / SZSE / BSE), Japan (TSE), Korea (KOSPI / KOSDAQ / KONEX) and Taiwan (TWSE / TPEx) as clean Markdown. Query by FMP-style symbol (AAPL, 600519.SS, 7203.T, 005930.KS, 2330.TW) or filter by exchange, doc_type, report period, section. Sourced from each market's official disclosure platform (SEC EDGAR / cninfo / EDINET / DART / MOPS); every document carries a `source` field — please keep the attribution when redistributing. Authenticate with an `apikey` query parameter. Get a free key via POST /free-key."},"servers":[{"url":"https://api.datasink.ing"}],"security":[{"ApiKeyQuery":[]}],"paths":{"/documents":{"get":{"operationId":"listDocuments","summary":"List documents (metadata, optionally with full content)","parameters":[{"name":"page","in":"query","schema":{"type":"integer","default":1}},{"name":"size","in":"query","schema":{"type":"integer","default":50,"maximum":200}},{"name":"stock_code","in":"query","schema":{"type":"string"}},{"name":"symbol","in":"query","schema":{"type":"string"},"description":"FMP-style ticker, e.g. AAPL / 600519.SS."},{"name":"exchange","in":"query","schema":{"type":"string","enum":["bj","br","by","jpx","koe","ksc","lk","lse","nasdaq","np","nyse","otc","pk","rs","sse","szse","tpex","twse"]}},{"name":"doc_type","in":"query","schema":{"type":"string","enum":["annual","semiannual","q1","q3","amendment"]}},{"name":"report_period","in":"query","schema":{"type":"string"},"description":"Exact period, e.g. 2023-12-31."},{"name":"report_period_from","in":"query","schema":{"type":"string"},"description":"Lower bound, e.g. 2023-01-01."},{"name":"report_period_to","in":"query","schema":{"type":"string"},"description":"Upper bound, e.g. 2023-12-31."},{"name":"order","in":"query","schema":{"type":"string","enum":["asc","desc"],"default":"asc"},"description":"desc = latest report period first."},{"name":"with_content","in":"query","schema":{"type":"string"},"description":"Set 1 to include full Markdown in each item."}],"responses":{"200":{"description":"Paginated list","content":{"application/json":{"schema":{"type":"object","properties":{"total":{"type":"integer"},"page":{"type":"integer"},"size":{"type":"integer"},"items":{"type":"array","items":{"type":"object","description":"A financial-report document. `content` (full Markdown body, with YAML frontmatter) is present only for single-document, batch, or when with_content=1.","properties":{"id":{"type":"integer","description":"Document ID (use in /documents/{id} and batch)."},"symbol":{"type":"string","description":"FMP-style ticker, e.g. AAPL / 600519.SS."},"exchange":{"type":"string","enum":["bj","br","by","jpx","koe","ksc","lk","lse","nasdaq","np","nyse","otc","pk","rs","sse","szse","tpex","twse"]},"stock_code":{"type":"string","description":"Exchange-local code, e.g. AAPL (US), 600519 (CN), 7203 (JP), 2330 (TW)."},"stock_name":{"type":"string","nullable":true,"description":"Company name in the market's local language."},"announcement_id":{"type":"string","description":"Identifier of the filing at the source disclosure platform."},"source":{"type":"string","nullable":true,"description":"Official disclosure platform the document was sourced from, e.g. \"SEC EDGAR\" (US), \"巨潮资讯网 (cninfo)\" (China), \"EDINET 金融庁 (disclosure2.edinet-fsa.go.jp)\" (Japan), \"DART 금융감독원 (opendart.fss.or.kr)\" (Korea), \"公開資訊觀測站 MOPS (mops.twse.com.tw)\" (Taiwan). Please keep this attribution when redistributing the data."},"doc_type":{"type":"string","enum":["annual","semiannual","q1","q3","amendment"]},"report_period":{"type":"string","nullable":true,"description":"Reporting period, YYYY-MM-DD (the fiscal period this report covers)."},"title":{"type":"string"},"adjunct_url":{"type":"string","nullable":true,"description":"Original disclosure URL."},"word_count":{"type":"integer"},"announcement_time":{"type":"integer","description":"Disclosure time as a millisecond Unix timestamp."},"parser_version":{"type":"integer"},"content":{"type":"string","description":"Full Markdown body, opening with a YAML frontmatter (stock_code / stock_name / report_period / announcement_date / doc_type / title)."}},"additionalProperties":true}}}}}}}}}},"/documents/{id}":{"get":{"operationId":"getDocument","summary":"Get a single document (metadata + full Markdown content), or a single section via ?section=","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}},{"name":"section","in":"query","schema":{"type":"string"},"description":"Return only this section (fuzzy title match, e.g. '管理层讨论与分析' / 'MD&A')."}],"responses":{"200":{"description":"Document with content (or a single section when ?section= is given)","content":{"application/json":{"schema":{"type":"object","description":"A financial-report document. `content` (full Markdown body, with YAML frontmatter) is present only for single-document, batch, or when with_content=1.","properties":{"id":{"type":"integer","description":"Document ID (use in /documents/{id} and batch)."},"symbol":{"type":"string","description":"FMP-style ticker, e.g. AAPL / 600519.SS."},"exchange":{"type":"string","enum":["bj","br","by","jpx","koe","ksc","lk","lse","nasdaq","np","nyse","otc","pk","rs","sse","szse","tpex","twse"]},"stock_code":{"type":"string","description":"Exchange-local code, e.g. AAPL (US), 600519 (CN), 7203 (JP), 2330 (TW)."},"stock_name":{"type":"string","nullable":true,"description":"Company name in the market's local language."},"announcement_id":{"type":"string","description":"Identifier of the filing at the source disclosure platform."},"source":{"type":"string","nullable":true,"description":"Official disclosure platform the document was sourced from, e.g. \"SEC EDGAR\" (US), \"巨潮资讯网 (cninfo)\" (China), \"EDINET 金融庁 (disclosure2.edinet-fsa.go.jp)\" (Japan), \"DART 금융감독원 (opendart.fss.or.kr)\" (Korea), \"公開資訊觀測站 MOPS (mops.twse.com.tw)\" (Taiwan). Please keep this attribution when redistributing the data."},"doc_type":{"type":"string","enum":["annual","semiannual","q1","q3","amendment"]},"report_period":{"type":"string","nullable":true,"description":"Reporting period, YYYY-MM-DD (the fiscal period this report covers)."},"title":{"type":"string"},"adjunct_url":{"type":"string","nullable":true,"description":"Original disclosure URL."},"word_count":{"type":"integer"},"announcement_time":{"type":"integer","description":"Disclosure time as a millisecond Unix timestamp."},"parser_version":{"type":"integer"},"content":{"type":"string","description":"Full Markdown body, opening with a YAML frontmatter (stock_code / stock_name / report_period / announcement_date / doc_type / title)."}},"additionalProperties":true}}}},"404":{"description":"Not found (or section not found)"}}}},"/documents/{id}/sections":{"get":{"operationId":"listDocumentSections","summary":"List the section headings of a document","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Section headings","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"integer"},"symbol":{"type":"string"},"total":{"type":"integer"},"sections":{"type":"array","items":{"type":"string"}}}}}}},"404":{"description":"Not found"}}}},"/documents/batch":{"post":{"operationId":"batchDocuments","summary":"Fetch multiple documents (with content) by ID — free plan: up to 3 per request, yearly: up to 31","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"doc_ids":{"type":"array","items":{"type":"integer"},"maxItems":31,"description":"Free plan accepts at most 3 IDs per request; the yearly plan accepts up to 31."}},"required":["doc_ids"]}}}},"responses":{"200":{"description":"Documents found","content":{"application/json":{"schema":{"type":"object","properties":{"count":{"type":"integer"},"missing":{"type":"array","items":{"type":"integer"}},"items":{"type":"array","items":{"type":"object","description":"A financial-report document. `content` (full Markdown body, with YAML frontmatter) is present only for single-document, batch, or when with_content=1.","properties":{"id":{"type":"integer","description":"Document ID (use in /documents/{id} and batch)."},"symbol":{"type":"string","description":"FMP-style ticker, e.g. AAPL / 600519.SS."},"exchange":{"type":"string","enum":["bj","br","by","jpx","koe","ksc","lk","lse","nasdaq","np","nyse","otc","pk","rs","sse","szse","tpex","twse"]},"stock_code":{"type":"string","description":"Exchange-local code, e.g. AAPL (US), 600519 (CN), 7203 (JP), 2330 (TW)."},"stock_name":{"type":"string","nullable":true,"description":"Company name in the market's local language."},"announcement_id":{"type":"string","description":"Identifier of the filing at the source disclosure platform."},"source":{"type":"string","nullable":true,"description":"Official disclosure platform the document was sourced from, e.g. \"SEC EDGAR\" (US), \"巨潮资讯网 (cninfo)\" (China), \"EDINET 金融庁 (disclosure2.edinet-fsa.go.jp)\" (Japan), \"DART 금융감독원 (opendart.fss.or.kr)\" (Korea), \"公開資訊觀測站 MOPS (mops.twse.com.tw)\" (Taiwan). Please keep this attribution when redistributing the data."},"doc_type":{"type":"string","enum":["annual","semiannual","q1","q3","amendment"]},"report_period":{"type":"string","nullable":true,"description":"Reporting period, YYYY-MM-DD (the fiscal period this report covers)."},"title":{"type":"string"},"adjunct_url":{"type":"string","nullable":true,"description":"Original disclosure URL."},"word_count":{"type":"integer"},"announcement_time":{"type":"integer","description":"Disclosure time as a millisecond Unix timestamp."},"parser_version":{"type":"integer"},"content":{"type":"string","description":"Full Markdown body, opening with a YAML frontmatter (stock_code / stock_name / report_period / announcement_date / doc_type / title)."}},"additionalProperties":true}}}}}}}}}},"/exchanges":{"get":{"operationId":"listExchanges","summary":"List available exchanges","responses":{"200":{"description":"Exchange list","content":{"application/json":{"schema":{"type":"object","properties":{"exchanges":{"type":"array","items":{"type":"string"}}}}}}}}}},"/stocks":{"get":{"operationId":"listStocks","summary":"List stocks for an exchange, with report counts","parameters":[{"name":"exchange","in":"query","required":true,"schema":{"type":"string","enum":["bj","br","by","jpx","koe","ksc","lk","lse","nasdaq","np","nyse","otc","pk","rs","sse","szse","tpex","twse"]}}],"responses":{"200":{"description":"Stock list","content":{"application/json":{"schema":{"type":"object","properties":{"exchange":{"type":"string"},"total":{"type":"integer"},"items":{"type":"array","items":{"type":"object","properties":{"stock_code":{"type":"string"},"stock_name":{"type":"string","nullable":true},"report_count":{"type":"integer"}}}}}}}}}}}},"/feedback":{"post":{"operationId":"submitFeedback","summary":"Request a full backfill of a stock's filings (idempotent — returns existing status if already queued)","description":"Idempotent lookup-or-submit. If the stock was already submitted recently (within the last 127 feedback records for the key), it returns that existing status with queued=false; otherwise it queues a re-fetch from the IPO prospectus onward and returns queued=true. Feedback quota is separate from the document-reading quota. Free keys: once per 3 seconds, 31 stocks per 7 days per key (plus a shared pool of 8,191 per 7 days across all free users). Yearly keys: 3 per second, 8,191 stocks per 7 days per key. Runs in the background — poll GET /feedback/{id}.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"exchange":{"type":"string","description":"Exchange code, e.g. szse."},"stock_code":{"type":"string","description":"Stock code from list_stocks."}},"required":["exchange","stock_code"]}}}},"responses":{"200":{"description":"Feedback id + current status","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"integer"},"status":{"type":"string","enum":["pending","processing","done","failed"]},"queued":{"type":"boolean","description":"true = this call just queued it; false = returned an existing record"},"exchange":{"type":"string"},"stock_code":{"type":"string"},"stock_name":{"type":"string","nullable":true},"note":{"type":"string","nullable":true},"created_at":{"type":"integer"},"completed_at":{"type":"integer","nullable":true}}}}}},"400":{"description":"Invalid input (bad JSON / missing exchange or stock_code / stock not found)"},"429":{"description":"Rate-limited or quota exceeded"}}}},"/feedback/{id}":{"get":{"operationId":"getFeedbackStatus","summary":"Check the progress of a submitted feedback request","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Feedback status (pending / processing / done / failed)","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"integer"},"status":{"type":"string","enum":["pending","processing","done","failed"]},"exchange":{"type":"string"},"stock_code":{"type":"string"},"stock_name":{"type":"string","nullable":true},"note":{"type":"string","nullable":true},"created_at":{"type":"integer"},"completed_at":{"type":"integer","nullable":true}}}}}},"404":{"description":"Feedback not found"}}}},"/free-key":{"post":{"operationId":"getFreeKey","summary":"Get a free API key emailed to you (no auth required)","security":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","format":"email"}},"required":["email"]}}}},"responses":{"200":{"description":"Key sent to email","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}}}}}},"components":{"securitySchemes":{"ApiKeyQuery":{"type":"apiKey","in":"query","name":"apikey","description":"API key, passed as the `apikey` query parameter."}}}}