# SGX (Singapore Exchange) Scraper — Stocks, ETFs, REITs, Bonds (`alwaysprimedev/sgx-scraper`) Actor

Pull every security listed on the Singapore Exchange — stocks, ETFs, REITs, business trusts, bonds, warrants — with live delayed prices, ISIN codes, CPF-eligibility flags, and full corporate profiles.

- **URL**: https://apify.com/alwaysprimedev/sgx-scraper.md
- **Developed by:** [Always Prime](https://apify.com/alwaysprimedev) (community)
- **Categories:** Lead generation, SEO tools, Automation
- **Stats:** 6 total users, 1 monthly users, 88.2% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $4.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.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — 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

## 🇸🇬 SGX Scraper — Singapore Exchange data, structured

[![Built for Apify](https://img.shields.io/badge/Built%20for-Apify-1B59F8)](https://apify.com)
[![Python](https://img.shields.io/badge/Python-3.11-3776AB?logo=python\&logoColor=white)](https://python.org)
[![Output](https://img.shields.io/badge/Output-JSON%20%7C%20CSV%20%7C%20Excel-22c55e)](#-output)

> **Every security listed on the Singapore Exchange — stocks, ETFs, REITs, business trusts, bonds, warrants — with live delayed prices, ISIN codes, CPF-eligibility flags, and full corporate profiles. One run. ~45 fields per row. Under a minute.**

⚡️ One run scrapes the **entire SGX universe** (~1,300 equities or up to 18k instruments if you ask for everything).
📦 Clean, flat records: `last_price`, `change_pct`, `bid`, `ask`, `volume`, `isin_code`, `cpf_eligible`, `company_name`, `country`, `listed_date`, `registered_office`, `background`, and 30+ more.
🚀 Sub-3-second runs for typical filters. No proxy. No anti-bot tax. No headaches.
💰 Pay-per-result — only pay for the rows you keep.

***

### 🤖 What it does

This actor pulls structured data from `www.sgx.com` covering every tradable Singapore-listed security:

- **Live delayed prices** — last, open, high, low, previous close, change, change %, volume, value traded, bid / bid-volume, ask / ask-volume, VWAP, trading time.
- **Identifiers** — SGX stock code, IBM code, **ISIN**, FISN.
- **Classification** — asset class (stock / ETF / REIT / business trust / ADR / bond / warrant / DLC), market segment (**Mainboard / Catalist**), trading currency, board lot.
- **Regulatory flags** — CPF Investment Scheme eligibility, Specified Investment Product (SIP) flag, sustainability-linked flag, leveraged-product flag, retail/SGS bond flag.
- **Corporate profile** — full company name, country of incorporation, ISO country code, incorporation date, listing date, web address, registered office, **company background**, Chinese name.

Each security comes back as a single flat JSON row. Ready for a spreadsheet, a database, or a downstream model.

***

### 🚀 Quick start

1. Click **Try for free** at the top of this page.
2. Pick an **Asset class** (default: `equities` — covers stocks, ETFs, REITs, business trusts, ADRs in one go) and optionally enter specific **stock codes** (e.g. `Z74`, `D05`, `C6L`).
3. Hit **Start**.
4. When the run finishes, click **Export** → choose JSON, CSV, Excel, or Apify dataset URL.

No API keys, no proxies, no setup. Runs from your free Apify account.

***

### 🎛️ Input

| Field | Type | Default | Description |
|---|---|---|---|
| `assetType` | enum | `equities` | Pick one: `equities` · `stocks` · `etfs` · `reits` · `businesstrusts` · `adrs` · `bonds` · `warrants` · `dlcertificates` · `all`. |
| `stockCodes` | list of strings | `[]` | Filter to specific 3-character SGX codes (e.g. `["Z74","D05","C6L"]`). Empty = no filter. |
| `maxItems` | integer | `50` | Stop after N records. `0` = scrape the whole universe in the selected asset class. |
| `includeCorporateInfo` | boolean | `true` | Join with company profile (country, listing date, background, registered office). |
| `includeReferenceData` | boolean | `true` | Join with ISIN / FISN / CPF / sustainability / Chinese name. |

***

### 📤 Output (example row — SingTel)

```json
{
  "url": "https://www.sgx.com/securities/equities/Z74",
  "id": "Z74",
  "stock_code": "Z74",
  "ibm_code": "1T75",
  "isin_code": "SG1T75931496",
  "fisn": "SINGTEL/ORDSHS",
  "name": "Singtel",
  "chinese_name": "新电信",
  "issuer_name": "Singtel",
  "company_name": "SINGTEL",
  "asset_type": "stocks",
  "asset_type_label": "Stock",
  "market": "MAINBOARD",
  "trading_currency": "SGD",
  "denomination_currency": "SGD",
  "board_lot": 100,
  "cpf_eligible": true,
  "sip": false,
  "last_price": 4.82,
  "open": 4.84,
  "high": 4.87,
  "low": 4.75,
  "previous_close": 4.87,
  "change": -0.05,
  "change_pct": -1.027,
  "volume": 169817178,
  "value_traded": 35306.4,
  "bid": 4.81,
  "bid_volume": 158.1,
  "ask": 4.82,
  "ask_volume": 230,
  "trading_time": "2026-05-15T01:16:00+00:00",
  "prev_trade_date": "2026-05-14",
  "country": "SINGAPORE",
  "country_code": "SGP",
  "incorporated_on": "1992-03-28",
  "listed_date": "1 November 1993 on SGX Mainboard",
  "web_address": "http://www.singtel.com",
  "registered_office": "10 Eunos Road 8, #07-31 Singapore Post Centre, Singapore 408600",
  "background": "Singapore Telecommunications Limited (Singtel) was corporatised on 1 April 1992 and listed on the local stock exchange in November 1993. It is majority-owned by Temasek Holdings (Private) Limited...",
  "source": "api.sgx.com",
  "scraped_at": "2026-05-15T09:28:11.123456+00:00"
}
```

Available as **JSON · CSV · Excel** via the standard Apify dataset endpoints.

***

### 💡 Use cases

| You are a... | You use this scraper to... |
|---|---|
| 🏦 **Fund / asset manager** | Build a fresh investable universe for Singapore daily. Filter by Mainboard + CPF-eligible + Sustainability-linked in one query. |
| 📊 **Quant / data team** | Snapshot the SGX universe end-of-day for backtests. The ISIN + FISN make joining to global pricing feeds painless. |
| 🤖 **Fintech / brokerage** | Power a stock-picker or watchlist UI without paying SGX's data-vendor minimums. |
| 🧠 **AI / LLM team** | Feed a finance copilot or research assistant with current SGX listings, sectors, and company backgrounds. |
| 🌱 **ESG analyst** | Pull every sustainability-linked listing on SGX with `sustainability_linked: true`. |
| 🎓 **Student / researcher** | Free, clean dataset for a Singapore-markets paper or thesis. |

***

### 🧮 Tips & tricks

- **Default to `equities` + `maxItems: 0`** to get the full ~1,300-row investable universe in one shot.
- **`maxItems: 50`** is a cheap sample run while you iterate on your downstream code.
- **Filter by `stockCodes`** if you just want a handful of names — much cheaper than scraping the universe and filtering downstream.
- The `_suspicious` flag (rare) means a record's currency or market segment disagreed across SGX's own internal feeds. Most users can ignore it.
- `bond_clean_price` / `bond_dirty_price` / `bond_accrued_interest` are populated only for bonds.
- For ETFs, `benchmark`, `management_style` and `geographical_focus` tell you what the fund actually tracks.

***

### ❓ FAQ

**Are the prices real-time?** No — they are **delayed** (~15 min), the same delayed feed published on the public SGX website.

**Why is `open / high / low` zero on some records?** Outside market hours (or pre-open), SGX publishes zero for intraday fields. Off-hours runs typically return `last_price = previous_close`.

**Where does this data come from?** From `www.sgx.com`'s own public website, the same data any visitor to SGX sees in their browser.

**How fresh is the corporate profile?** It refreshes whenever SGX republishes its corporate-information feed — typically daily.

**Can I run this on a schedule?** Yes — set up a [scheduled run on Apify](https://docs.apify.com/platform/schedules) (e.g. daily at 17:30 SGT, after market close, for an end-of-day snapshot).

**Does this include derivatives / futures / options?** Cash-market and exchange-traded derivatives that are tradable as line items (warrants, DLCs, structured certificates) are included. OTC and futures-board contracts are not.

***

### 📜 Disclaimer

Data is sourced from publicly accessible pages on `www.sgx.com`. This actor is not affiliated with, endorsed by, or sponsored by Singapore Exchange Limited. SGX is a trademark of Singapore Exchange Limited. Prices are delayed and provided for informational use only — they are not investment advice and should not be used for trading decisions.

# Actor input Schema

## `assetType` (type: `string`):

Which class of SGX-listed securities to scrape. 'equities' covers stocks, ETFs, REITs, business trusts and ADRs in one run — the most common choice.

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

Three-character SGX stock codes (also called counters / tickers) to keep — e.g. Z74 (SingTel), D05 (DBS), C6L (SIA). Leave empty to scrape every security in the selected asset class.

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

Stop after this many records. Use 0 for the full universe (~600 stocks, or up to ~1300 across all equity classes).

## `includeCorporateInfo` (type: `boolean`):

Joins each security with the issuer's corporate profile (country, listing date, registered office, company background). One extra fast API call.

## `includeReferenceData` (type: `boolean`):

Joins each security with reference metadata: ISIN code, FISN, CPF Investment Scheme eligibility, SIP, sustainability-linked flag, Chinese name, geographic focus. Adds one API call.

## Actor input object example

```json
{
  "assetType": "equities",
  "stockCodes": [],
  "maxItems": 50,
  "includeCorporateInfo": true,
  "includeReferenceData": true
}
```

# Actor output Schema

## `listings` (type: `string`):

Every scraped security as JSON.

## `listingsCsv` (type: `string`):

Spreadsheet-ready CSV.

## `listingsXlsx` (type: `string`):

Excel workbook with every security as a row.

## `consoleView` (type: `string`):

Browse the dataset in the Apify Console.

# 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 = {
    "stockCodes": [],
    "maxItems": 50
};

// Run the Actor and wait for it to finish
const run = await client.actor("alwaysprimedev/sgx-scraper").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 = {
    "stockCodes": [],
    "maxItems": 50,
}

# Run the Actor and wait for it to finish
run = client.actor("alwaysprimedev/sgx-scraper").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 '{
  "stockCodes": [],
  "maxItems": 50
}' |
apify call alwaysprimedev/sgx-scraper --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

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