Skip to the content
EnrichedNowDocs

    Type to search every page.

    Menu

    Scraper APIWeb

    web.screenshot

    Take a PNG or JPEG screenshot of one public web page: the window, the whole page or one element, on a desktop, tablet or phone.

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

    Start it with POST /v1/scrapers/web.screenshot/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.screenshot
    FieldTypeDescription
    urlrequiredstringThe page's address: http or https, on a public host name.Limit: at most 2048 characters.
    format"png" | "jpeg"The image format. JPEG is several times smaller for a page with photographs.Default: "png".
    qualityintegerFor JPEG: 1 (smallest) to 100 (best).Limit: 1 to 100. Default: 80.
    full_pagebooleanFalse: the window only. True: the whole page, top to bottom.Default: false.
    selectorstringA CSS selector: the picture is of the first element it matches instead of the window, e.g. #pricing.Limit: at most 200 characters.
    device"desktop" | "desktop_large" | "tablet" | "mobile"The device the page is shown on: desktop (1366 by 768), desktop_large (1920 by 1080), tablet (820 by 1180) or mobile (390 by 844). A tablet and a phone have a touch screen, a mobile browser's name and two image pixels per page pixel.Default: "desktop".
    viewport_widthintegerThe window's width in pixels, in place of the device's.Limit: 320 to 2560.
    viewport_heightintegerThe window's height in pixels, in place of the device's.Limit: 240 to 2160.
    wait_until"load" | "domcontentloaded" | "networkidle"What to wait for before the picture is taken: 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 the picture is taken, e.g. img.hero.Limit: at most 200 characters.
    wait_msintegerMilliseconds to wait after the other conditions.Limit: 0 to 10000. Default: 0.
    timeout_snumberSeconds for loading the page and taking the picture.Limit: 5 to 60. Default: 30.

    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.screenshot
    FieldTypeNotes
    urlstringThe address that was asked for.
    final_urlstringThe address of the page in the picture, after redirects.
    statusintegerThe HTTP status of the page's own document (a 404 page is still a page, and is in the picture).
    image_urlstring or nullWhere the image is downloaded from. The address works by itself until image_url_expires_at; after that, send your API key with it. The file is kept as long as the run's records.
    image_url_expires_atstring (date-time) or nullUntil when image_url works without an API key, in UTC.
    format"png" | "jpeg"The image's format.
    content_typestringThe image's media type: image/png or image/jpeg.
    widthintegerThe image's width in pixels.
    heightintegerThe image's height in pixels.
    bytesintegerThe image file's size in bytes.
    sha256stringThe SHA-256 of the image file, in hexadecimal.
    full_pagebooleanTrue when the whole page was asked for, not the window only.
    selectorstring or nullThe CSS selector of the element in the picture; null for the window or the page.
    devicestringThe device the page was shown on.
    viewport_widthintegerThe window's width in page pixels.
    viewport_heightintegerThe window's height in page pixels.
    truncatedbooleanTrue when the page was taller than a picture may be and the picture ends before the page does.
    wait_satisfiedbooleanFalse when the wait condition did not come true in time; the picture is of the page as it stood.
    render_msintegerMilliseconds loading the page and taking the picture took.
    fetched_atstring (date-time)When the picture was taken, 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.screenshot/runs?wait=60" \
      -H "Authorization: Bearer $ENRICHEDNOW_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{"input":{"url":"https://example.com/"}}'
    
    # 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.screenshot", {"url": "https://example.com/"})
    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.screenshot", { url: "https://example.com/" });
    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.screenshot", map[string]any{"url": "https://example.com/"})
    	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.screenshot", Map.of("url", "https://example.com/"));
            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.screenshot --input url=https://example.com/

    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://example.com/"
      }
    }

    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.screenshot",
      "scraper_version": 1,
      "status": "ok",
      "reason": null,
      "input": {
        "url": "https://example.com/"
      },
      "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 is a real one: this scraper's own parser read it from a page recorded from the site.

    JSON
    {
      "records": [
        {
          "url": "https://example.com/",
          "final_url": "https://example.com/",
          "status": 200,
          "image_url": null,
          "image_url_expires_at": null,
          "format": "png",
          "content_type": "image/png",
          "width": 1366,
          "height": 768,
          "bytes": 73213,
          "sha256": "4cc3b61f1186174f6ec7085cca0ab96bb2382cbecf37caf33c5bafd29b5393f8",
          "full_page": false,
          "selector": null,
          "device": "desktop",
          "viewport_width": 1366,
          "viewport_height": 768,
          "truncated": false,
          "wait_satisfied": true,
          "render_ms": 480,
          "fetched_at": "2026-11-19T18:07:42.616469Z"
        }
      ],
      "next_cursor": null
    }

    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.