Reliable Playwright Web Scraper - Python page function avatar

Reliable Playwright Web Scraper - Python page function

Pricing

Pay per usage

Go to Apify Store
Reliable Playwright Web Scraper - Python page function

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

Radosław Szal

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

29 minutes ago

Last modified

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

FieldTypeDescription
startUrlsarray[object]List of { "url": "…" } to seed the crawl
pageFunctionstringPython source of the async page function
linkSelectorstringCSS selector for link discovery
includeGlobsarray[string]URL glob patterns to follow
maxRequestsPerCrawlintegerMax requests per run
maxConcurrencyintegerParallel browser contexts (default 5)
requestTimeoutSecsintegerPer-page timeout in seconds (default 45)
waitUntilstringPlaywright waitUntil (load, domcontentloaded, networkidle)
respectRobotsTxtbooleanObey robots.txt (default true)
proxyConfigurationobjectApify proxy config
maxItemsintegerStop 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.txt is respected by default (URLs disallowed for crawlers are skipped before they are visited). Turn respectRobotsTxt off 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.