# 🇹🇼 Taiwan TWSE Screener · 台灣證交所選股 (`nexgendata/twse-stock-screener`) Actor

TWSE + TPEx Taiwan stock screener API — live quotes, market cap (TWD), P/E, P/B, dividend yield, ROE, sector. TSMC, MediaTek, Hon Hai universe. Bloomberg Terminal / FactSet / Refinitiv Eikon alternative. For hedge funds, quant analysts, semiconductor researchers. Pay-per-result.

- **URL**: https://apify.com/nexgendata/twse-stock-screener.md
- **Developed by:** [Stephan Corbeil](https://apify.com/nexgendata) (community)
- **Categories:** Business, Automation, Developer tools
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, NaN bookmarks
- **User rating**: No ratings yet

## Pricing

from $250.00 / 1,000 twse stock records

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/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

## 🇹🇼 TWSE Stock Screener — Taiwan Market Quotes & Fundamentals

> Track every stock on the **Taiwan Stock Exchange (TWSE)** — daily prices, volume, market cap, P/E, P/B, dividend yield, industry classification — sourced directly from the official TWSE OpenAPI. The Bloomberg Terminal alternative for Taiwanese equities, priced for indie quants and Asia-focused funds.

Taiwan is one of the most strategically important equity markets on earth — home to TSMC (the most valuable semiconductor company in the world), MediaTek, Foxconn (Hon Hai), and the entire global supply chain for advanced-node chips. And yet outside of Taiwan it remains one of the most under-instrumented major markets on the open web. Yahoo Finance has spotty TWSE coverage and lags badly on Taiwan-specific signals. Refinitiv and Bloomberg charge $20K+/year. The TWSE's own paid feed is mainly aimed at institutional brokers. This actor is built for the rest of us — solo traders, quant researchers, fintech builders, Asia hedge-fund analysts, and anyone running market-neutral or factor strategies that need genuine Taiwan coverage.

The data comes straight from `openapi.twse.com.tw` — Taiwan Stock Exchange's free, public, no-auth-required JSON OpenAPI. We merge three endpoints (daily price action, valuation ratios, and the static company-info table including industry codes) into a single clean record per ticker.

### 🎯 What you get per stock

Every record returned includes:

| Field | Description |
|---|---|
| `symbol` | 4-digit TWSE ticker (e.g. `2330` for TSMC, `2317` for Foxconn) |
| `name` | Short Chinese name (e.g. `台積電`, `鴻海`) |
| `company_name_zh` | Full registered Chinese company name |
| `name_short_zh` | TWSE short name (公司簡稱) |
| `market` | Always `TWSE` (this actor focuses on the main board) |
| `trade_date` | ISO date of the price snapshot |
| `price_twd` | Closing price in New Taiwan Dollars |
| `open_twd` / `high_twd` / `low_twd` | Day's OHLC |
| `change_twd` | Today's price change (signed) |
| `pct_change` | Today's percentage change (signed, 4 decimals) |
| `volume_shares` | Today's share volume |
| `trade_value_twd` | Today's TWD-denominated trade value (price × volume) |
| `transactions` | Number of distinct trades executed |
| `pe_ratio` | Trailing Price-to-Earnings ratio |
| `pb_ratio` | Price-to-Book ratio |
| `dividend_yield_pct` | Trailing dividend yield (%) |
| `dividend_year_ad` | The fiscal year of the dividend (Western calendar) |
| `fiscal_year_quarter` | Most recent reported quarter (e.g. `2025Q4`) |
| `industry_code` | TWSE industry-classification code (`24` = Semiconductor, `17` = Finance) |
| `industry_name_en` | English label for the industry code |
| `shares_outstanding` | Estimated from paid-in capital ÷ par value (10 TWD) |
| `paid_in_capital_twd` | Paid-in capital in TWD (from the company-info table) |
| `market_cap_twd` | Synthetic market cap (shares × close price) |
| `chairman` / `ceo` / `spokesperson` | Officer names from MOPS company filing |
| `phone` / `address` | HQ contact info |
| `established_date` / `listing_date` | ISO dates from MOPS |
| `twse_url` | Direct link to the company's MOPS filings page |
| `scraped_at` | UTC timestamp of the scrape |

### 🚀 Quick start

```python
from apify_client import ApifyClient

client = ApifyClient("YOUR_APIFY_TOKEN")
run = client.actor("nexgendata/twse-stock-screener").call(run_input={
    "limit": 200,
    "min_trade_value_twd": 100_000_000,  ## 1億 TWD/day liquidity floor
    "min_dividend_yield": 4.0,            ## high-yield Taiwan classics
})

for stock in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(f"{stock['symbol']:<6} {stock['name']:<10} "
          f"NT${stock['price_twd']:>8,.2f}  "
          f"P/E {stock['pe_ratio']:>6}  "
          f"Yield {stock['dividend_yield_pct']:>5}%  "
          f"{stock['industry_name_en']}")
````

Sample output:

```
2330   台積電      NT$1,090.00  P/E   24.5  Yield  1.84%  Semiconductor
2317   鴻海        NT$  205.50  P/E   13.7  Yield  2.45%  Other Electronics
2454   聯發科      NT$1,415.00  P/E   22.1  Yield  4.91%  Semiconductor
2882   國泰金      NT$   72.40  P/E   10.2  Yield  4.83%  Finance & Insurance
2412   中華電      NT$  126.50  P/E   24.1  Yield  3.95%  Communications & Internet
...
```

### 🌐 cURL

```bash
curl -X POST "https://api.apify.com/v2/acts/nexgendata~twse-stock-screener/run-sync-get-dataset-items?token=YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"limit":50,"sector":"半導體"}'
```

### 📊 Real-world use cases

- **Semiconductor supply-chain analysis** — Taiwan hosts the entire global advanced-node fab capacity. Pull `industry_code: "24"` (Semiconductor) plus `"28"` (Electronic Parts/Components) to map the TSMC, MediaTek, ASE, Win Semi, Powerchip, Vanguard, UMC value chain in one query.
- **Quant research** — pull the full TWSE universe nightly, build factor models on P/E, P/B, dividend yield, and price momentum without paying a six-figure data subscription.
- **High-dividend Taiwan strategy** — Taiwan is famous for 5–8% sustainable dividend yields among large-caps. Set `min_dividend_yield: 5.0` and screen the ETF-tier names (Cathay Financial, Chunghwa Telecom, Yuanta FHC, Taiwan Cement, etc.).
- **Asia macro dashboards** — track which TWSE sectors are rallying on TWD strength/weakness; Taiwan is one of the cleanest barometers of global tech demand.
- **Taiwan-versus-Korea comparisons** — pair this actor with the [KOSPI Stock Screener](https://apify.com/nexgendata/kospi-stock-screener?fpr=2ayu9b) to build cross-market relative-value screens (e.g. TSMC vs Samsung Electronics, MediaTek vs SK Hynix).
- **Taiwan-versus-China relative value** — pair with [Eastmoney China Stock Screener](https://apify.com/nexgendata/eastmoney-china-stock-screener?fpr=2ayu9b) to compare A-share semis (SMIC, Hua Hong) against Taiwan-listed equivalents.
- **ETF construction** — define your own TW50 or High-Dividend-30 alternative by filtering on minimum trade value and rebalancing weekly.
- **Hedge-fund daily refresh** — schedule via the Apify scheduler at the post-close (13:30 TWT = 05:30 UTC) and pipe the dataset into your warehouse.
- **Fintech app data layers** — power a Taiwan-equity widget for your robo-advisor, trading-journal app, or portfolio tracker. The `chairman`/`ceo` fields make great enrichment for company-detail screens.
- **Academic finance research** — Taiwan retail-investor behavior is heavily studied (Barber, Lee, Liu, Odean's foundational papers all use TWSE data); this actor gives reproducible market snapshots without scraping headaches.
- **News + sentiment overlays** — join with company-name lookups to attribute Chinese-language news flow back to ticker IDs.
- **Geopolitical risk monitoring** — when cross-strait tensions move, Taiwan equities reprice within minutes. Schedule this actor hourly during volatile windows for a clean snapshot of which sectors are absorbing the shock.

### ⚙️ Input parameters

| Param | Type | Default | Notes |
|---|---|---|---|
| `limit` | int | `200` | Max stocks returned, sorted by trade value desc (1–2000) |
| `min_trade_value_twd` | int | `0` | Liquidity floor in TWD daily trade value |
| `min_volume` | int | `0` | Filter to stocks with daily volume above this |
| `max_pe_ratio` | number | `0` | Value screen — max P/E (0 disables) |
| `min_dividend_yield` | number | `0` | Income screen — min trailing yield % |
| `sector` | string | `""` | Substring match on industry name/code or company name (Chinese or English) |
| `include_etfs` | bool | `false` | Include 0050-style ETFs and warrants alongside common stocks |
| `proxyConfiguration` | object | datacenter | Apify proxy config |

#### Examples

**Top 10 by liquidity** (fast smoke test):

```json
{ "limit": 10 }
```

**Taiwan semiconductor universe**:

```json
{ "limit": 100, "sector": "半導體" }
```

Or in English:

```json
{ "limit": 100, "sector": "semiconductor" }
```

**High-dividend Taiwan classics**:

```json
{ "limit": 50, "min_dividend_yield": 5.0, "min_trade_value_twd": 100000000 }
```

**Deep-value screen**:

```json
{ "limit": 100, "max_pe_ratio": 12, "min_trade_value_twd": 50000000 }
```

**Full TWSE universe including ETFs**:

```json
{ "limit": 2000, "include_etfs": true }
```

### 💰 Pricing

This actor uses **pay-per-event** pricing — you only pay for what you actually pull.

- **Actor start:** $0.005 per run
- **Stock record:** $0.02 per stock returned

So a typical 200-stock screen costs roughly **$4.00**. The full TWSE common-stock universe (~1,000 names) is about **$20.00** — a one-time payment for what would otherwise be a Refinitiv subscription seat. Compare to:

- Bloomberg Terminal — $24,000/year minimum
- Refinitiv (LSEG) Eikon — $22,000+/year
- TWSE direct paid feed — institutional contract minimums, brokerage relationships required

This actor pays for itself the first time you'd otherwise have spun up a Taiwan-resident brokerage account just for the data.

### 🔬 Data sources & methodology

We merge **three TWSE OpenAPI endpoints**:

1. `exchangeReport/STOCK_DAY_ALL` — daily OHLC, volume, transaction count for every TWSE-listed security (~1,350 records including ETFs and warrants).
2. `exchangeReport/BWIBBU_d` — daily P/E ratio, P/B ratio, and trailing dividend yield for common stocks (~1,070 records).
3. `opendata/t187ap03_L` — the static company-info table — industry classification (產業別), full company name, paid-in capital, chairman, listing date, MOPS contact info (~1,080 records).

The merge happens in-memory on a single Code/公司代號 join. Market cap is synthesized as `paid_in_capital ÷ par_value × close_price` (par value is 10 TWD by Taiwan convention). This is approximate but close to the official market cap reported on MOPS and the Goodinfo screener — the deviation comes from preferred shares and convertible securities, which are typically <2% of total share count for liquid TWSE names.

The TWSE OpenAPI does not require authentication, has no published rate limit (we throttle politely anyway), and is updated each trading day after the 13:30 TWT close. Weekends and Taiwanese public holidays will return the most recent trading day's snapshot.

### 🤔 FAQ

**Q: Is the data real-time?**
The TWSE OpenAPI is end-of-day, refreshed after each 13:30 TWT (05:30 UTC) market close. Pre-market and intra-day snapshots are not available through this endpoint. For sub-second tick data you need a paid TWSE licensee or a Taiwan brokerage account.

**Q: What about TPEx / 櫃買中心 (Taipei Exchange OTC stocks)?**
This actor covers the main TWSE board only — that's where the bulk of liquidity and the largest companies (TSMC, Foxconn, MediaTek, etc.) trade. TPEx coverage is on the roadmap. File an issue on the actor page if you need it sooner.

**Q: Why is `pe_ratio` empty for some stocks?**
Loss-making companies have no meaningful P/E (denominator is zero or negative). The TWSE BWIBBU endpoint returns an empty string in those cases, which we propagate as `null`. ETFs also have no P/E since they're funds, not operating companies.

**Q: My CSV has Chinese characters that look like garbage.**
Save the file as UTF-8 with BOM and open in Excel via Data → From Text/CSV. Or use `pandas.read_csv(..., encoding='utf-8-sig')` in Python.

**Q: How do I match Chinese names to English company labels?**
Most major TWSE names map cleanly: `台積電` = TSMC, `鴻海` = Hon Hai (Foxconn), `聯發科` = MediaTek, `國泰金` = Cathay Financial Holding, `中華電` = Chunghwa Telecom, `富邦金` = Fubon Financial Holding, `台達電` = Delta Electronics, `日月光` = ASE Technology Holding. For systematic mapping, query the TWSE ISIN service or use the Yahoo Finance `.TW` suffix.

**Q: Can I use this commercially?**
The data comes from the TWSE's official public OpenAPI, which the Taiwan Stock Exchange itself publishes for public consumption. You own the output dataset. For redistribution as a paid product or syndication, consult TWSE's Open Data terms and consider a direct data licensing arrangement.

**Q: How does this differ from the Eastmoney China actor?**
Different markets, different data sources. Eastmoney covers Shanghai (SSE) and Shenzhen (SZSE) A-shares scraped from East Money Network. This actor covers Taiwan-listed (TWSE) stocks via the official TWSE OpenAPI. Use both together for a complete Greater China equity view.

**Q: Is this maintained?**
Yes — NexGenData maintains 170+ Apify actors and ships fixes within 24 hours of bug reports. File issues via the Apify console's Issues tab on this actor's page.

**Q: Why pay for this when I could call the TWSE OpenAPI myself?**
You could! But you'd spend a weekend dealing with three separate endpoints with inconsistent date formats (ROC vs Western calendar), undocumented column meanings (產業別 codes), the merge logic across three tables, the par-value-based market-cap reconstruction, ETF/warrant filtering rules, and figuring out why some stocks have empty P/Es. Or you can pay $4 per 200-stock run and get clean JSON in 10 seconds.

### 🔗 Related NexGenData actors

- [🇰🇷 KOSPI Stock Screener](https://apify.com/nexgendata/kospi-stock-screener?fpr=2ayu9b) — same proven pattern, for Korean equities (KOSPI + KOSDAQ)
- [🇨🇳 Eastmoney China Stock Screener](https://apify.com/nexgendata/eastmoney-china-stock-screener?fpr=2ayu9b) — Shanghai/Shenzhen/ChiNext/STAR Market A-shares
- [📈 Finviz Stock Screener](https://apify.com/nexgendata/finviz-stock-screener?fpr=2ayu9b) — US equities with 70+ filters
- [💹 Finance MCP Server](https://apify.com/nexgendata/finance-mcp-server?fpr=2ayu9b) — unified Claude/ChatGPT-tool wrapper for the full NexGenData finance fleet
- [📊 Yahoo Finance Scraper](https://apify.com/nexgendata/yahoo-finance-scraper?fpr=2ayu9b) — historical OHLCV, statistics, options chain (works with `.TW`-suffixed Taiwan tickers)

### 📚 More from NexGenData

Visit **[thenextgennexus.com](https://thenextgennexus.com)** for:

- 📝 Tutorials on web scraping, data extraction, and AI workflows
- 🧰 The full catalog of 170+ actors, REST APIs, and MCP servers
- 📦 Ready-made data packs on Gumroad
- 📨 The NexGenData newsletter

### 🚀 Apify affiliate program

New to Apify? Sign up with our [referral link](https://apify.com/nexgendata?fpr=2ayu9b) — you get free platform credits on signup, and you help fund the maintenance of this actor fleet.

***

*Built and maintained by [NexGenData](https://apify.com/nexgendata?fpr=2ayu9b) — 170+ actors covering scraping, enrichment, MCP servers, and automation. Home: [thenextgennexus.com](https://thenextgennexus.com).*

# Actor input Schema

## `limit` (type: `integer`):

Maximum number of TWSE-listed stocks to return. The Taiwan Stock Exchange has roughly 1,000 listed companies plus ~350 ETFs/warrants. Use 10 for a smoke test, 200 for the large-cap universe, or 2000 to pull everything. Records are returned sorted by trading value (a liquidity-weighted proxy for market cap) descending.

## `min_trade_value_twd` (type: `integer`):

Filter to stocks with daily trade value (price × volume in TWD) above this threshold. Useful for excluding illiquid names. Examples: 100000000 = 1億 TWD/day (mid-large cap), 1000000000 = 10億 TWD/day (TSMC tier). Leave at 0 for no filter.

## `min_volume` (type: `integer`):

Filter to stocks with daily share volume above this threshold. Useful for excluding stocks that didn't trade. Examples: 1000 = at least 1 board lot of activity, 1000000 = 1M shares (active names). Leave at 0 for no filter.

## `max_pe_ratio` (type: `number`):

Filter to stocks with P/E ratio at or below this value (value-investor screen). Examples: 15 = classic Graham value, 25 = GARP. Stocks with no reported P/E (e.g. loss-making) are excluded when this filter is set. Leave at 0 to disable.

## `min_dividend_yield` (type: `number`):

Filter to stocks with trailing dividend yield at or above this value (in percent). Taiwan is famous for its high-dividend equity culture — many large-caps yield 4-7%. Examples: 4 = solid income, 6 = top-decile high-yielder. Leave at 0 for no filter.

## `sector` (type: `string`):

Optional case-insensitive substring filter applied to the TWSE industry classification name and the company name. Examples: '半導體' (semiconductor), 'electronic', '金融' (finance), '生技' (biotech), 'TSMC'. Leave blank for no filter. Industry data is fetched automatically from the TWSE company-info endpoint.

## `include_etfs` (type: `boolean`):

If true, return ETF tickers (4-digit codes starting with 00, e.g. 0050 元大台灣50, 0056 元大高股息) and warrants alongside common stocks. If false, only return ordinary common-stock listings (4-digit codes 1xxx-9xxx). Default false to keep the universe focused on operating companies.

## `proxyConfiguration` (type: `object`):

Apify proxy configuration. The TWSE OpenAPI endpoints are public and global, so the datacenter proxy default works fine. Switch to RESIDENTIAL only if you hit rate limits.

## Actor input object example

```json
{
  "limit": 200,
  "min_trade_value_twd": 0,
  "min_volume": 0,
  "max_pe_ratio": 0,
  "min_dividend_yield": 0,
  "include_etfs": false,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# 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 = {
    "limit": 200,
    "min_trade_value_twd": 0,
    "min_volume": 0,
    "max_pe_ratio": 0,
    "min_dividend_yield": 0,
    "sector": "",
    "include_etfs": false,
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("nexgendata/twse-stock-screener").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 = {
    "limit": 200,
    "min_trade_value_twd": 0,
    "min_volume": 0,
    "max_pe_ratio": 0,
    "min_dividend_yield": 0,
    "sector": "",
    "include_etfs": False,
    "proxyConfiguration": { "useApifyProxy": True },
}

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

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

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

```

## CLI example

```bash
echo '{
  "limit": 200,
  "min_trade_value_twd": 0,
  "min_volume": 0,
  "max_pe_ratio": 0,
  "min_dividend_yield": 0,
  "sector": "",
  "include_etfs": false,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call nexgendata/twse-stock-screener --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=nexgendata/twse-stock-screener",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "🇹🇼 Taiwan TWSE Screener · 台灣證交所選股",
        "description": "TWSE + TPEx Taiwan stock screener API — live quotes, market cap (TWD), P/E, P/B, dividend yield, ROE, sector. TSMC, MediaTek, Hon Hai universe. Bloomberg Terminal / FactSet / Refinitiv Eikon alternative. For hedge funds, quant analysts, semiconductor researchers. Pay-per-result.",
        "version": "0.0",
        "x-build-id": "PoseRp8788aMXj5iP"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/nexgendata~twse-stock-screener/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-nexgendata-twse-stock-screener",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/nexgendata~twse-stock-screener/runs": {
            "post": {
                "operationId": "runs-sync-nexgendata-twse-stock-screener",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/nexgendata~twse-stock-screener/run-sync": {
            "post": {
                "operationId": "run-sync-nexgendata-twse-stock-screener",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "properties": {
                    "limit": {
                        "title": "Limit",
                        "minimum": 1,
                        "maximum": 2000,
                        "type": "integer",
                        "description": "Maximum number of TWSE-listed stocks to return. The Taiwan Stock Exchange has roughly 1,000 listed companies plus ~350 ETFs/warrants. Use 10 for a smoke test, 200 for the large-cap universe, or 2000 to pull everything. Records are returned sorted by trading value (a liquidity-weighted proxy for market cap) descending.",
                        "default": 200
                    },
                    "min_trade_value_twd": {
                        "title": "Min daily trade value (TWD)",
                        "minimum": 0,
                        "maximum": 1000000000000,
                        "type": "integer",
                        "description": "Filter to stocks with daily trade value (price × volume in TWD) above this threshold. Useful for excluding illiquid names. Examples: 100000000 = 1億 TWD/day (mid-large cap), 1000000000 = 10億 TWD/day (TSMC tier). Leave at 0 for no filter.",
                        "default": 0
                    },
                    "min_volume": {
                        "title": "Min daily volume (shares)",
                        "minimum": 0,
                        "maximum": 10000000000,
                        "type": "integer",
                        "description": "Filter to stocks with daily share volume above this threshold. Useful for excluding stocks that didn't trade. Examples: 1000 = at least 1 board lot of activity, 1000000 = 1M shares (active names). Leave at 0 for no filter.",
                        "default": 0
                    },
                    "max_pe_ratio": {
                        "title": "Max P/E ratio",
                        "minimum": 0,
                        "maximum": 1000,
                        "type": "number",
                        "description": "Filter to stocks with P/E ratio at or below this value (value-investor screen). Examples: 15 = classic Graham value, 25 = GARP. Stocks with no reported P/E (e.g. loss-making) are excluded when this filter is set. Leave at 0 to disable.",
                        "default": 0
                    },
                    "min_dividend_yield": {
                        "title": "Min dividend yield (%)",
                        "minimum": 0,
                        "maximum": 100,
                        "type": "number",
                        "description": "Filter to stocks with trailing dividend yield at or above this value (in percent). Taiwan is famous for its high-dividend equity culture — many large-caps yield 4-7%. Examples: 4 = solid income, 6 = top-decile high-yielder. Leave at 0 for no filter.",
                        "default": 0
                    },
                    "sector": {
                        "title": "Sector / industry / name keyword",
                        "type": "string",
                        "description": "Optional case-insensitive substring filter applied to the TWSE industry classification name and the company name. Examples: '半導體' (semiconductor), 'electronic', '金融' (finance), '生技' (biotech), 'TSMC'. Leave blank for no filter. Industry data is fetched automatically from the TWSE company-info endpoint."
                    },
                    "include_etfs": {
                        "title": "Include ETFs and warrants",
                        "type": "boolean",
                        "description": "If true, return ETF tickers (4-digit codes starting with 00, e.g. 0050 元大台灣50, 0056 元大高股息) and warrants alongside common stocks. If false, only return ordinary common-stock listings (4-digit codes 1xxx-9xxx). Default false to keep the universe focused on operating companies.",
                        "default": false
                    },
                    "proxyConfiguration": {
                        "title": "Proxy configuration",
                        "type": "object",
                        "description": "Apify proxy configuration. The TWSE OpenAPI endpoints are public and global, so the datacenter proxy default works fine. Switch to RESIDENTIAL only if you hit rate limits.",
                        "default": {
                            "useApifyProxy": true
                        }
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
