Skip to the content
EnrichedNowDocs

    Type to search every page.

    Menu

    Scraper APIBBC

    bbc.article

    An article on bbc.com: headline, byline, published and updated times, section, topics, full text and images.

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

    Start it with POST /v1/scrapers/bbc.article/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 bbc.article
    FieldTypeDescription
    urlrequiredstringThe article's address on bbc.com or bbc.co.uk, e.g. https://www.bbc.com/news/articles/c32l507ev4v4o or https://www.bbc.com/culture/article/20241231-how-audrey-hepburn-became-a-secret-spy-during-world-war-two.Limit: at least 1 characters, at most 2048 characters.

    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 bbc.article
    FieldTypeNotes
    urlstringThe article's address on bbc.com.
    article_idstringThe last part of that address: the article's id, e.g. c32l507ev4v4o, or its dated name on the feature sections.
    kindstring or nullWhat the page is, as the site names it: article or video.
    headlinestringThe headline.
    descriptionstring or nullThe one-line summary the page carries for search engines and link previews.
    bylinestring or nullThe authors' names as printed, joined with commas. Null for an article without a byline.
    authorsarray of objectThe byline, an entry per author. Empty for an article without one.
    name (in authors[])stringThe author's name as the byline prints it, without a leading By.
    role (in authors[])string or nullWhat the byline says under the name, e.g. Defence correspondent, near Kupyansk. Null when it says nothing.
    published_atstring (date-time) or nullWhen the article was first published, in UTC.
    updated_atstring (date-time) or nullWhen the article was last updated, in UTC.
    sectionstring or nullThe section the article is filed in, e.g. US & Canada, Culture.
    topicsarray of stringThe topics the page lists under the article.
    textstringThe article's text: its paragraphs in order, a blank line between them. A subheading is a paragraph of its own; an item of a list begins with - .
    subheadingsarray of stringThe subheadings inside the article, in order.
    word_countintegerThe number of words in text.
    imagesarray of objectThe images inside the article, in order.
    url (in images[])stringThe image, 1024 pixels wide.
    alt (in images[])string or nullThe image's description for readers who cannot see it.
    caption (in images[])string or nullThe caption printed under the image. Null when it has none.
    credit (in images[])string or nullThe copyright holder the page names, e.g. Getty Images.
    imagestring or nullThe image the page names as its own for link previews.
    fetched_atstring (date-time)When the page was read, 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/bbc.article/runs?wait=60" \
      -H "Authorization: Bearer $ENRICHEDNOW_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{"input":{"url":"https://www.bbc.com/news/articles/c32l507ev4v4o"}}'
    
    # 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("bbc.article", {
        "url": "https://www.bbc.com/news/articles/c32l507ev4v4o",
    })
    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("bbc.article", {
      url: "https://www.bbc.com/news/articles/c32l507ev4v4o",
    });
    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, "bbc.article", map[string]any{"url": "https://www.bbc.com/news/articles/c32l507ev4v4o"})
    	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("bbc.article", Map.of("url", "https://www.bbc.com/news/articles/c32l507ev4v4o"));
            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 bbc.article --input url=https://www.bbc.com/news/articles/c32l507ev4v4o

    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.bbc.com/news/articles/c32l507ev4v4o"
      }
    }

    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": "bbc.article",
      "scraper_version": 1,
      "status": "ok",
      "reason": null,
      "input": {
        "url": "https://www.bbc.com/news/articles/c32l507ev4v4o"
      },
      "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.bbc.com/news/articles/c32l507ev4v4o",
          "article_id": "c32l507ev4v4o",
          "kind": "article",
          "headline": "Inside the old gas pipeline where Ukraine is fighting an underground war",
          "description": "Ukrainian forces are fighting Russian troops in an old Soviet tunnel in the Kharkiv region.",
          "byline": "Jonathan Beale",
          "authors": [
            {
              "name": "Jonathan Beale",
              "role": "Defence correspondent, near Kupyansk"
            }
          ],
          "published_at": "2026-11-18T17:00:04.730000Z",
          "updated_at": "2026-11-18T18:35:41Z",
          "section": "Europe",
          "topics": [
            "Ukraine",
            "War in Ukraine",
            "Russia"
          ],
          "text": "There's a new front in the war in Ukraine, and it is underground.\n\nFor the past seven months Ukrainian forces have been living and fighting Russian troops in an old Soviet gas pipeline in the north-eastern Kharkiv region.\n\nWith a diameter … [truncated]",
          "subheadings": [],
          "word_count": 292,
          "images": [
            {
              "url": "https://ichef.bbci.co.uk/news/1024/cpsprodpb/3c3c/live/379082f0-e35c-11f1-a094-5fdc692f3e33.png",
              "alt": "Map showing the location of a gas pipeline in north-eastern Ukraine near Kupyansk. A red line marks the pipeline running from east to west to the north of the Kupyansk. The map indicates that the area in the north east of the map is … [truncated]",
              "caption": null,
              "credit": "BBC"
            }
          ],
          "image": "https://ichef.bbci.co.uk/news/1024/branded_news/b0a9/live/16401180-e337-11f1-9479-d17d3e98c29d.jpg",
          "fetched_at": "2026-11-19T18:07:39.062533Z"
        }
      ],
      "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: text: 1,678 characters, the first 238 shown.
    • Shortened: images[0].alt: 637 characters, the first 232 shown.

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