Lotto Results PH

PCSO lotto results API for developers

A free, read-only JSON API with the same results as this site: every PCSO national lottery draw from official sources, with its source, retrieval time, verification status and any correction. No key needed to start. Daily files of the whole archive are on Open data.

Quick start

Base URL: https://bilislotto.com/api/v1. Every response is JSON; dates are Manila dates (PHT, UTC+8), draw times are 14:00, 17:00 or 21:00, and money is in centavos (divide by 100 for pesos). The version is part of the URL: anything that would break a client comes as /api/v2.

curl
curl "https://bilislotto.com/api/v1/draws/latest?game=ultra-lotto-6-58"

# With a key: 10,000 requests a day
curl -H "Authorization: Bearer $LOTTO_API_KEY" "https://bilislotto.com/api/v1/draws/latest?game=ultra-lotto-6-58"
JavaScript (fetch)
const response = await fetch(
  "https://bilislotto.com/api/v1/draws/latest?game=ultra-lotto-6-58",
  // Leave headers out to use the anonymous limit.
  { headers: { Authorization: `Bearer ${process.env.LOTTO_API_KEY}` } },
);
if (response.status === 429) {
  const wait = Number(response.headers.get("Retry-After"));
  throw new Error(`Rate limited, retry in ${wait} s`);
}
const { data } = await response.json();
for (const draw of data) {
  console.log(draw.game_name, draw.date, draw.numbers.join("-"));
}
Python (requests)
import os
import requests

response = requests.get(
    "https://bilislotto.com/api/v1/draws",
    params={"game": "3d-lotto", "from": "2026-11-01", "to": "2026-11-07"},
    headers={"Authorization": f"Bearer {os.environ['LOTTO_API_KEY']}"},
    timeout=10,
)
response.raise_for_status()
body = response.json()
for draw in body["data"]:
    print(draw["date"], draw["slot"], draw["numbers"])
print(body["pagination"]["next"])  # None on the last page

The full description is an OpenAPI 3.1 document: /api/v1/openapi.json — import it into Postman, Insomnia or a client generator.

Keys and limits

AccessHowLimit
AnonymousNo key60 requests per hour per IP
Free keyE-mail and site address10,000 requests per day (resets at midnight PHT)
Open dataFiles on /data/None: whole archive as JSON and CSV, updated daily

Send the key in a header, never in the URL: Authorization: Bearer lrph_…. A request over the limit gets 429 Too Many Requests with Retry-After (seconds). Responses served from our CDN cache do not count. Browsers can call the API directly: CORS is open to every origin.

Endpoints

Games GET /api/v1/games

Every game: number rules, which matches win a prize and the draw schedule.

Try it: /api/v1/games

Latest results GET /api/v1/draws/latest

The latest public result of every game, or of one game.

ParameterTypeDescription
gamequeryultra-lotto-6-58 | grand-lotto-6-55 | super-lotto-6-49 | mega-lotto-6-45 | lotto-6-42 | 6d-lotto | 4d-lotto | 3d-lotto | 2d-lottoOne game; all games when left out.

Try it: /api/v1/draws/latest?game=ultra-lotto-6-58

Draws in a period GET /api/v1/draws

Public results filtered by game, dates and draw time, newest first by default. Paginated: up to 500 per page; follow `pagination.next`. For the whole archive, the daily files on /data/ are faster.

ParameterTypeDescription
gamequeryultra-lotto-6-58 | grand-lotto-6-55 | super-lotto-6-49 | mega-lotto-6-45 | lotto-6-42 | 6d-lotto | 4d-lotto | 3d-lotto | 2d-lottoGame slug, see GET /games.
fromquerydateFirst date, inclusive.
toquerydateLast date, inclusive.
slotquery14:00 | 17:00 | 21:00Draw time, Asia/Manila (UTC+8).
orderquerydesc | ascdefault descBy date and draw time.
pagequeryintegerdefault 1
per_pagequeryintegerdefault 100

Try it: /api/v1/draws?game=3d-lotto&from=2026-11-01&to=2026-11-07&per_page=50

All draws of a day GET /api/v1/draws/{date}

Every public result of one Manila date, by draw time.

ParameterTypeDescription
datepath, requireddateManila date, YYYY-MM-DD.

Try it: /api/v1/draws/2026-11-22

One draw GET /api/v1/draws/{date}/{draw}

One result, addressed like its page: game slug and draw time.

ParameterTypeDescription
datepath, requireddateManila date, YYYY-MM-DD.
drawpath, requiredstringGame slug and draw time: 2pm, 5pm or 9pm, as in the result page URL.

Try it: /api/v1/draws/2026-11-22/ultra-lotto-6-58-9pm

History of a combination GET /api/v1/numbers/{game}/{combo}

Every draw with exactly this combination, how often that is expected, and draws where it won a lower prize. The same data as the /numbers/ page.

