This tutorial shows how to scrape Yellow Pages Thailand search results into CSV with the Yellow Pages Thailand Scraper template for UScraper. You will import the workflow, replace the sample keyword URLs, set the export path, run the pagination loop, and validate the business listing rows before using them.
Before you start
Prerequisites and policy checks
You need UScraper installed as a local desktop app, the Yellow Pages Thailand Scraper template, and one or more Yellow Pages Thailand search URLs you are allowed to process. The official site has an English category directory, catalog pages, and keyword search results, so choose the entry point that matches the research question: category discovery, catalog browsing, or a direct keyword query.
This guide covers visible public listing results. It does not cover account dashboards, paid advertiser tools, CAPTCHA bypassing, hidden contact enrichment, or resale of directory data. Directory pages can look public while still being governed by terms, robots rules, copyright, privacy law, marketing regulations, and local compliance duties.
Technical access is not permission. Start with a small, documented use case, keep pacing modest, collect only fields you need, and get legal review before commercial redistribution or outreach.
Workflow anatomy
What the Yellow Pages Thailand scraper does
The JSON export is the authoritative workflow definition. In plain English, the graph runs:
Navigate -> Wait for Page Load -> Sleep -> Inject JavaScript
-> Wait for marked listing rows -> Structured Export
-> Check for Next -> Click Next -> wait -> export again
-> Loop Continue when no more result pages remain
The important step is the injected DOM-normalization script. It looks for result-like containers with profile links, address or phone signals, category text, and business-card classes. Matching containers are tagged with data-uscraper-yp-row="1", and Structured Export reads one CSV row per tagged result.
| Export field | What it captures | Validation check |
|---|---|---|
keyword | Decoded search term from the current URL | Confirm it matches the keyword URL in Navigate. |
business_name | Company or listing name from the result card | Compare against the visible title and profile link. |
address | Thai or English address text when visible | Spot-check city, district, and postal text. |
category | Directory category links or labels | Use it for segmentation, not as a perfect taxonomy. |
telephone, fax | Phone and fax text from visible card fields | Expect blanks where listings do not publish them. |
opening_hours | Hours text when printed on the card | Treat as optional because not every result exposes hours. |
coordinates | Latitude and longitude from visible text or map links | Verify before mapping or territory assignment. |
business_info, products_services | Summary, description, products, or services | Richer profile-only text may need a detail-page workflow. |
profile_url, page_url | Source profile and result page URLs | Use for audit, dedupe, and manual review. |
Runbook
How to scrape Yellow Pages Thailand listings to CSV
Import the template
Open Yellow Pages Thailand Scraper, download the JSON, and import it into UScraper.
Replace keyword URLs
In Navigate, replace the sample searches with your approved yellowpages.co.th URLs. Keep one keyword or category URL per entry so the keyword and page_url columns stay traceable.
Keep the load waits
Preserve the page-load wait, two-second pauses, and visible row wait. If result cards appear slowly in your session, extend waits before Structured Export instead of rushing pagination.
Set the CSV destination
Structured Export writes yellow-pages-thailand-scraper.csv with headers enabled and append mode on. Change the save folder to your project workspace before client or campaign runs.
Run, review, then scale
Run one keyword, compare rows against the live page, clear test rows if needed, and only then let the Next-page loop continue across the remaining result pages.
Append mode is useful because every paginated page writes to the same file. It also means reruns will add duplicate rows if you reuse the same filename. For recurring research, use a dated filename or clear the CSV before each production pass.
Validation
Validate the Yellow Pages Thailand CSV export
Open the CSV beside the browser after the first run. Check the first few rows, one middle result, and one row from the last exported page. Sort by profile_url or business_name to catch duplicate cards, repeated pages, or sponsored units that appear more than once.
| Symptom | Likely cause | Fix |
|---|---|---|
| Zero rows exported | Result cards did not match the row-marking script, or a prompt blocked the page | Handle prompts, rerun one keyword, and inspect whether rows receive data-uscraper-yp-row. |
| Blank phone or fax | The listing does not publish that field on the results page | Keep the row, then decide whether a profile-page pass is worth the extra work. |
| Missing business info | Description text is hidden, collapsed, or only on the profile page | Treat business_info as best-effort and validate against profile_url. |
| Duplicate businesses | Pagination repeated, sponsored cards recurred, or the same URL was included twice | Dedupe by profile_url, then by business name plus telephone. |
| Garbled Thai text in Excel | The CSV was opened with the wrong encoding | Import as UTF-8 instead of double-clicking the file. |
Alternatives
UScraper vs Octoparse vs Apify for Yellow Pages Thailand
Searches such as best Yellow Pages Thailand scraper and Octoparse vs Apify Yellow Pages usually compare three paths: a local desktop app workflow, a no-code cloud template, or a hosted actor/API. None is universally better; the right choice depends on custody, schedule, scale, and maintenance.
| Approach | Best fit | Trade-off |
|---|---|---|
| UScraper template | Analyst-supervised CSV exports, visible browser QA, local project files, no-code selector edits | You maintain waits and selectors when YellowPages Thailand changes markup. |
| Octoparse template | Teams that prefer a cloud no-code workspace and managed extraction runs | Workflow execution and data handling depend on the vendor environment and plan. |
| Apify actor | API-driven jobs, scheduled runs, and developer handoff into pipelines | Cloud billing, actor settings, and output schema become part of your dependency chain. |
| Python scraper | Full engineering control over parsing, retries, storage, and enrichment | Requires code, ongoing maintenance, and operational guardrails. |
For a first Thailand business listing audit, start with the UScraper template library and a small local CSV. If the validated schema becomes a scheduled data product, you can move the exact field list into a hosted actor, API workflow, or custom Python pipeline later.
FAQ
Yellow Pages Thailand scraper FAQ
Yellow Pages Thailand listings may be publicly visible, but automated collection can still be limited by site terms, robots rules, database rights, privacy law, and marketing regulations. Review the current rules, avoid bypassing access controls, pace runs modestly, and get legal advice before resale, enrichment, or large-scale outreach.
Next step
Download the Yellow Pages Thailand scraper template
Download the JSON from Yellow Pages Thailand Scraper, import it into UScraper, and keep this guide open for the first validation pass. For adjacent directory workflows, browse all templates or return to the UScraper blog for more CSV export tutorials.

