港交所(HKEx)披露易公告检索与下载工具,直接调用港交所未公开的 JSON API,
无需浏览器,速度快且稳定。
调用 scripts/hkex_scraper.py 脚本:
# 搜索某只股票的公告(最近2个月)
python scripts/hkex_scraper.py search --stock 01748
# 搜索指定日期范围
python scripts/hkex_scraper.py search --stock 01748 --from 2024-01-01 --to 2024-12-31
# 搜索全市场公告(不指定股票代码)
python scripts/hkex_scraper.py search --from 2026-04-01 --to 2026-04-22
# 下载公告文档
python scripts/hkex_scraper.py download --stock 01748 --from 2026-01-01 --output ./pdfs
# 导出为Excel
python scripts/hkex_scraper.py search --stock 01748 --from 2025-01-01 --format xlsx --output 01748_filings.xlsx
# 限制返回数量
python scripts/hkex_scraper.py search --stock 01748 --limit 50
| 参数 | 说明 | 默认值 |
|------|------|--------|
| search | 子命令:搜索公告元数据 | - |
| download | 子命令:搜索并下载文档 | - |
| --stock | 股票代码(5位数字,如01748) | 全市场 |
| --from | 起始日期(YYYY-MM-DD) | 2个月前 |
| --to | 结束日期(YYYY-MM-DD) | 今天 |
| --limit | 限制返回数量 | 0=不限 |
| --format | 输出格式:json/xlsx | json |
| --output | 输出文件路径 | stdout |
| --workers | 并行下载线程数 | 5 |
每条公告包含以下字段:
stockCode: 股票代码(如 01748)
stockName: 公司简称
title: 公告标题
date: 发布日期
link: 文档下载链接
fileType: 文件类型(PDF/HTML/XLSX)
fileSize: 文件大小
filingType: 分类类型(ANNUAL_REPORT/RESULTS/CIRCULAR/NOTICE/OTHER)
使用港交所披露易搜索页面的未公开 JSON API 端点:
https://www1.hkexnews.hk/search/titlesearch.xhtml
https://www1.hkexnews.hk/search/titleSearchServlet.do
该 API 支持:
共 1 个版本