# Taiwan Stock Market Data API: TSMC, Quotes, Dividends, Revenue (`appley_rhodolite/taiwan-stock-twse-tpex-data`) Actor

Taiwan stock market data in clean JSON, CSV or Excel: daily quotes, dividends, monthly revenue, company profiles and announcements for TSMC and every TWSE and TPEx stock. Official open data, ISO dates, no API key.

- **URL**: https://apify.com/appley_rhodolite/taiwan-stock-twse-tpex-data.md
- **Developed by:** [TW Data Tools](https://apify.com/appley_rhodolite) (community)
- **Categories:** Business, Developer tools, AI
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per event

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Taiwan Stock Market Data API: TWSE + TPEx Quotes, Dividends, Revenue

Get **Taiwan stock market data** as clean JSON, CSV or Excel: daily stock quotes (OHLC, volume), dividends, monthly revenue, company profiles, institutional trades and material announcements for **TSMC (2330)** and every other company listed on the **Taiwan Stock Exchange (TWSE)** and the **Taipei Exchange (TPEx, OTC)**. One Actor, both markets, one consistent schema. No API key, no proxy, no browser, no scraping of Yahoo Finance or brokerage sites.

The data comes straight from the **official TWSE and TPEx OpenAPI** open data. The source feeds use Republic of China (minguo) dates like `1151106`, quoted numbers like `"0.0000"`, Chinese-only field names and a different layout per exchange. This Actor converts that into ISO dates (`2026-11-06`), real numbers, English field names (Traditional Chinese optional) and the **same fields for both markets**, so you can load Asian stock data into a database, spreadsheet, dashboard or LLM pipeline without writing a parser.

> Independent tool. **Not affiliated with, endorsed by, or sponsored by** TWSE, TPEx or the FSC. Data is published as provided by the exchanges, for information only, and is **not investment advice**. Data is end-of-day or periodic, not real-time.

### What data you get

| `dataset` | What you get | Markets |
|---|---|---|
| `daily_quotes` | Latest daily open, high, low, close, change, volume, trade value, number of transactions (TPEx adds average price, bid/ask, issued shares, next-day reference and limit prices) | TWSE, TPEx |
| `dividends` | Cash and stock dividends per share, totals, board and shareholder meeting dates, earnings context, dividend year | TWSE, TPEx |
| `monthly_revenue` | Monthly revenue, month-over-month %, year-over-year %, year-to-date figures (NT$ thousand) | TWSE, TPEx |
| `company_profile` | Name, English name, industry code, address, tax ID, phone, founded and listed dates, capital, shares, transfer agent, website | TWSE, TPEx |
| `institutional_trades` | Daily buy, sell and net of foreign investors, investment trusts and dealers (shares) | TPEx only\* |
| `announcements` | Daily material announcements: time, clause, subject, full text | TWSE, TPEx |

\* TWSE does not publish per-stock institutional trades in its OpenAPI. If you request it for TWSE you get a warning in the run log, not an error.

### Use cases

- **Quant research and backtesting:** schedule a daily snapshot and build your own Taiwan price history. The cross-market schema means no per-exchange parsing.
- **Dividend screening:** list cash and stock dividends per share for all Taiwan companies, then rank or filter them in a sheet or notebook.
- **Dashboards and reports:** monthly revenue growth (MoM, YoY), top movers by volume, TWSE vs TPEx breadth.
- **LLM, RAG and AI agents:** typed JSON with English keys and a `sourceUrl` on every record, ready for tool calls via the Apify API or MCP.
- **Monitoring and alerts:** schedule `announcements` and alert on keywords such as buyback, merger or dividend in the subject.
- **Asian equities coverage:** add Taiwan (a major semiconductor and electronics market) next to your US or Japanese data feeds.

### Input

| Field | Description |
|---|---|
| `dataset` | One of the datasets above. |
| `market` | `TWSE`, `TPEx` or `both` (default). |
| `symbols` | List of stock codes, for example `["2330", "6488"]`. Empty = all. |
| `dateFrom`, `dateTo` | ISO dates. The official endpoints serve the **latest snapshot only**; these filter that snapshot. |
| `language` | `en` (default), `zh` (Chinese field names) or `both` (English plus a nested `zh` object). |
| `includeContactPersons` | Default `false`. See "Personal data". |
| `maxItems` | Cap on results (you pay per result). `0` = no limit. |

#### Example 1: TSMC and a few other stocks, daily quotes

```json
{
  "dataset": "daily_quotes",
  "market": "both",
  "symbols": ["2330", "2317", "2454", "6488"],
  "language": "en",
  "maxItems": 100
}
```

#### Example 2: dividends for every TWSE-listed company (dividend screening)

```json
{
  "dataset": "dividends",
  "market": "TWSE",
  "symbols": [],
  "language": "en",
  "maxItems": 0
}
```

#### Example 3: monthly revenue for the AI supply chain, with Chinese field names too

```json
{
  "dataset": "monthly_revenue",
  "market": "both",
  "symbols": ["2330", "2382", "3231", "2317"],
  "language": "both",
  "maxItems": 50
}
```

### Output sample

Every record has `symbol`, `name`, `market`, `dataset`, `date` (ISO), the dataset-specific fields, `sourceUrl` and `fetchedAt`. Fields that do not exist for a market are `null`, so all records of a run share one schema.

```json
{
  "symbol": "2330",
  "name": "台積電",
  "market": "TWSE",
  "dataset": "daily_quotes",
  "date": "2026-11-06",
  "open": 2020,
  "high": 2195,
  "low": 2020,
  "close": 2135,
  "change": -105,
  "volume": 110714587,
  "value": 231893102005,
  "transactions": 675265,
  "sourceUrl": "https://openapi.twse.com.tw/v1/exchangeReport/STOCK_DAY_ALL",
  "fetchedAt": "2026-11-08T02:19:24Z"
}
```

Each run also stores a `RUN_SUMMARY` record in the key-value store (request count, raw record count, warnings). Download the dataset as JSON, CSV, Excel, XML or HTML.

### How much does it cost

Pay per event, no subscription:

- **Actor start:** $0.005 per run (charged once per GB of memory; the default 256 MB is one event).
- **Result:** $0.0005 per record pushed to the dataset.

| Run | Records | Approx. cost |
|---|---|---|
| One stock, e.g. TSMC 2330 | 1 | about $0.0055 |
| 100 records (default `maxItems`) | 100 | about $0.055 |
| All TWSE daily quotes | about 1,400 | about $0.70 |
| Full market `daily_quotes`, TWSE + TPEx | about 15,000 (measured 15,007 on 2026-11-06) | about $7.51 |

Record counts change daily as the exchanges list and delist securities (the TPEx quotes feed also includes warrants and ETFs). Use `symbols` and `maxItems` to control cost. The Actor also stops when it reaches the maximum cost per run that you set. Check the Pricing tab for the current prices.

### Integrations and API

Run it from the Console, on a schedule, or from your code. Every run writes to an Apify dataset you can export or query.

**Python**

```python
from apify_client import ApifyClient

client = ApifyClient("<YOUR_APIFY_TOKEN>")
run = client.actor("appley_rhodolite/taiwan-stock-twse-tpex-data").call(run_input={
    "dataset": "daily_quotes",
    "market": "both",
    "symbols": ["2330"],
})
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item["symbol"], item["date"], item["close"])
```

**JavaScript** works the same with `apify-client` on npm. Or call the REST API directly (`POST /v2/acts/appley_rhodolite~taiwan-stock-twse-tpex-data/runs`).

- **Scheduling:** use Apify Schedules (for example every weekday after the Taiwan close) to build your own price and dividend history, because the official endpoints serve the latest snapshot only.
- **Google Sheets, Make, Zapier, n8n:** use the Apify integrations to push each run's dataset into a spreadsheet, a database or an automation.
- **Webhooks:** trigger your own endpoint when a run finishes.
- **AI agents:** call the Actor through the Apify API or the Apify MCP server and get typed JSON back.

### Personal data

By default the Actor outputs **no names of individuals**. `company_profile` omits chairman, general manager, spokesperson, deputy spokesperson, auditors' names and the company email. Setting `includeContactPersons: true` adds chairman, general manager, spokesperson (with title), deputy spokesperson and the company email exactly as published by the exchanges. If you enable it, you are responsible for lawful use under applicable privacy law (including Taiwan's PDPA and, where relevant, GDPR).

