# China Stock Security Search (`ddzzhen/china-stock-security-search`) Actor

Search English-first static master data for current and delisted mainland-listed securities. The current release covers A shares.

- **URL**: https://apify.com/ddzzhen/china-stock-security-search.md
- **Developed by:** [Dazhi Du](https://apify.com/ddzzhen) (community)
- **Categories:** Business, Automation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

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

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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/docs.md):

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

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python/docs.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/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

## China Stock Security Search

English-first master-data lookup for securities issued by mainland Chinese companies and traded on mainland exchanges. Search current and delisted A-shares by symbol or name, venue, share class, and lifecycle state.

The dataset is a static reference of securities identifiers, names, trading venues, and lifecycle facts. It does **not** include market prices, quotes, financial statements, announcements, or recommendations.

### How to run it

In Apify Console, open the **Input** tab, choose any filters, set **Maximum records**, and click **Start**. Leave all filters empty to browse the current release in stable identifier order. Results appear in the run's **Output** and **Dataset** tabs; the **Run summary** link reports counts, release version, truncation state, and notices.

For a synchronous API call, use an Apify API token belonging to the caller's Apify account:

```bash
curl --request POST \
  --header "Authorization: Bearer $APIFY_TOKEN" \
  --header "Content-Type: application/json" \
  --data '{"query_text":"601360","max_items":10}' \
  "https://api.apify.com/v2/acts/ddzzhen~china-stock-security-search/run-sync-get-dataset-items?clean=true&format=json"
````

The response is a JSON array of Dataset records. For scheduled or larger runs, start the Actor using Apify Console, API, CLI, Python client, or JavaScript client, then read the run's default Dataset. Users never need the private self-hosted API credential; it is configured only inside the Actor.

Example inputs:

```json
{"venue_mic":"XSHG","lifecycle_state":"active","max_items":100}
```

```json
{"query_text":"三六零","max_items":10}
```

### What it returns

Each output record is one security with allowlisted public fields, for example:

```json
{
  "contract_version": "1.0",
  "security_uid": "000e10c4-f1a7-54c9-a333-7a41453b1ddc",
  "issuer_uid": "7f981e2e-8b7b-544b-a0dc-7f303fac7f58",
  "display_symbol": "601360.XSHG",
  "local_symbol": "601360",
  "security_name_zh": "三六零",
  "security_name_en": "360 Security Technology Inc.",
  "venue_mic": "XSHG",
  "venue_label": "Shanghai Stock Exchange",
  "market_segment": null,
  "share_class": "a_share",
  "instrument_kind": "ordinary_equity",
  "trading_currency": "CNY",
  "lifecycle_state": "active",
  "first_trade_on": "2012-01-16",
  "final_trade_on": null,
  "mainland_h_share_flag": false,
  "record_refreshed_at": "2026-07-18T14:06:13.438220Z",
  "release_version": "rel-20260721-121622",
  "evidence_grade": "licensed_en"
}
```

The actor also writes an `OUTPUT` key-value record with a run summary (`contract_version`, `returned_items`, `api_pages`, `data_release_version`, `truncated_by_max_items`, `notices`).

### Contract and compatibility

This Actor implements ReidData Actor Contract `1.0`. `contract_version` identifies the stable input/output structure, while `release_version` identifies the underlying public data release. All public keys use `snake_case`. Additive compatible fields require a contract minor-version update; removals, renames, incompatible type changes, or behavior changes require a new major version.

### Input

| Field | Type | Default | Description |
| --- | --- | --- | --- |
| `query_text` | string | *none* | Security symbol or Chinese/English security-name text. |
| `venue_mic` | enum | *none* | Trading venue ISO 10383 MIC: `XSHG`, `XSHE`, or `XBEI`. |
| `share_class` | enum | *none* | `a_share`, `b_share`, or `h_share`. |
| `lifecycle_state` | enum | *none* | `active`, `suspended`, `delisted`, `pending`, or `unknown`. |
| `mainland_h_share_only` | boolean | `false` | Restrict to verified mainland-enterprise H-shares. |
| `max_items` | integer | `100` | Maximum records to return (1–5000). |
| `page_size` | integer | `100` | Self-hosted API page size (1–200). |

With no filters the actor returns the first `max_items` securities by stable identifier order.

### Current coverage

The current public release covers current and delisted A-shares. B-share and positively verified mainland-enterprise H-share records are deferred and are not claimed as current coverage; those share-class filters can return no records until a later release explicitly adds them.

### Provenance and quality

Every record carries an `evidence_grade` (`official_en`, `licensed_en`, `translated_reviewed`, `translated_unreviewed`, `missing`) and a `release_version`. Fields with no confirmed source remain `null` rather than being inferred. For informational and research use only.

# Actor input Schema

## `query_text` (type: `string`):

Security symbol or Chinese/English security-name text.

## `venue_mic` (type: `string`):

Restrict results to a mainland trading venue identified by its ISO 10383 MIC.

## `share_class` (type: `string`):

Restrict results to one supported equity share class.

## `lifecycle_state` (type: `string`):

Restrict results by the security's current listing lifecycle state.

## `mainland_h_share_only` (type: `boolean`):

Return only positively verified H shares issued by mainland Chinese enterprises.

## `max_items` (type: `integer`):

Maximum number of Dataset records produced by this run.

## `page_size` (type: `integer`):

Number of records requested per page from the self-hosted public API.

## Actor input object example

```json
{
  "query_text": "601360",
  "mainland_h_share_only": false,
  "max_items": 100,
  "page_size": 100
}
```

# Actor output Schema

## `records` (type: `string`):

Allowlisted security master-data records produced by the run.

## `run_summary` (type: `string`):

Counts, release version, truncation state, and public notices for the run.

# 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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("ddzzhen/china-stock-security-search").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 = {}

# Run the Actor and wait for it to finish
run = client.actor("ddzzhen/china-stock-security-search").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 '{}' |
apify call ddzzhen/china-stock-security-search --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "China Stock Security Search",
        "description": "Search English-first static master data for current and delisted mainland-listed securities. The current release covers A shares.",
        "version": "0.2",
        "x-build-id": "4rvR0YaSNL4BRT3CQ"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/ddzzhen~china-stock-security-search/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-ddzzhen-china-stock-security-search",
                "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/ddzzhen~china-stock-security-search/runs": {
            "post": {
                "operationId": "runs-sync-ddzzhen-china-stock-security-search",
                "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/ddzzhen~china-stock-security-search/run-sync": {
            "post": {
                "operationId": "run-sync-ddzzhen-china-stock-security-search",
                "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": {
                    "query_text": {
                        "title": "Search text",
                        "maxLength": 200,
                        "type": "string",
                        "description": "Security symbol or Chinese/English security-name text."
                    },
                    "venue_mic": {
                        "title": "Trading venue MIC",
                        "enum": [
                            "XSHG",
                            "XSHE",
                            "XBEI"
                        ],
                        "type": "string",
                        "description": "Restrict results to a mainland trading venue identified by its ISO 10383 MIC."
                    },
                    "share_class": {
                        "title": "Share class",
                        "enum": [
                            "a_share",
                            "b_share",
                            "h_share"
                        ],
                        "type": "string",
                        "description": "Restrict results to one supported equity share class."
                    },
                    "lifecycle_state": {
                        "title": "Lifecycle state",
                        "enum": [
                            "active",
                            "suspended",
                            "delisted",
                            "pending",
                            "unknown"
                        ],
                        "type": "string",
                        "description": "Restrict results by the security's current listing lifecycle state."
                    },
                    "mainland_h_share_only": {
                        "title": "Verified mainland H shares only",
                        "type": "boolean",
                        "description": "Return only positively verified H shares issued by mainland Chinese enterprises.",
                        "default": false
                    },
                    "max_items": {
                        "title": "Maximum records",
                        "minimum": 1,
                        "maximum": 5000,
                        "type": "integer",
                        "description": "Maximum number of Dataset records produced by this run.",
                        "default": 100
                    },
                    "page_size": {
                        "title": "API page size",
                        "minimum": 1,
                        "maximum": 200,
                        "type": "integer",
                        "description": "Number of records requested per page from the self-hosted public API.",
                        "default": 100
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
