Sources › Finance › IDX (Bursa Efek Indonesia) › Foreign Flow

IDX Foreign Flow API
Beli/jual investor asing per saham per hari bursa. Satuannya LEMBAR SAHAM, bukan rupiah. Bisa diurutkan berdasar net, buy, sell, atau kode.
Request
https://api.zapi.ink/v1/finance:idx/foreign-flowSend your key in the x-api-key header. The response is JSON in the { project, data, timestamp } envelope, and an identical request is served from cache for 1 minute.
Parameters
| Name | Type | In | Required | Description |
|---|---|---|---|---|
| date | string | query | No | Tanggal bursa (YYYYMMDD atau YYYY-MM-DD). Default: hari bursa terakhir Example: 2026-07-31 |
| code | string | query | No | Saring satu kode emiten saja (opsional) Example: BBCA |
| sort | enum: net | buy | sell | code | query | No | Urutan: net (asing beli bersih terbesar), buy, sell, atau code. Default net Example: net |
| length | number | query | No | Jumlah baris (default 50, maks 200) Example: 20 |
| start | number | query | No | Offset baris (default 0) Example: 0 |
Code examples
curl -X GET "https://api.zapi.ink/v1/finance:idx/foreign-flow?date=2026-07-31&code=BBCA&sort=net&length=20&start=0" \ -H "x-api-key: zpi_xxxxxxxxxxxxxxxxxxxxxxxx"
const res = await fetch("https://api.zapi.ink/v1/finance:idx/foreign-flow?date=2026-07-31&code=BBCA&sort=net&length=20&start=0", { method: "GET", headers: { "x-api-key": "zpi_xxxxxxxxxxxxxxxxxxxxxxxx" }, }); const data = await res.json(); console.log(data);
import requests res = requests.get( "https://api.zapi.ink/v1/finance:idx/foreign-flow", params={"date":"2026-07-31","code":"BBCA","sort":"net","length":"20","start":"0"}, headers={"x-api-key":"zpi_xxxxxxxxxxxxxxxxxxxxxxxx"}, ) print(res.json())
Example response
{ "project": "finance:idx", "data": { "data": [ { "code": "IATA", "name": "Karya Pacific Energy Tbk.", "close": 76, "value": 116766853900, "volume": 1640828700, "foreignBuyShares": 243242400, "netForeignShares": 88222700, "foreignSellShares": 155019700 }, { "code": "MDIA", "name": "Intermedia Capital Tbk.", "close": 191, "value": 203053711800, "volume": 1136885000, "foreignBuyShares": 205545700, "netForeignShares": 81968300, "foreignSellShares": 123577400 }, { "code": "BBRI", "name": "Bank Rakyat Indonesia (Persero) Tbk.", "close": 3040, "value": 684938094000, "volume": 226634400, "foreignBuyShares": 153647100, "netForeignShares": 76995400, "foreignSellShares": 76651700 }, { "code": "DMAS", "name": "Puradelta Lestari Tbk.", "close": 148, "value": 23774851200, "volume": 161620100, "foreignBuyShares": 80222700, "netForeignShares": 72178500, "foreignSellShares": 8044200 }, { "code": "PACK", "name": "Abadi Nusantara Hijau Investama Tbk.", "close": 248, "value": 66056582800, "volume": 275994200, "foreignBuyShares": 83806000, "netForeignShares": 51360600, "foreignSellShares": 32445400 } ], "date": "2026-07-31T00:00:00", "sort": "net", "unit": "shares", "start": 0, "total": 963, "length": 5, "dataset": "foreign-flow", "provider": "idx" }, "timestamp": "2026-06-13T02:22:00Z" }
Frequently asked questions
How do I call the IDX Foreign Flow API?
Send a GET request to https://api.zapi.ink/v1/finance:idx/foreign-flow with your Zapi key in the x-api-key header. Parameters — optional: date, code, sort, length, start. The response is JSON in the { project, data, timestamp } envelope.
What does the IDX Foreign Flow API return?
Beli/jual investor asing per saham per hari bursa. The example response has the fields data, date, sort, unit, start, total, length, dataset. Each item in data has fields such as code, name, close, value, volume, foreignBuyShares, netForeignShares, foreignSellShares.
Is the IDX Foreign Flow API free?
Yes. It is on the Zapi free tier: 600 Zap a month with one API key and no credit card. Each call costs 5 Zap. Paid plans raise the limits.
Can an AI assistant call the IDX Foreign Flow API?
Yes. Add the Zapi MCP server (https://mcp.zapi.ink/mcp) to Claude, Cursor or another MCP client and ask in plain words; it calls run_scraper with scraper "idx" and endpoint "foreign-flow".
What other IDX API endpoints are there?
It has 47 endpoints. Besides Foreign Flow: Ringkasan Saham, Ringkasan Indeks, Top Movers, Ringkasan Broker, Emiten Tercatat, Daftar Securities, and 40 more.