### FAQ

**Is this real-time Taiwan stock data?** No. The OpenAPI endpoints are end-of-day or periodic snapshots, updated after the close and, for some datasets, monthly or on filing.

**Can I get historical prices?** Not from these endpoints. Schedule the Actor daily and store the output to build your own history.

**Does it cover TSMC and ETFs like 0050?** Yes for any code that appears in the official feeds, for example `2330` (TSMC) or `0050`. Not every dataset contains every code (for example ETFs have no monthly revenue); unknown codes are listed in the run warnings.

**Do I need an API key or account at TWSE or TPEx?** No.

**Is it the same data as Yahoo Finance?** No. It is the exchanges' own open data, normalized. It does not include news, options, analyst ratings or real-time quotes.

**Why is `date` the report date for `company_profile` and `dividends`?** Those endpoints publish the date the table was generated, not a trading date.

**What do the monthly revenue units mean?** NT$ thousand, as published. `dataMonth` is the revenue month (for example `2026-09`).

**Why are some quote prices `null`?** The TPEx quotes endpoint includes many securities (warrants, ETFs and so on) that did not trade that day, so open, high, low and close are empty.

**What happens on a market holiday?** You get the previous trading day's snapshot (see `date`), or an empty result with a warning if you filtered by date.

**Why did I get a warning and zero results for a symbol?** The code was not found in the chosen dataset and market; the warning lists unknown symbols.

