Vietnam Lottery Results Scraper (XSMN, XSMT, XSMB) avatar

Vietnam Lottery Results Scraper (XSMN, XSMT, XSMB)

Pricing

from $0.70 / 1,000 lottery draws

Go to Apify Store
Vietnam Lottery Results Scraper (XSMN, XSMT, XSMB)

Vietnam Lottery Results Scraper (XSMN, XSMT, XSMB)

Get Vietnamese lottery results (xổ số, XSMN, XSMT, XSMB, KQXS) by region and date. One row per province draw or per drawn number, with all prizes and the lô tô list. Latest draw or date range up to 366 days, from 2008 (North) and 2009 (South, Centre). Export to JSON, CSV or Excel.

Pricing

from $0.70 / 1,000 lottery draws

Rating

0.0

(0)

Developer

MrBridge

MrBridge

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

19 hours ago

Last modified

Categories

Features

Limited permissions

Share

Vietnam Lottery Results Scraper

Vietnam Lottery Results Scraper collects Vietnamese lottery results (xổ số, XSMN, XSMT, XSMB, KQXS) from xsmn.mobi. It covers the three regions, South (XSMN), Centre (XSMT) and North (XSMB), and returns one row per province draw or one row per drawn number, ready for JSON, CSV or Excel.

Set the mode to latest and the Actor returns the most recent complete draw of each region, with every prize, the two-digit "lô tô" list and, for the North, the special-prize codes. Set it to dateRange with two dates and you get every draw in between, up to 366 days per run, in a stable order.

What is Vietnam Lottery Results Scraper?

The Vietnamese lotteries run daily draws. The South and the Centre each draw several provinces a day, the North draws once a day under the code mien-bac. Vietnam Lottery Results Scraper reads the result page of each region and date, checks that the page is complete, and turns it into structured rows. No API key is needed.

What data can I extract with it?

  • Draw rows (outputFormat: draw): date, ISO weekday, region, province name and code, all prizes grouped by tier, the North special-prize codes, the lô tô list (last two digits of every number), the number count (18 for the South and Centre, 27 for the North), the source URL and the scrape time.
  • Number rows (outputFormat: number): date, region, province, tier, position in the tier and the number. One row per drawn number, 18 or 27 rows per draw, for databases and spreadsheets.

Numbers are text, so leading zeros are kept.

How can I use the results?

  • Build a KQXS archive or a results website without copying pages by hand.
  • Research draw history by date, region and province, using outputFormat: number rows in databases and spreadsheets, whether you are an analyst or a researcher.
  • Feed a chatbot, a notification service or a spreadsheet with the latest XSMN, XSMT or XSMB draw.
  • Check a published result for analysis by comparing a stored row with the result for one day and province, using sourceUrl to return to its result page.

How to use it

  1. Open the Actor in Apify Console and choose the regions.
  2. Pick latest for the newest draw, or dateRange and fill dateFrom and dateTo.
  3. Optionally list province codes such as hcm or dng to keep only those provinces. Every code must be valid for the regions you chose (see Valid province codes).
  4. Choose the output format and start the run. Rows appear in the dataset as they are delivered.

Input

FieldMeaningDefault
modelatest or dateRangelatest
regionssouth, central, northall three (the Console form pre-selects south)
dateFromFirst day of the range, YYYY-MM-DD, dateRange onlyempty
dateToLast day of the range, YYYY-MM-DD. Empty or in the future means today in Vietnam (UTC+7)empty
provincesProvince codes in lowercase, for example hcm, dl, dng. The North is mien-bac. An unknown code, or a code outside the selected regions, stops the run with a BAD_INPUT rowempty (all provinces)
outputFormatdraw or numberdraw
maxDrawsHard cap on province draws per run, in both formats1000

Example input for one day of the three regions:

{
"mode": "dateRange",
"dateFrom": "2026-10-24",
"dateTo": "2026-10-24",
"regions": ["south", "central", "north"],
"outputFormat": "draw"
}

How many rows to expect from a day: on a Monday the South draws 3 provinces (hcm, dt, cm), so one South day in number format gives 54 rows (3 draws of 18 numbers). On a Saturday the South draws 4 provinces. The provinces that draw each day rotate, so the count changes with the weekday.

