解答
How do you use the t187ap05_L monthly revenue endpoint on the TWSE OpenAPI?
t187ap05_L is the TWSE OpenAPI endpoint for listed companies' monthly operating revenue. A keyless GET returns JSON carrying current-month, prior-month and year-ago revenue plus the percentage changes. It serves the latest period only, so history is something you poll for monthly and store.
What the endpoint is
Monthly revenue is a high-frequency fundamental signal specific to Taiwan: listed and OTC companies report operating revenue every month, with no US equivalent. t187ap05_L is the open-data form of that filing for listed companies. Probed on 2026-07-31 it returned roughly a thousand rows covering the whole listed market, each with company code and name, industry, current-month revenue, prior-month revenue, year-ago revenue, the corresponding percentage changes, and cumulative revenue.
curl "https://openapi.twse.com.tw/v1/opendata/t187ap05_L"The official way to call it
No key, no headers, just a GET. Field names are Chinese strings — the current-month revenue field reads 營業收入-當月營收, and the year-on-year change 營業收入-去年同月增減(%). Amounts are in thousands of New Taiwan dollars and arrive as strings, so cast them. Both the table date and the reporting period use the ROC calendar: a reporting period of 11506 means the 115th ROC year, month 6, which is June 2026.
import requests
url = "https://openapi.twse.com.tw/v1/opendata/t187ap05_L"
rows = requests.get(url, timeout=30).json()
row = next(r for r in rows if r["公司代號"] == "2330")
print(row["資料年月"], row["營業收入-當月營收"], row["營業收入-去年同月增減(%)"])Its limits
- Latest period only: the endpoint returns a whole-market snapshot with no period parameter. A date query string left the response unchanged when tested, so history has to be polled monthly and stored.
- Listed companies only: OTC monthly revenue is not here — it comes from TPEx separately, under different field names.
- No per-company disclosure timestamp: the table date in the payload is when the table was generated, not when each company actually filed. Using it as the knowledge date will bias a point-in-time backtest.
- Chinese field names and a unit to watch: amounts are in thousands, which is easy to mix up with units when merging against another source.
- Free-text notes: mergers, renames and similar events are explained in prose, which is awkward to parse programmatically.
When you need history and point-in-time correctness
A revenue-momentum strategy needs exactly the two things this endpoint does not provide: years of history, and the date each figure became knowable. TW Market Data's monthly revenue starts at 2010-01, covers 2,096 companies with YoY and MoM changes, and carries a knowledge date per row so an as-of query aligns with your backtest timeline instead of looking ahead.
curl "https://api.twmarketdata.com/v2/datasets/monthly-revenue?symbol=2330&limit=12" \
-H "X-API-Key: $TWMD_API_KEY"相關連結