# Hong Kong Listed Companies Dataset (Wikidata, CC0) (`tiezhengzhang/hk-listed-companies`) Actor

Hong Kong Stock Exchange listed companies from Wikidata (CC0): code, English/Chinese names, listing date, founding date, industry, website, with per-field provenance and licence attribution. Filter by listing date, industry or GEM.

- **URL**: https://apify.com/tiezhengzhang/hk-listed-companies.md
- **Developed by:** [tiezheng zhang](https://apify.com/tiezhengzhang) (community)
- **Categories:** Developer tools
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.50 / 1,000 results

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

## Hong Kong Listed Companies Dataset (Wikidata, CC0)

A clean, ready-to-export list of **companies listed on the Stock Exchange of Hong Kong**, built from open-licensed data you can reuse commercially.
Every field states where it came from. Missing values stay `null` and are never guessed.

**About 1,770 companies.** About 1,590 of them have a listing date, ranging from 1954 to 2026. Each record has:

- 5-digit stock code and `.HK` ticker;
- English and Chinese names;
- listing date and founding date;
- industry, in English plus a Chinese label;
- official website and Wikidata ID;
- a GEM flag, derived from the 08001–08999 code range.

### Why this dataset

- **Licence-clean.** Wikidata is CC0, so you can use it in products, spreadsheets, apps and AI pipelines without permission. The few curated fields quoted from Wikipedia are marked CC BY-SA 4.0, with the exact revision URL in `provenance`.
- **Provenance on every field:** `source`, `url`, `license`, `retrieved` and `note`.
- **Live or snapshot.** By default each run makes one polite SPARQL query to Wikidata, so you get the community's latest edits. If Wikidata is slow or down, the run falls back to a bundled snapshot. Choose *snapshot* for an instant run.

### Input

- **Mode:**
  - `list`: filter by `since` / `until` (YYYY, YYYY-MM or YYYY-MM-DD), `industry` (English or Chinese substring), `board` (`gem`) and `hasFields`, then sort newest or oldest.
  - `codes`: look up `stockCodes` such as `700`, `0700`, `00700` or `0700.HK`. Codes that are not found are listed in the OUTPUT record and are not charged.
  - `search`: name fragment (English or Chinese) or code.
- `maxItems` caps the results and the cost. `includeProvenance` (default on) adds provenance and attribution.

```json
{"mode": "list", "since": "2010-01-01", "industry": "retail", "maxItems": 200}
```

### Output example

```json
{"stockCode": "00700", "ticker": "0700.HK", "nameEn": "Tencent", "nameZh": "騰訊", "listingDate": "2004-06-16", "status": "listed",
 "board": null, "inception": "1998-11-12", "industry": "video game industry", "industryZh": "电子游戏产业", "website": "https://www.tencent.com/",
 "wikidataId": "Q860580", "wikidataUrl": "https://www.wikidata.org/wiki/Q860580", "pageUrl": "https://hk-ipo-calc.pages.dev/en/ipo/00700/",
 "offering": null, "provenance": {"listingDate": {"source": "Wikidata", "license": "CC0 1.0", "...": "..."}}, "attribution": [{"license": "CC0 1.0", "...": "..."}]}
```

Views: **Overview** and **Sources & licences**. Export as JSON, CSV, Excel or XML, or call the run from the Apify API or MCP.

### Pricing

Pay per result: **$0.50 per 1,000 companies** (one company = one dataset item), plus Apify's standard Actor start event ($0.00005 per run).
The full dataset of about 1,590 companies with listing dates costs about $0.80. Use `maxItems` or the run's maximum-cost setting to cap spend.

### What this is not

- **Not IPO terms.** Offer price, board lot, oversubscription, allotment results and sponsors are only present where a citable open source exists (currently a single company).
  HKEX and HKEXnews content may not be scraped or redistributed without HKEX's written permission, and this Actor does neither.
  To compute fees from terms you have, use the companion Actor **HK IPO Fee & Allotment Calculator**.
- Wikidata is community-maintained. Listing dates can be a day off, or can refer to a transfer of listing or a listing by introduction. Coverage of companies listed after 2021 is still sparse.
  Corrections made on Wikidata show up in the next live run.
- Not investment advice. Not affiliated with Hong Kong Exchanges and Clearing Limited.

Questions or bugs: use the Issues tab, or email ztz1024666@gmail.com.

# Actor input Schema

## `mode` (type: `string`):

What to return.

## `since` (type: `string`):

YYYY, YYYY-MM or YYYY-MM-DD (list mode).

## `until` (type: `string`):

YYYY, YYYY-MM or YYYY-MM-DD, inclusive (list mode).

## `industry` (type: `string`):

Substring of the Wikidata industry label, English or Chinese, e.g. 'bank', 'retail', '零售' (list mode).

## `board` (type: `string`):

Restrict to GEM codes (08001-08999) or return all boards.

## `hasFields` (type: `array`):

Keep only records where all these fields are present (list mode).

## `onlyWithListingDate` (type: `boolean`):

List mode: skip companies whose Wikidata entry has no HKEX listing start date.

## `sort` (type: `string`):

Order by listing date.

## `stockCodes` (type: `array`):

Codes mode, e.g. 700, 0700, 00700 or 0700.HK.

## `query` (type: `string`):

Search mode: English or Chinese name fragment, or a stock code.

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

Upper bound on results (and therefore cost).

## `includeProvenance` (type: `boolean`):

Adds source URL, licence, retrieval date and note for every field, plus an attribution block.

## `dataSource` (type: `string`):

Live runs one SPARQL query against Wikidata (a few seconds).

## Actor input object example

```json
{
  "mode": "list",
  "since": "2010-01-01",
  "board": "all",
  "onlyWithListingDate": true,
  "sort": "newest",
  "stockCodes": [
    "00700",
    "09988",
    "02097"
  ],
  "maxItems": 1000,
  "includeProvenance": true,
  "dataSource": "auto"
}
```

# Actor output Schema

## `companies` (type: `string`):

One item per company: stock code, ticker, English/Chinese names, listing date, founding date, industry, website, Wikidata ID, provenance and attribution.

## `summary` (type: `string`):

OUTPUT record: item count, data origin (live Wikidata or bundled snapshot), stock codes not found (not billed), attribution and disclaimer.

# 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 = {
    "since": "2010-01-01",
    "stockCodes": [
        "00700",
        "09988",
        "02097"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("tiezhengzhang/hk-listed-companies").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 = {
    "since": "2010-01-01",
    "stockCodes": [
        "00700",
        "09988",
        "02097",
    ],
}

# Run the Actor and wait for it to finish
run = client.actor("tiezhengzhang/hk-listed-companies").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 '{
  "since": "2010-01-01",
  "stockCodes": [
    "00700",
    "09988",
    "02097"
  ]
}' |
apify call tiezhengzhang/hk-listed-companies --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,tiezhengzhang/hk-listed-companies"
        }
    }
}
```

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/HPYdzA5GDmKrBRxfE/builds/gqQ2MoRmyNIgP0D8H/openapi.json