Invalid input ends the run successfully with one BAD_INPUT row in the errors dataset and no draw, and no page is requested. It covers a missing dateFrom in dateRange mode, a date that does not exist, dateFrom after dateTo, more than 366 days, an unknown province code, and a province code outside the selected regions. The platform still bills the apify-actor-start event of the run, even when the input is invalid. Only draws are billed by the Actor itself.

Valid province codes

A province code must exist and belong to one of the regions you selected. Otherwise the run stops with one BAD_INPUT row. Its details object holds:

  • problems: the list of messages.
  • unknownProvinces: the codes that do not exist. Present only when such a code is in the input.
  • validCodes: the codes valid for the selected regions, sorted. Present together with unknownProvinces, not otherwise.
  • mismatchedProvinces: the known codes that belong to a region you did not select, each with its region. This key is present only when such a code is in the input, and absent otherwise.

For example, ["hcm"] with regions: ["north"] gives a details object with problems and mismatchedProvinces (an entry for hcm, South) only. The xyz code gives problems, unknownProvinces: ["xyz"] and validCodes.

The valid codes by region:

  • South (21): hcm, tg, kg, dl, la, hg, bp, vl, tv, bd, tn, bth, ag, st, dn, ct, vt, bt, bl, dt, cm.
  • Centre (14): tth, kt, kh, qng, dno, dng, nt, gl, qt, qb, bdi, qnm, dlk, py.
  • North (1): mien-bac.

Output

Draws go to the default dataset. Problems go to a separate errors dataset, and these rows are never billed. The OUTPUT record of the key-value store summarizes the run.

This is one real row, the Ho Chi Minh City draw of 2026-10-24 (hcm), as the Actor builds it from the page:

{
"drawDate": "2026-10-24",
"weekday": 6,
"region": "south",
"province": "TP HCM",
"provinceCode": "hcm",
"prizes": {
"eighth": [
"51"
],
"seventh": [
"554"
],
"sixth": [
"6781",
"3056",
"6237"
],
"fifth": [
"1148"
],
"fourth": [
"97890",
"29567",
"19053",
"13566",
"97760",
"36035",
"71847"
],
"third": [
"90169",
"37660"
],
"second": [
"28385"
],
"first": [
"28505"
],
"special": [
"698440"
]
},
"specialCodes": null,
"loto": [
"05",
"35",
"37",
"40",
"47",
"48",
"51",
"53",
"54",
"56",
"60",
"60",
"66",
"67",
"69",
"81",
"85",
"90"
],
"numberCount": 18,
"sourceUrl": "https://xsmn.mobi/xsmn-24-10-2026.html",
"scrapedAt": "2026-10-26T09:38:00.000Z"
}

Field notes:

  • prizes lists the tiers in page order. The South and Centre go from eighth to special, the North goes from special to seventh and has no eighth.
  • specialCodes is null for the South and Centre and an array of codes (such as 7KE) for the North. Some old North pages have no code block at all (for example 2008-01-05): specialCodes is then [].
  • loto holds the last two digits of every number, sorted, duplicates kept. Its length equals numberCount.
  • The North row has province set to Miền Bắc and provinceCode set to mien-bac.
  • In number format each row has drawDate, region, province, provinceCode, tier, index (from 0, in page order) and number.

Rows come in plan order: ascending date, then South, Centre, North, then the columns of the page. The order is the same on every run.

Coverage and history

  • The North is available from 2008-01-01. The South and the Centre are available from 2009-01-01.
  • A dateFrom before those dates is moved to them, with a warning in the log.
  • The length of the special prize (ĐB) varies by region and year. Older draws can have 5 or 6 digits (on 2010-03-10, the South shows 6 digits and the Centre 5). The Actor returns them as they appear on the page.
  • The North has no draw during Tết 2026, from 2026-02-16 to 2026-02-19. Those days are listed in noDraw in the OUTPUT record, with no row and no charge. The South draws during Tết.

Latest mode and draw times

In latest mode the Actor tries today's page for each region (day in Vietnam time, UTC+7). If the draw is not complete, it steps back one day at a time, for up to 7 days.

Draws finish at about 16:30 for the South, 17:30 for the Centre and 18:30 for the North (the site announces 18:10 for the North). These times are approximate, the South and Centre times are not published on the site. Before a draw ends you get the previous day's draw. For a daily schedule, start the run after 19:00 Vietnam time (12:00 UTC). The latestFallbacks list of the OUTPUT record shows which days were stepped back.