**What is `dividendYear`?** The dividend year converted from the ROC year to the Gregorian year.

### Data source and attribution

- TWSE OpenAPI: https://openapi.twse.com.tw/
- TPEx OpenAPI: https://www.tpex.org.tw/openapi/

Data source: TWSE OpenAPI and TPEx OpenAPI, provided via Taiwan's Government Open Data Platform (data.gov.tw) under the [Open Government Data License, version 1.0](https://data.gov.tw/license). This Actor only reformats the data (date formats, number types, field names); values are passed through as published, and `sourceUrl` points to the original endpoint. Not affiliated with or endorsed by TWSE, TPEx or the FSC. Not real-time; no warranty of accuracy.

資料來源：臺灣證券交易所與證券櫃檯買賣中心 OpenAPI，經政府資料開放平臺依「政府資料開放授權條款－第1版」提供。本工具僅作格式轉換，與上述機構無關聯、未獲背書；非即時資料，不保證正確。

The Actor sends a small number of polite requests per run (identified as `twse-tpex-bundle/1.0`, at most about 2 per second, with retries and backoff).

### Changelog

- 0.2 (2026-11-08): README and Store listing rewritten (use cases, input examples, cost table, integrations, FAQ). No code changes.
- 0.1: first release.

# Actor input Schema

## `dataset` (type: `string`):

Which dataset to fetch. institutional_trades is available for TPEx only (TWSE does not publish it in its OpenAPI).

## `market` (type: `string`):

TWSE = listed (Taiwan Stock Exchange), TPEx = OTC (Taipei Exchange).

## `symbols` (type: `array`):

Stock codes such as 2330 or 6488. Leave empty for all stocks.

## `dateFrom` (type: `string`):

ISO date (YYYY-MM-DD). The official endpoints publish the latest snapshot only, so this filters that snapshot.

## `dateTo` (type: `string`):

ISO date (YYYY-MM-DD).

## `language` (type: `string`):

en = English field names; zh = Traditional Chinese field names; both = English fields plus a nested 'zh' object.

## `includeContactPersons` (type: `boolean`):

Off by default. When on, company_profile also outputs the chairman, general manager, spokesperson names and the company email as published by the exchanges. Only enable if you have a lawful purpose.

## `maxItems` (type: `integer`):

Maximum number of results to return (you pay per result). 0 = no limit.

## Actor input object example

```json
{
  "dataset": "daily_quotes",
  "market": "both",
  "symbols": [
    "2330"
  ],
  "language": "en",
  "includeContactPersons": false,
  "maxItems": 100
}
```

# Actor output Schema

## `results` (type: `string`):

All scraped records in the default dataset.

## `overview` (type: `string`):

Overview view of the default dataset.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "symbols": [
        "2330"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("appley_rhodolite/taiwan-stock-twse-tpex-data").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "symbols": ["2330"] }

# Run the Actor and wait for it to finish
run = client.actor("appley_rhodolite/taiwan-stock-twse-tpex-data").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "symbols": [
    "2330"
  ]
}' |
apify call appley_rhodolite/taiwan-stock-twse-tpex-data --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,appley_rhodolite/taiwan-stock-twse-tpex-data"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/iyiNtfhWZHdsAtF7T/builds/nKDkFPHnSlIVd7dOK/openapi.json
