Skip to the content
EnrichedNowDocs

    Type to search every page.

    Menu

    Scraper APIWeb

    web.speed

    Measure how fast and how heavy one public web page is on a phone or a desktop: load timings, Core Web Vitals, page weight, a 0-100 score and plain findings.

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

    Start it with POST /v1/scrapers/web.speed/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.speed
    FieldTypeDescription
    urlrequiredstringThe page's address: http or https, on a public host name.Limit: at most 2048 characters.
    device"mobile" | "desktop"mobile: a mid-range phone on a slow 4G connection (CPU four times slower, 1.47 Mbit/s down, 562 ms added to each request). desktop: a desktop window, neither slowed.Default: "mobile".
    runsintegerHow many times the page is loaded, each time with nothing cached. With more than one, the record is the run with the median score, which is steadier.Limit: 1 to 3. Default: 1.

    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.speed
    FieldTypeNotes
    urlstringThe address that was asked for.
    final_urlstringThe address of the page that was measured, after redirects.
    statusintegerThe HTTP status of the page's own document (a 404 page is still a page, and is measured).
    device"mobile" | "desktop"The device simulated. mobile: a 412 by 823 phone window, CPU four times slower, 1.47 Mbit/s down, 0.6 Mbit/s up and 562 ms added to each request. desktop: a 1350 by 940 window, neither slowed.
    runs_measuredintegerHow many loads were measured. With more than one, this record is the one with the median score.
    run_scoresarray of integerThe score of each load, in the order they were made; null for a load that could not be scored.
    scoreinteger or nullA 0 to 100 speed score (90 or more is good, under 50 is poor). It follows the method Lighthouse publishes, log-normal curves over FCP, LCP, TBT and CLS with Lighthouse's weights scaled to leave out Speed Index, but it is our own measurement from a single location and will not equal a score from another tool. For a page that did not finish (finished false) it rests on what had happened by then and may flatter the page. Null when one of the four was not measured.
    metric_scoresobjectEach of the four metrics' own 0 to 100 score.
    fcp (in metric_scores)integer or nullFirst Contentful Paint's score, 0 to 100.
    lcp (in metric_scores)integer or nullLargest Contentful Paint's score, 0 to 100.
    tbt (in metric_scores)integer or nullTotal Blocking Time's score, 0 to 100.
    cls (in metric_scores)integer or nullCumulative Layout Shift's score, 0 to 100.
    ttfb_msinteger or nullTime to First Byte: milliseconds from the start of the navigation to the first byte of the document, redirects included.
    fcp_msinteger or nullFirst Contentful Paint: milliseconds until the first text or image is shown. Null when nothing was painted.
    lcp_msinteger or nullLargest Contentful Paint: milliseconds until the largest text block or image in the window is shown. Null when the browser reported none.
    clsnumber or nullCumulative Layout Shift: how much the content jumps while loading, the worst session window. Under 0.1 is good, over 0.25 is poor.
    tbt_msinteger or nullTotal Blocking Time: milliseconds after First Contentful Paint during which long tasks kept the page from responding (each task's time past 50 ms).
    dom_content_loaded_msinteger or nullMilliseconds until the DOMContentLoaded event finished. Null when it did not happen in time.
    load_msinteger or nullMilliseconds until the load event finished. Null when the page had not finished loading when the measurement ended.
    lcp_elementstring or nullThe HTML tag of the largest element, e.g. img or h1. Null when the browser reported none.
    lcp_resource_urlstring or nullThe image the largest element shows. Null when it is text.
    total_bytesintegerBytes transferred for the whole page, headers included, compressed as they were sent.
    bytes_by_typeobjectThe same bytes by kind of file.
    html (in bytes_by_type)integerBytes of HTML documents, frames included.
    js (in bytes_by_type)integerBytes of JavaScript.
    css (in bytes_by_type)integerBytes of style sheets.
    image (in bytes_by_type)integerBytes of images.
    font (in bytes_by_type)integerBytes of web fonts.
    other (in bytes_by_type)integerBytes of everything else: video, audio and data requests.
    request_countintegerRequests the page and its frames made.
    failed_requestsintegerRequests that failed.
    unfinished_requestsintegerRequests still running when the measurement ended; their bytes so far are counted.
    third_party_domainsintegerHow many domains other than the page's own it loaded something from. A company's own second domain, such as a separate CDN address, counts as another.
    largest_resourcesarray of objectThe five largest files the page loaded, largest first.
    url (in largest_resources[])stringThe file's address.
    bytes (in largest_resources[])integerBytes transferred for it, headers included, compressed as it was sent.
    type (in largest_resources[])"html" | "js" | "css" | "image" | "font" | "other"What kind of file it is. other includes video and data requests.
    image_countintegerImage requests the page made.
    old_format_imagesintegerImages of 10 kB or more sent as JPEG, PNG, GIF, BMP or TIFF rather than a modern format such as WebP or AVIF.
    old_format_image_bytesintegerThe bytes of those images.
    oversized_imagesintegerImages at least 200 pixels wide stored more than 1.5 times wider than they are shown.
    http_versionstring or nullThe HTTP version the document came over: HTTP/1.1 or HTTP/2. Our browser does not use HTTP/3, so a site that offers it shows as HTTP/2.
    html_compressedboolean or nullTrue when the document was sent compressed (gzip, Brotli, zstd or deflate). Null when its response was not seen.
    html_encodingstring or nullThe document's content encoding, e.g. br or gzip. Null when it was sent without one.
    finishedbooleanFalse when the page had not finished loading in the time, or reached a limit on requests or bytes: its weight is then at least what is shown.
    findingsarray of stringPlain sentences on what is slow or heavy, each with its number, e.g. LCP 5.8 s: slower than 4 s or 3.1 MB of JavaScript. Empty when nothing stands out.
    render_msintegerMilliseconds the measurement took, all runs together.
    fetched_atstring (date-time)When the measurement 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.speed/runs?wait=60" \
      -H "Authorization: Bearer $ENRICHEDNOW_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{"input":{"url":"https://www.w3.org/"}}'
    
    # 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.speed", {"url": "https://www.w3.org/"})
    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.speed", { url: "https://www.w3.org/" });
    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.speed", map[string]any{"url": "https://www.w3.org/"})
    	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.speed", Map.of("url", "https://www.w3.org/"));
            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.speed --input url=https://www.w3.org/

    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://www.w3.org/"
      }
    }

    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.speed",
      "scraper_version": 1,
      "status": "ok",
      "reason": null,
      "input": {
        "url": "https://www.w3.org/"
      },
      "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://www.w3.org/",
          "final_url": "https://www.w3.org/",
          "status": 200,
          "device": "mobile",
          "runs_measured": 1,
          "run_scores": [
            96
          ],
          "score": 96,
          "metric_scores": {
            "fcp": 85,
            "lcp": 91,
            "tbt": 100,
            "cls": 100
          },
          "ttfb_ms": 889,
          "fcp_ms": 1996,
          "lcp_ms": 2420,
          "cls": 0.0237,
          "tbt_ms": 11,
          "dom_content_loaded_ms": 1993,
          "load_ms": 5104,
          "lcp_element": "img",
          "lcp_resource_url": "https://www.w3.org/cms-uploads/Hero-illustrations/groups-2025.svg",
          "total_bytes": 536289,
          "bytes_by_type": {
            "html": 9613,
            "js": 22092,
            "css": 54448,
            "image": 415204,
            "font": 34566,
            "other": 366
          },
          "request_count": 23,
          "failed_requests": 0,
          "unfinished_requests": 0,
          "third_party_domains": 0,
          "largest_resources": [
            {
              "url": "https://www.w3.org/cms-uploads/_920xAUTO_crop_center-center_none/ryan-quintal-US9Tc9pKNBU-unsplash.jpg",
              "bytes": 110649,
              "type": "image"
            },
            {
              "url": "https://www.w3.org/cms-uploads/_920xAUTO_crop_center-center_none/marvin-meyer-SYTO3xs06fU-unsplash.jpg",
              "bytes": 100458,
              "type": "image"
            }
          ],
          "image_count": 13,
          "old_format_images": 5,
          "old_format_image_bytes": 341338,
          "oversized_images": 1,
          "http_version": "HTTP/2",
          "html_compressed": true,
          "html_encoding": "br",
          "finished": true,
          "findings": [
            "First paint (FCP) 2.0 s: slower than the 1.8 s target",
            "5 images (341 kB) in JPEG, PNG or GIF rather than WebP or AVIF",
            "1 images stored much larger than they are shown"
          ],
          "render_ms": 1,
          "fetched_at": "2026-11-24T18:00:35.588058Z"
        }
      ],
      "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: largest_resources: 5 items, the first 2 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.