Days without a draw and pending draws

A day without a draw (for example a day when the site shows an empty column) gives no row and no charge. It is counted in the noDraw list of the OUTPUT record. A draw of today that is still empty or partial is counted in pending. A partial page for a past date gives a DRAW_INCOMPLETE row in the errors dataset, which is never billed. A page that does not exist (HTTP 404) is counted in pagesByStatus and is not an error.

Limits

  • maxDraws counts province draws in both formats. The default is 1000. A full year of the three regions is about 2,400 draws, so raise maxDraws for long ranges.
  • Speed: a full year of the three regions (1,095 pages, about 2,400 draws) takes about 20 minutes at the default 512 MB (about 33 minutes at 256 MB). The limit is the response time of the site, not the Actor. Fewer regions or shorter ranges run faster.
  • A run covers 366 days at most. Split longer periods into several runs.
  • Each run is a snapshot of what the site shows at that moment.
  • The platform refuses a maximum charge per run below 0.02 USD.

Billing

One event is billed per delivered draw, in both formats. In number format a draw of 18 or 27 rows is still one event. Errors, days without a draw and pending draws are never billed. The platform bills the apify-actor-start event for every run, including a run that ends on a BAD_INPUT. The Pricing tab of the Actor shows the current prices.

If you set a maximum charge for the run, the Actor stops cleanly when the budget is used up (stoppedBy is chargeLimit) and never delivers an unbilled row. The number of draws delivered under a charge limit depends on your price tier, see the Pricing tab.

If the platform moves or restarts the run while it works, the run picks up where it stopped, with no duplicate row and no draw billed twice. If the restart falls in the instant between the delivery of a page and its billing, the draws of that page (4 at most) stay unbilled.

OUTPUT.drawsCharged is the Actor's own count of billed draws. After a platform restart, a draw found already saved in the dataset counts as billed, even if the restart happened just before its charge. The bill shown in the Apify Console can therefore be lower than drawsCharged by at most OUTPUT.reconciledDraws, and never higher. You are never billed twice for a draw.

Progress in the run log

A long run writes one line to the log about every minute:

Progress: 1048/1095 pages done, 2293 draw(s) emitted, 0 error row(s), ETA 54s.

It gives the pages done out of the total, the draws delivered so far, the error rows and an estimated time left. In latest mode the unit is regions instead of pages. The estimate is pessimistic in the first minutes of a run (it announced over 32 minutes at the start of a 21-minute run) and gets accurate towards the end.

Blocked pages and early stops

A page refused with 401, 403 or 429 is requested again through another proxy, up to 3 times. After that it gives a TARGET_BLOCKED row and the region stops. After 4 blocked pages in a row the run stops cleanly and ends SUCCEEDED.

stoppedBy in the OUTPUT record says why a run ended early:

  • null: all the requested work was done.
  • maxDraws: the maxDraws cap was reached.
  • chargeLimit: the maximum charge set for the run was reached.
  • deadline: the run reached its internal time limit.
  • circuitOpen: too many blocked pages in a row.

After a deadline or circuitOpen stop, up to 36 pages that were already fetched can still be applied, so a few draws may arrive after the stop.

Frequently asked questions

Why does the North have no province column?

The North draws once a day for the whole region, so the Actor returns a single row with the province code mien-bac.

What do XSMN, XSMT, XSMB and KQXS mean?

XSMN is xổ số miền Nam (South), XSMT is xổ số miền Trung (Centre), XSMB is xổ số miền Bắc (North), and KQXS stands for kết quả xổ số, the lottery results.

Can I use Vietnam Lottery Results Scraper via MCP?

Yes. Any Apify Actor can be called from an MCP client through the Apify MCP server. See the Apify MCP documentation for the setup.

Your feedback

We're always working on improving the performance of our Actors. So if you've got any technical feedback for Vietnam Lottery Results Scraper or simply found a bug, please create an issue on the Actor's Issues tab.

An honest review helps the next users decide. You can also bookmark this Actor, and use the Issues tab for bugs or other problems.

More free tools, scrapers, MCP servers and data studies from the same team: mr-bridge.com.

xsmn.mobi has its own terms of use, and it may restrict automated access or commercial reuse. Before you rely on the output, in particular for commercial use, confirm that your use is permitted by those terms. You remain responsible for how you use the results and for complying with the source's terms and with the laws that apply to you.