A-share listed company announcement extraction result query service. Supports retrieval of structured extracted data by date range, securities code, and original announcement link.
Service address: https://api.clawshire.cn
Pre-check
Before executing any API call, you must check whether the CLAWSHIRE_API_KEY environment variable exists.
- Only determine whether it exists;must notdisplay the key content in plain text in the output
- If it does not exist, guide the user to register and obtain it:
https://clawshire.cn/api-docs
Authentication method
If the interface requires authentication, include in all request headers:
Authorization: Bearer $CLAWSHIRE_API_KEY
Announcement query interface (/api/v1/announcements、/api/v1/stock/{sec_code}/announcements、/api/v1/met_link)no authenticationrequired to call.
Workflow
Workflow 1: Query announcements by date
Applicable scenario: The user wants to obtain all announcement extraction results for a certain day or period.
Steps:
- Confirm the date range (
start_date、end_date, formatYYYY-MM-DD) - Optional: Whether the user specifies an announcement category (
infotype, such as董事会决议) - Call
GET /api/v1/announcements - Display results: total number of announcements, company name, announcement type, date, structured extracted content
Default behavior:
- When no quantity is specified, display the first 20 by default (
page_size=20) - When the results contain the
extracted_infofield, fully display the extracted content
Workflow 2: Query announcements by securities code
Applicable scenario: The user follows announcements of a specific listed company.
Steps:
- Confirm the securities code (6 digits, such as
000001) - Optional: date range (defaults to the current day), announcement category filter
- Call
GET /api/v1/stock/{sec_code}/announcements - Display the company's announcement list and extraction results
Workflow 3: Query by announcement link
Applicable scenario: The user has the original announcement link and wants to obtain the structured extraction results.
Steps:
- Obtain the original announcement link provided by the user (
met_link) - Call
GET /api/v1/met_link?met_link=<url_encoded_link> - Display the complete extraction results of the announcement
Workflow 4: Obtain API Key
Applicable scenario: The user needs to obtain an API Key.
Steps:
- Guide the user to log in to the console:
https://clawshire.cn - After completing login authentication in the console, manually create an API Key
- Set the
api_keygenerated by the console as an environment variable:export CLAWSHIRE_API_KEY="sk-xxxxxxxx"
The API Key must be manually created after logging in to the console; registration or acquisition through API interfaces is not supported.
Result display specifications
Each announcement result must include:
- Company:
{sec_name}({sec_code}) - Type:
infotype - Date:
doc_date - Original link:
met_link - Extracted content:
extracted_infocomplete JSON (if present)
Call limits
- Free account: Each API Key has a total quota of 100 calls; please plan usage reasonably
- It is recommended that each query date range not exceed 30 days to avoid too many results
page_sizemaximum 100; if exceeded, pagination is required- If the user does not specify a quantity, default
page_size=20 - It is recommended to use a broad date range plus category filtering to retrieve everything in one go, reducing unnecessary pagination requests
Error Handling
| Error Code | Meaning | Handling Method |
|---|---|---|
| 400 | Parameter Error | Check the date format (YYYY-MM-DD) and required fields |
| 401 | Invalid API Key | Prompt the user to check the CLAWSHIRE_API_KEY environment variable |
| 404 | Resource Not Found | Confirm whether the security code or link is correct |
| 500 | Server Error | Retry later, or visit https://clawshire.cn to check service status |