Portal Community

When to Use

Crawler type choice: cheerio uses a fast, lightweight HTML parser (like jQuery for Node.js). It does not execute JavaScript, making it ideal for static HTML pages and very fast (typically under 5 seconds). playwright launches a full Chromium browser, executes JavaScript, and waits for the DOM to settle — use it when the target URL loads content via API calls or client-side rendering. Playwright runs are slower (15–60 seconds) and cost more compute.

Configuration

Connection

FieldRequiredDescription
credentialIdRequiredBizFirstAI credential ID holding the Apify API token.
baseUrlOptionalApify API base URL. Defaults to https://api.apify.com.

Operation

Field (config key)RequiredDescription
resourceRequiredMust be "actor".
operationRequiredMust be "scrape-single-url".
urlRequiredThe URL to scrape. Must be an absolute URL including protocol (e.g. https://example.com/page). Supports BizFirst expressions.
crawlerTypeOptionalThe scraping engine to use. Accepted values: "cheerio" (default, fast HTML parsing, no JS execution) or "playwright" (full browser, executes JavaScript, handles SPAs). Defaults to "cheerio" if omitted or invalid.

Sample Configuration

{
  "resource": "actor",
  "operation": "scrape-single-url",
  "credentialId": "apify-prod-token",
  "url": "https://techcrunch.com/2026/05/26/ai-startup-raises-funding/",
  "crawlerType": "cheerio"
}

Validation Errors

ErrorCause
API token is requiredcredentialId / apiToken is missing or empty.
URL is requiredurl is missing or empty.
Invalid settings for actor/scrape-single-urlInternal type mismatch. Verify resource is "actor" and operation is "scrape-single-url".
APIFY_ERROR (error port)The URL is unreachable, returns a non-200 status, the Apify scraper actor fails, or the API token lacks permission.

Output

Success Port

FieldTypeDescription
urlstringThe URL that was scraped, echoed from the input configuration.
crawlerTypestringThe crawler type used: "cheerio" or "playwright".
runIdstringThe Apify run ID. Use this with dataset/getItems (after fetching the run's defaultDatasetId via actor-run/get) to retrieve the scraped page content.

Error Port

Routes here when the URL is invalid, the target page is unreachable (404, 403, timeout), the Apify scraper actor fails internally, or authentication fails. Output contains errorCode ("APIFY_ERROR") and message.

Retrieving scraped content: This operation returns a runId but not the scraped HTML or structured data directly. To read the scraped content, use actor-run/get with the runId to obtain the defaultDatasetId, then call dataset/getItems. For a fully self-contained scrape, prefer actor/runAndGetDatasetItems with a configured scraper actor instead.

Sample Output

{
  "url": "https://techcrunch.com/2026/05/26/ai-startup-raises-funding/",
  "crawlerType": "cheerio",
  "runId": "run_s1c2r3a4p5e6"
}

Expression Reference

ExpressionReturns
{{ $output.apify.runId }}Run ID to pass to actor-run/get for status + dataset ID.
{{ $output.apify.url }}The scraped URL, echoed for use in downstream logging or display.
{{ $output.apify.crawlerType }}Crawler type used, for audit or conditional branching.

Node Policies & GuardRails

PolicyRecommendationSeverity
API token storageUse credentialId; never embed raw tokens.Critical
URL validationValidate the url value is a well-formed absolute URL before it reaches this node. Malformed URLs cause Apify actor errors routed to the error port.High
Crawler type selectionDefault to cheerio for all static sites. Only escalate to playwright when you have confirmed the page requires JavaScript rendering — Playwright runs are 4–10x more expensive in compute units.High
Downstream data retrievalAlways add a subsequent actor-run/get + dataset/getItems step to actually read the scraped content. The output of this node alone does not contain the page data.High
Error handling for blocked pagesMany sites block scrapers (403 responses, CAPTCHAs). Handle the error port and implement retry logic or fallback to alternative data sources for mission-critical workflows.Medium
Rate limitingAvoid scraping the same domain at high frequency. Most sites enforce rate limiting; spread URL scraping across time or use Apify proxy configuration to avoid IP bans.Medium

Examples

News Article Metadata Extraction — Cheerio

{
  "resource": "actor",
  "operation": "scrape-single-url",
  "credentialId": "apify-prod-token",
  "url": "{{ $input.articleUrl }}",
  "crawlerType": "cheerio"
}

Triggered when a user submits an article URL in a content curation form. The fast Cheerio parser extracts the page's HTML in under 5 seconds. The runId is stored in a variable; a subsequent actor-run/get node waits for SUCCEEDED status, then dataset/getItems retrieves the parsed content for display.

JavaScript SPA Scraping — Playwright

{
  "resource": "actor",
  "operation": "scrape-single-url",
  "credentialId": "apify-playwright-token",
  "url": "https://app.dashboard.example.com/public-stats",
  "crawlerType": "playwright"
}

Scrapes a React-based public dashboard that loads data via client-side API calls. Playwright launches Chromium, waits for network idle, and captures the fully-rendered DOM. Use for pages that return empty or skeleton HTML without JavaScript execution.

Batch URL Scraping via Loop

{
  "resource": "actor",
  "operation": "scrape-single-url",
  "credentialId": "apify-prod-token",
  "url": "{{ $output.urlLoop.currentUrl }}",
  "crawlerType": "cheerio"
}

Inside a Loop node iterating over an array of competitor product URLs. Each iteration fires a scrape job and collects the runId into an array variable. After the loop, a parallel batch of actor-run/get calls retrieves dataset IDs, and each dataset is fetched for price comparison analysis.