API Reference
DataSinking serves full-text financial reports as Markdown over a simple REST API. All endpoints require an API key.
Get an API key
No signup flow — send your email and a free key is emailed to you:
curl -X POST -H "Content-Type: application/json" \
-d '{"email": "[email protected]"}' \
"https://api.datasink.ing/free-key"One key per email. Free keys are limited to 1 request per second and a shared daily quota. Batch download and higher limits require a yearly key.
Authentication
Pass your API key as an apikey query parameter (FMP style):
curl "https://api.datasink.ing/documents?apikey=YOUR_API_KEY"
Missing or invalid keys return 401. Requests over your plan's rate limit return 429.
Rate limits and quotas vary by plan. Free keys are limited to 1 request per second and cannot use batch download. Yearly keys allow 31 requests per second with a monthly quota.
Python SDK
Not into curl? Use the Python client. Copy sdk/datasinking.py from the GitHub repo — no extra install needed.
from sdk.datasinking import DataSinking
ds = DataSinking("YOUR_API_KEY")
# List exchanges
ds.get_exchanges() # ['bj', 'sse', 'szse']
# Latest 3 reports of a stock (full content)
ds.get_symbol_reports(symbol="600519.SS", limit=3)
# All reports of an entire exchange (full content)
ds.get_exchange_reports("szse", all=True)See the GitHub repo for runnable examples (download a company, or an entire exchange).
List exchanges GET /exchanges
List the available exchanges.
curl "https://api.datasink.ing/exchanges?apikey=YOUR_API_KEY"
List stocks GET /stocks
List stocks for an exchange, with report counts.
| exchange | string | sse / szse / bj |
curl "https://api.datasink.ing/stocks?exchange=sse&apikey=YOUR_API_KEY"
List documents GET /documents
Paginated list of document metadata with filters. Add with_content=1 to include full Markdown in each item.
| page | int | Page number (default 1) |
| size | int | Page size (default 50, max 200) |
| symbol | string | FMP-style ticker, e.g. 600519.SS |
| stock_code | string | 6-digit code, e.g. 600519 |
| exchange | string | sse / szse / bj |
| doc_type | string | annual / semiannual / q1 / q3 / amendment |
| report_period | string | e.g. 2023-12-31 |
| report_period_from | string | report period lower bound, e.g. 2023-01-01 |
| report_period_to | string | report period upper bound, e.g. 2023-12-31 |
| order | string | asc (default) / desc (latest report period first) |
| with_content | string | set 1 to include full Markdown in each item (default: metadata only) |
curl "https://api.datasink.ing/documents?symbol=600519.SS&doc_type=annual&order=desc&apikey=YOUR_API_KEY"
To fetch full text directly, add with_content=1:
curl "https://api.datasink.ing/documents?symbol=600519.SS&order=desc&size=1&with_content=1&apikey=YOUR_API_KEY"
Response (metadata only — no content):
{
"total": 108,
"page": 1,
"size": 1,
"items": [
{
"id": 42,
"symbol": "600519.SS",
"exchange": "sse",
"stock_code": "600519",
"stock_name": "贵州茅台",
"announcement_id": "123456789",
"doc_type": "annual",
"report_period": "2023-12-31",
"title": "贵州茅台2023年年度报告",
"adjunct_url": "https://static.cninfo.com.cn/...",
"word_count": 81234,
"announcement_time": 1704355200000,
"parser_version": 7
}
]
}With with_content=1 each item additionally includes a content field holding the full Markdown body (see the field reference).
Get a document GET /documents/:id
Returns metadata plus the full report body in Markdown (content field).
curl "https://api.datasink.ing/documents/42?apikey=YOUR_API_KEY"
Response (single document, content included):
{
"id": 42,
"symbol": "600519.SS",
"exchange": "sse",
"stock_code": "600519",
"stock_name": "贵州茅台",
"announcement_id": "123456789",
"doc_type": "annual",
"report_period": "2023-12-31",
"title": "贵州茅台2023年年度报告",
"adjunct_url": "https://static.cninfo.com.cn/...",
"word_count": 81234,
"announcement_time": 1704355200000,
"parser_version": 7,
"content": "---\nstock_code: \"600519\"\nreport_period: \"2023-12-31\"\nannouncement_date: \"2024-04-03\"\ndoc_type: \"annual\"\n---\n\n# 第一节 ... (full Markdown body)"
}Fields returned
Every document object carries these fields (the list endpoint wraps them in items with total / page / size):
| id | int | Document ID — use in /documents/{id} and batch |
| symbol | string | FMP-style ticker, e.g. 600519.SS |
| exchange | string | sse / szse / bj |
| stock_code | string | 6-digit code, e.g. 600519 |
| stock_name | string | Company name (Chinese) |
| report_period | string | Reporting period, YYYY-MM-DD (the fiscal period this report covers) |
| doc_type | string | annual / semiannual / q1 / q3 / amendment |
| title | string | Announcement title |
| word_count | int | Word count of the Markdown body |
| announcement_time | int | Disclosure time as a millisecond Unix timestamp |
| content | string | Full Markdown body — only with with_content=1, single-doc, or batch |
content opens with a YAML frontmatter block (stock_code, stock_name, report_period, announcement_date, doc_type, title), so an LLM can read the document identity and reporting period without guessing from the text.
Batch download POST /documents/batch
Fetch multiple documents (with full content) by ID in one request. Max 100 IDs per request. Not available on the free plan.
curl -X POST -H "Content-Type: application/json" \
-d '{"doc_ids": [1, 2, 3]}' \
"https://api.datasink.ing/documents/batch?apikey=YOUR_API_KEY"Symbol format
Symbols follow the FMP / Yahoo convention, so they drop into existing workflows:
| Exchange | Suffix | Example |
| Shanghai (SSE) | .SS | 600519.SS |
| Shenzhen (SZSE) | .SZ | 000001.SZ |
| Beijing (BSE) | .BJ | 830799.BJ |
Using it from an LLM
Point any LLM at this site, give it your key, and ask in plain language — the model reads the API, calls it, and hands you the answer. Full version with prompts and responses in the GitHub repo.
1. Explore coverage
“Which exchanges does this cover?”
curl "https://api.datasink.ing/exchanges?apikey=YOUR_API_KEY"
→ {"exchanges":["bj","sse","szse"]}
2. List a company's reports
“List Moutai's latest 5 reports.”
curl "https://api.datasink.ing/documents?symbol=600519.SS&order=desc&size=5&apikey=YOUR_API_KEY"
3. Extract a number — with the right units
“Moutai's 2023 revenue and net profit — don't get the unit wrong.”
curl "https://api.datasink.ing/documents?symbol=600519.SS&doc_type=annual&report_period=2023-12-31&with_content=1&size=1&apikey=YOUR_API_KEY"
The returned content opens with YAML frontmatter (identity + period) and marks unit rows like > 单位:元, so the model reads each figure at the correct scale.