ParameterTypeDescription
gamepath, requiredultra-lotto-6-58 | grand-lotto-6-55 | super-lotto-6-49 | mega-lotto-6-45 | lotto-6-42 | 6d-lotto | 4d-lotto | 3d-lotto | 2d-lottoGame slug, see GET /games.
combopath, requiredstringNumbers separated by dashes. Digit games keep the order (4-9-2); lotto numbers in any order (05-14-25-38-44-52).

Try it: /api/v1/numbers/3d-lotto/4-9-2

Number statistics GET /api/v1/stats/{game}

Frequencies, gaps, sums, pairs and jackpot runs over the last 30, 90 or 365 days or the whole archive, each with the value expected for fair draws. Past draws only: not a prediction.

ParameterTypeDescription
gamepath, requiredultra-lotto-6-58 | grand-lotto-6-55 | super-lotto-6-49 | mega-lotto-6-45 | lotto-6-42 | 6d-lotto | 4d-lotto | 3d-lotto | 2d-lottoGame slug, see GET /games.
windowquery30d | 90d | 365d | alldefault allLast 30, 90 or 365 days, or the whole archive.

Try it: /api/v1/stats/mega-lotto-6-45?window=90d

Jackpots GET /api/v1/jackpots

Lotto games: the latest jackpot, the current run of draws without a winner and every won jackpot since winner counts were recorded.

ParameterTypeDescription
gamequeryultra-lotto-6-58 | grand-lotto-6-55 | super-lotto-6-49 | mega-lotto-6-45 | lotto-6-42One lotto game; all lotto games when left out.

Try it: /api/v1/jackpots?game=ultra-lotto-6-58

The draw record

Every endpoint that returns draws uses this record; the open data files use it too. Only results shown on the site are returned: published, confirmed or under review.

FieldTypeMeaning
idstringStable identifier: game, date and draw time.
gamestring
game_namestring
datedateCalendar date in Asia/Manila (PHT).
slot14:00 | 17:00 | 21:00Draw time, Asia/Manila (UTC+8).
numbersarray of integerNumbers in the order they were drawn. For digit games (2D, 3D, 4D, 6D) the order is part of the result.
jackpot_centavosinteger or nullJackpot (lotto) or top prize in centavos (divide by 100 for pesos); null when PCSO has not announced it or older records lack it.
winnersinteger or nullJackpot winners; null when unknown (records before 2024-11-08).
statuspublished | confirmed | needs_reviewpublished: from an official source; confirmed: verified against a second official source or by a person; needs_review: sources disagree, the numbers shown may change.
sourcelottomatik | broadcast | pcso_search | Where the published numbers came from: LottoMatik, the PCSO live broadcast (entered by hand twice) or the PCSO search page.
source_retrieved_atdate-time or date-timeWhen the result was first seen at the source.
published_atdate-time or date-timeISO 8601 instant (UTC).
confirmed_atdate-time or date-timeISO 8601 instant (UTC).
correctionsarray of CorrectionA change of numbers that were already public. Every change is logged and marked on the result page.
urluriThe result page on the site.

Caching

Every response has a Cache-Control header and an ETag. Send the ETag back in If-None-Match and you get 304 Not Modified while nothing changed: the latest results are fresh for 15 seconds, a past day or draw for 5 minutes (we purge it when a result changes), statistics for 5 minutes.

# The second request returns 304 Not Modified, with no body, until the data changes
curl -i "https://bilislotto.com/api/v1/draws/latest"
curl -i -H 'If-None-Match: "<ETag from the first response>"' "https://bilislotto.com/api/v1/draws/latest"

Errors

Errors are JSON: {"error": {"status": 404, "code": "not_found", "message": "…"}}. 400 invalid_request: a parameter is wrong or unknown; 401 invalid_key: the key is wrong or revoked; 404 not_found: no public result for that date, draw or game; 429 rate_limited: wait Retry-After seconds; 503 unavailable: try again shortly.

Licence and credit

The data is free to use, including commercially, under CC BY 4.0. The one condition: show a credit with a link to Lotto Results PH wherever you show the data. The response field meta.attribution carries the text.

The link is required; its rel attribute is your choice. A plain link, nofollow, sponsored or ugc are all fine. Your key never depends on the link, and we do not check it.

Plain link
<p>Data: <a href="https://bilislotto.com/">Lotto Results PH</a> (CC BY 4.0)</p>
Or with the rel attribute you prefer
<p>Data: <a href="https://bilislotto.com/" rel="nofollow">Lotto Results PH</a> (CC BY 4.0)</p>

The results are PCSO's. We collect them from official sources (LottoMatik and the PCSO live broadcast) and check them; we are not affiliated with PCSO.

Get a free key

10,000 requests a day instead of 60 an hour. Lost your key? Ask again with the same e-mail and site: the new key replaces the old one.

We e-mail you a link; the key appears after you open it. We store your e-mail, the site address and a hash of the key, nothing else. No link to us is needed to get or keep a key.