# 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:** 4 total users, 2 monthly users, 100.0% runs succeeded, NaN 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 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

## 🇸🇬 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

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "SGX (Singapore Exchange) Scraper — Stocks, ETFs, REITs, Bonds",
        "description": "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.",
        "version": "0.1",
        "x-build-id": "bGFyN33t7TGrKHbPe"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/alwaysprimedev~sgx-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-alwaysprimedev-sgx-scraper",
                "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/alwaysprimedev~sgx-scraper/runs": {
            "post": {
                "operationId": "runs-sync-alwaysprimedev-sgx-scraper",
                "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/alwaysprimedev~sgx-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-alwaysprimedev-sgx-scraper",
                "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": {
                    "assetType": {
                        "title": "Asset class",
                        "enum": [
                            "equities",
                            "stocks",
                            "etfs",
                            "reits",
                            "businesstrusts",
                            "adrs",
                            "bonds",
                            "warrants",
                            "dlcertificates",
                            "all"
                        ],
                        "type": "string",
                        "description": "Which class of SGX-listed securities to scrape. 'equities' covers stocks, ETFs, REITs, business trusts and ADRs in one run — the most common choice.",
                        "default": "equities"
                    },
                    "stockCodes": {
                        "title": "Stock-code filter (optional)",
                        "type": "array",
                        "description": "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.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "maxItems": {
                        "title": "Maximum number of records",
                        "minimum": 0,
                        "type": "integer",
                        "description": "Stop after this many records. Use 0 for the full universe (~600 stocks, or up to ~1300 across all equity classes)."
                    },
                    "includeCorporateInfo": {
                        "title": "Include corporate profile",
                        "type": "boolean",
                        "description": "Joins each security with the issuer's corporate profile (country, listing date, registered office, company background). One extra fast API call.",
                        "default": true
                    },
                    "includeReferenceData": {
                        "title": "Include reference data (ISIN, CPF, sustainability flags)",
                        "type": "boolean",
                        "description": "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.",
                        "default": 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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
