Reliable Playwright Web Scraper - Python page function
Pricing
Pay per usage
Go to Apify Store

Reliable Playwright Web Scraper - Python page function
Crawl any website with a headless browser and your own Python page function. Reliable runs, honest per-result pricing, clean flat output. Respects robots.txt.
Pricing
Pay per usage
Rating
0.0
(0)
Developer
Radosław Szal
Maintained by CommunityActor stats
0
Bookmarked
2
Total users
1
Monthly active users
29 minutes ago
Last modified
Categories
Share
Reliable Playwright Web Scraper
🔗 Part of the Apify actors collection — 6 reliable, tested scrapers & data tools.
Crawl any site with a headless Chromium browser and your own Python page function.
Reliable runs, honest per‑result pricing, respects robots.txt by default.
Quick start
{"startUrls": [{ "url": "https://apify.com" }],"pageFunction": "async def page_function(page, context, request):\n return {\n \"url\": page.url,\n \"title\": await page.title()\n }"}
Page function
Signature:
async def page_function(page, context, request):# page – Playwright Page instance# context – Actor context (key‑value store, dataset, etc.)# request – Current Request object (url, userData, …)# Return a dict or a list of dicts; each dict becomes one result item.
Crawling
- linkSelector – CSS selector for links to follow.
- includeGlobs – Glob patterns that URLs must match to be enqueued.
- maxRequestsPerCrawl – Hard limit on total requests for the run.
Input
| Field | Type | Description |
|---|---|---|
| startUrls | array[object] | List of { "url": "…" } to seed the crawl |
| pageFunction | string | Python source of the async page function |
| linkSelector | string | CSS selector for link discovery |
| includeGlobs | array[string] | URL glob patterns to follow |
| maxRequestsPerCrawl | integer | Max requests per run |
| maxConcurrency | integer | Parallel browser contexts (default 5) |
| requestTimeoutSecs | integer | Per-page timeout in seconds (default 45) |
| waitUntil | string | Playwright waitUntil (load, domcontentloaded, networkidle) |
| respectRobotsTxt | boolean | Obey robots.txt (default true) |
| proxyConfiguration | object | Apify proxy config |
| maxItems | integer | Stop after this many result items |
Pricing
- Pay per result item (flat rate).
- First N items free (see actor pricing page).
- No hidden fees; you only pay for data you actually receive.
Notes
robots.txtis respected by default (URLs disallowed for crawlers are skipped before they are visited). TurnrespectRobotsTxtoff only for sites you own.- Your page function runs inside your own run (your account, your data) — like any code you run on the platform. A per-page timeout bounds runaway code.
- You are responsible for ensuring your scraping complies with applicable laws and the target site's terms of service.