Skip to the content
EnrichedNowDocs

    Type to search every page.

    Menu

    Scraper APIWeb

    web.render

    Load one public web page in a browser and get its HTML after the page's JavaScript ran.

    Id
    web.render
    Version
    1
    Billed per
    request — 1 unit for a charged run
    Runs
    within one request

    Start it with POST /v1/scrapers/web.render/runs. How runs work is in Running a scraper; what a run costs is in Usage and units.

    Inputs

    The fields of input. A field that is not listed here is refused.

    Inputs of web.render
    FieldTypeDescription
    urlrequiredstringThe page's address: http or https, on a public host name.Limit: at most 2048 characters.
    wait_until"load" | "domcontentloaded" | "networkidle"What to wait for after the page starts loading: domcontentloaded (the document is parsed), load (its resources too), or networkidle (no request for half a second).Default: "load".
    wait_for_selectorstringA CSS selector that must be in the page before it is read, e.g. ul.results li.Limit: at most 200 characters.
    wait_msintegerMilliseconds to wait after the other conditions.Limit: 0 to 10000. Default: 0.
    timeout_snumberSeconds for the whole render, waits included.Limit: 5 to 60. Default: 30.
    max_bytesintegerThe document is cut after this many bytes; truncated says when it was.Limit: 1 to 10000000. Default: 2000000.
    blockarray of "images" | "media" | "fonts" | "stylesheets"Resource types the page is not allowed to load. Images, media and fonts by default.
    actionsarray of anyUp to 10 steps carried out on the page after it loaded, in order, before it is read: wait_for_selector, click, type, press, scroll and wait. For a page that shows its content only after a search, a click on "load more" or a scroll. The first step that fails ends the list.
    • The page is loaded in a browser of ours, its scripts run, and html is the document as it then stands. For a page whose content is already in what the server sends, web.fetch is faster and returns the same.
    • Three waits, in this order, all within timeout_s (30 seconds by default, 60 at most): wait_until — domcontentloaded, load or networkidle —, then wait_for_selector, a plain CSS selector that must be in the page, then wait_ms more.
    • When a wait does not come true in time the run ends partial with wait_timed_out: the record is the page as it stood, and wait_satisfied is false.
    • block names what the page may not load: images, media and fonts by default; add stylesheets for a lighter page, or send [] to load everything.
    • Nothing of yours is sent with the page: no request header, no cookie, no script. No screenshot or PDF is made, and nothing is kept between two runs.
    • A page the site itself answers with 404 or 500 is ok, and the record carries that status. A site that refuses the browser ends the run failed with blocked, rate_limited or captcha, and costs nothing.
    • The document is cut after max_bytes — 2,000,000 by default, 10,000,000 at most — and truncated is true when it was. A page that asks for far more requests or bytes than a page needs is stopped, and the run ends partial with resource_limit.
    • url follows the rules of web.fetch: http or https, a public host name, port 80, 443, 8080 or 8443, no login. An address that is not a web page ends unsupported with not_html — see the reasons of this family.

    Record fields

    Every record of a run has these fields. A value that is not known is null — never an empty string and never 0.

    Record fields of web.render
    FieldTypeNotes
    urlstringThe address that was asked for.
    final_urlstringThe address of the page that was read, after redirects and navigation.
    statusintegerThe HTTP status of the page's own document (a 404 or 500 is still the page).
    headersobject of string valuesThe document's response headers that describe the page, names in lower case.
    content_typestring or nullThe media type of the document, without parameters.
    htmlstringThe document as HTML, after its scripts ran.
    bytesintegerThe size of html in bytes (UTF-8).
    truncatedbooleanTrue when the document was longer than max_bytes and was cut.
    wait_satisfiedbooleanFalse when the wait condition did not come true in time.
    redirectsarray of stringThe addresses the redirects led to, in order.
    requestsintegerRequests the page made while it was rendered.
    actionsarray of objectWhat each action of the input did, in order, up to and including the first that failed. Empty when none was asked for.
    type (in actions[])stringThe action's type.
    ok (in actions[])booleanTrue when the action was carried out.
    reason (in actions[])string or nullWhy it was not: element_not_found (nothing matched the selector in time), element_not_visible (what matched is not shown on the page), action_refused (text for a password, one-time-code or card field), out_of_time, or action_failed. Null when it was carried out.
    ms (in actions[])integerMilliseconds the action took.
    times (in actions[])integer or nullWith repeat: how many times the step was carried out. Null without it.
    render_msintegerMilliseconds the render took.
    fetched_atstring (date-time)When the render ended, in UTC.

    Example request

    # Start a run and wait up to 60 seconds for it to finish
    curl -X POST "https://api.enrichednow.com/v1/scrapers/web.render/runs?wait=60" \
      -H "Authorization: Bearer $ENRICHEDNOW_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{"input":{"url":"https://docs.widgetlib.org/en/stable/quickstart.html"}}'
    
    # Read its records, with the id the first call answered
    curl "https://api.enrichednow.com/v1/runs/$RUN_ID/records?limit=100" \
      -H "Authorization: Bearer $ENRICHEDNOW_API_KEY"
    from enrichednow import EnrichedNow
    
    client = EnrichedNow()  # reads ENRICHEDNOW_API_KEY
    
    # Start a run, wait for it to end, and get its records
    result = client.scrape("web.render", {
        "url": "https://docs.widgetlib.org/en/stable/quickstart.html",
    })
    print(result.run.id, result.run.status, result.run.record_count)
    
    # Read its records: pages are fetched as you go
    for record in result.records:
        print(record)

    Install it with pip install enrichednow, then save as run.py and run python3 run.py

    import EnrichedNow from "enrichednow";
    
    const client = new EnrichedNow(); // reads ENRICHEDNOW_API_KEY
    
    // Start a run, wait for it to end, and get its records
    const { run, records } = await client.scrape("web.render", {
      url: "https://docs.widgetlib.org/en/stable/quickstart.html",
    });
    console.log(run.id, run.status, run.record_count);
    
    // Read its records: pages are fetched as you go
    for await (const record of records) console.log(record);

    Install it with npm install enrichednow, then save as run.mjs and run node run.mjs

    package main
    
    import (
    	"context"
    	"fmt"
    	"log"
    	"time"
    
    	enrichednow "github.com/enrichednow/enrichednow-go"
    )
    
    func main() {
    	client, err := enrichednow.NewClient() // reads ENRICHEDNOW_API_KEY
    	if err != nil {
    		log.Fatal(err)
    	}
    	ctx, cancel := context.WithTimeout(context.Background(), 10*time.Minute)
    	defer cancel()
    
    	// Start a run, wait for it to end, and get its records
    	run, records, err := client.Scrape(ctx, "web.render", map[string]any{"url": "https://docs.widgetlib.org/en/stable/quickstart.html"})
    	if err != nil {
    		log.Fatal(err)
    	}
    	fmt.Println(run.ID, run.Status, run.RecordCount)
    
    	// Read its records: pages are fetched as you go
    	for records.Next() {
    		fmt.Println(string(records.Current()))
    	}
    	if err := records.Err(); err != nil {
    		log.Fatal(err)
    	}
    }

    Install it with go get github.com/enrichednow/enrichednow-go@latest, then save as run.go and run go run run.go

    import com.enrichednow.EnrichedNowClient;
    import com.enrichednow.ScrapeResult;
    import java.util.Map;
    
    public class Run {
        public static void main(String[] args) {
            EnrichedNowClient client = EnrichedNowClient.fromEnv(); // reads ENRICHEDNOW_API_KEY
    
            // Start a run, wait for it to end, and get its records
            ScrapeResult result = client.scrape("web.render", Map.of("url", "https://docs.widgetlib.org/en/stable/quickstart.html"));
            System.out.println(result.run().id() + " " + result.run().status() + " " + result.run().recordCount());
    
            // Read its records: pages are fetched as you go
            for (Map<String, Object> record : result.records()) {
                System.out.println(record);
            }
        }
    }

    Add com.enrichednow:enrichednow-java:0.4.0 to your Maven or Gradle build, then save as Run.java

    enrichednow run web.render --input url=https://docs.widgetlib.org/en/stable/quickstart.html

    Install it with curl -fsSL https://raw.githubusercontent.com/enrichednow/enrichednow-cli/main/install.sh | sh

    It starts a run with this scraper’s example input, waits for it to finish and reads its records a page at a time. The key is read from ENRICHEDNOW_API_KEY.

    The body on its own:

    JSON
    {
      "input": {
        "url": "https://docs.widgetlib.org/en/stable/quickstart.html"
      }
    }

    Example response

    The run, once it has ended. A run that has not ended within wait comes back with 202 and the status queued or running.

    JSON
    {
      "id": "run_841742f37553189ff9c27ba1",
      "scraper_id": "web.render",
      "scraper_version": 1,
      "status": "ok",
      "reason": null,
      "input": {
        "url": "https://docs.widgetlib.org/en/stable/quickstart.html"
      },
      "record_count": 1,
      "units": 1,
      "units_per_request": 1,
      "units_per_record": null,
      "units_per_page": null,
      "diagnostics": {
        "requests": 1,
        "bytes": 259214,
        "wall_ms": 885,
        "facts": {}
      },
      "created_at": "2026-11-16T22:37:50.170950Z",
      "started_at": "2026-11-16T22:37:50.178331Z",
      "finished_at": "2026-11-16T22:37:51.066313Z"
    }

    Its records, from GET /v1/runs/{id}/records. The record was read by this scraper's own parser from a page built by hand for its tests, because no real page could be recorded: its fields and shapes are the scraper's, its values are invented.

    JSON
    {
      "records": [
        {
          "url": "https://docs.widgetlib.org/en/stable/quickstart.html",
          "final_url": "https://docs.widgetlib.org/en/stable/quickstart.html",
          "status": 200,
          "headers": {
            "content-type": "text/html; charset=utf-8"
          },
          "content_type": "text/html",
          "html": "<!DOCTYPE html>\n<html class=\"writer-html5\" lang=\"en\">\n<head>\n  <meta charset=\"utf-8\" /><meta name=\"viewport\" content=\"width=device-width, initial-scale=1\" />\n  <title>Quickstart &mdash; widgetlib 2.4 documentation</title>\n  <base … [truncated]",
          "bytes": 3848,
          "truncated": false,
          "wait_satisfied": true,
          "redirects": [],
          "requests": 7,
          "actions": [],
          "render_ms": 480,
          "fetched_at": "2026-11-19T18:07:42.613126Z"
        }
      ],
      "next_cursor": null
    }

    What was done to the record for this page, and nothing else — the API returns every value whole. A text that was cut ends with … [truncated].

    • Shortened: html: 3,846 characters, the first 229 shown.

    A run does not always end ok. Results and statuses lists every status and the reasons every scraper shares; the reasons of the Web scrapers are in their own section there.