Saenyakorn Chaiphiphatworakul
All work

In production

WebFetcher, the page-scraping service behind FoodLex

A Puppeteer service that works with n8n and FoodLex as one project. It reads food-law agency pages that only show their data after JavaScript runs, and returns JSON.

Period
2026
Role
Sole developer
Used by
Product R&D

The problem

Some agency sites render their listings with JavaScript (the EU Novel Food catalogue, for example), so a plain HTTP Request in n8n gets an empty page and misses new laws from that source.

What I built

A shared service the FoodLexAI workflows in n8n call when a site needs rendering. It opens the page in headless Chrome, waits for the data to load, reads tables, text and links, and returns JSON that n8n passes on to FoodLex.

Key features

  • A single POST /api/scrape endpoint: send a URL, get JSON back
  • Reads tables on the page and maps header names onto each row automatically
  • Falls back to page text when there is no table, and collects every link
  • Waits for late-loading content (network idle, a selector, then a short pause)
  • Shared by the n8n workflows, so none of them needs its own scraper

Under the hood

  • Runs the system Chrome in Docker with Thai and CJK fonts so Thai, Chinese and Japanese pages render correctly
  • Thai-first Accept-Language, a desktop user agent, and the browser always closes in finally so nothing lingers in memory

Related systems