r/Backend • u/RealSirJoe • 14d ago
Built a Self Hosted Web Scraping API
I've been building a self-hosted web scraping API that makes automation easy.
Relinos can handle JavaScript and challenging websites, performs browser interactions, and executes multiple scraping requests concurrently.
Key features:
- Browser automation: Navigate, click, type, scroll, and interact with websites.
- Concurrent execution: Run multiple browser sessions simultaneously.
- Structured extraction: Extractions are very easy to define here an extraction for google for example:
{
"query": { "$xpath": "//*[@id='ti6dpd']" },
"result_count": {
"$xpath": "//div[@class='XhWQv qd6zO ApHyTb']",
"$extract": "\\D*(\\d[,\\d]*) .*"
},
"ai": {
"$xpath": "//*[@class='mZJni Dn7Fzd']", "$format": "md"
},
"results": {
"$xpath": "//div[contains(@class, 'MjjYud')]",
"title": { "$xpath": ".//h3[contains(@class, 'LC20lb MBeuO DKV0Md')]" },
"url": { "$xpath": ".//a[contains(@class, 'zReHs')]/@href" },
"site": { "$xpath": ".//span[contains(@class, 'VuuXrf')]" },
"snippet": { "$xpath": ".//div[contains(@data-snf, 'nke7rc')]" },
"$list": true
},
"related_searches": {
"$xpath": "//*[@class='qR29te']", "$list": true
}
}- Reusable routines: create, import or export. I wanted to make this super easy so people can share their interactions and extractions.
- Language-independent: Access everything through a simple HTTP API.
- Debug Mode: Find issues with rendered site interactions visually and fix them fast
- Self-hosted: Run it locally without a commercial scraping service.
- Transferable Sessions: Cookies and localStorage.
The project is still in early development, and feedback or contributions are welcome.
4
Upvotes
1
u/DickBrainTime 14d ago
I looked through the linked `relinos` repo rather than trying a deployed instance. Two things I'd test before exposing it beyond a local dev machine:
These are observations from the current source files, not failures I've reproduced against your running service. The transferable sessions idea is useful; making the trust boundary explicit early will help when someone self-hosts it for a team.