Skip to the content
EnrichedNowDocs

    Type to search every page.

    Menu

    Scraper APIDocker Hub

    dockerhub.repository

    A public image repository on Docker Hub: description, stars, pulls, dates, categories, and its most recent tags with their sizes and platforms.

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

    Start it with POST /v1/scrapers/dockerhub.repository/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 dockerhub.repository
    FieldTypeDescription
    repositoryrequiredstringThe repository: nginx for an official image, namespace/name such as grafana/grafana, or its address on hub.docker.com.Limit: at least 1 characters, at most 500 characters.
    max_tagsintegerReturn this many of the repository's tags, most recently pushed first; 0 returns none and saves a request.Limit: 0 to 100. Default: 10.
    include_readmebooleantrue also returns the repository's overview (its README).Default: false.
    • repository is the name as Docker writes it: nginx for an official image, namespace/name for any other. A tag or a docker.io/ prefix is ignored, and the repository's address on hub.docker.com works too.
    • An official image is under the namespace library and has is_official true.
    • tags is the most recently pushed tags first, max_tags of them, each with size_bytes, digest and platforms; tag_count is how many the repository has in all.
    • readme is the repository's overview in Markdown, returned only with include_readme: true.
    • A repository that does not exist, or is private, ends the run failed with not_found, and costs nothing — 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 dockerhub.repository
    FieldTypeNotes
    full_namestringThe repository as namespace/name, e.g. "grafana/grafana"; an official image is under "library", e.g. "library/nginx".
    namespacestringThe account or organisation the repository belongs to; "library" for an official image.
    namestringThe repository's own name.
    urlstringThe repository's page on hub.docker.com.
    is_officialbooleanTrue for a Docker Official Image.
    descriptionstring or nullThe repository's short description.
    readmestring or nullThe repository's overview (its README, in Markdown) when include_readme asked for it.
    starsinteger or nullHow many accounts starred the repository.
    pullsinteger or nullHow often the repository's images were pulled, in all.
    last_updated_atstring (date-time) or nullWhen an image was last pushed to the repository, in UTC.
    registered_atstring (date-time) or nullWhen the repository was created, in UTC.
    statusstring or nullThe repository's state in Docker Hub's words, e.g. "active".
    categoriesarray of stringThe categories Docker Hub lists the repository under, e.g. ["Web servers"].
    tag_countinteger or nullHow many tags the repository has; null when the tags were not asked for or could not be read.
    tagsarray of objectThe most recently pushed tags first, as many as max_tags asked for.
    name (in tags[])stringThe tag, e.g. "latest", "1.27-alpine".
    last_updated_at (in tags[])string (date-time) or nullWhen the tag was last pushed, in UTC.
    size_bytes (in tags[])integer or nullThe compressed size of the tag's image in bytes; for a tag with several platforms, the one Docker Hub shows first.
    digest (in tags[])string or nullThe tag's content digest (sha256:…); null where Docker Hub states none.
    platforms (in tags[])array of stringThe platforms the tag has an image for, e.g. ["linux/amd64", "linux/arm64/v8"].
    last_pulled_at (in tags[])string (date-time) or nullWhen the tag was last pulled, in UTC, where Docker Hub states it.
    fetched_atstring (date-time)When the repository 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/dockerhub.repository/runs?wait=60" \
      -H "Authorization: Bearer $ENRICHEDNOW_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{"input":{"repository":"nginx","max_tags":3}}'
    
    # 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("dockerhub.repository", {
        "repository": "nginx",
        "max_tags": 3,
    })
    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("dockerhub.repository", { repository: "nginx", max_tags: 3 });
    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, "dockerhub.repository", map[string]any{"repository": "nginx", "max_tags": 3})
    	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("dockerhub.repository", Map.of("repository", "nginx", "max_tags", 3));
            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 dockerhub.repository --input repository=nginx --input max_tags=3

    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": {
        "repository": "nginx",
        "max_tags": 3
      }
    }

    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": "dockerhub.repository",
      "scraper_version": 1,
      "status": "ok",
      "reason": null,
      "input": {
        "repository": "nginx",
        "max_tags": 3
      },
      "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": [
        {
          "full_name": "library/nginx",
          "namespace": "library",
          "name": "nginx",
          "url": "https://hub.docker.com/_/nginx",
          "is_official": true,
          "description": "Official build of Nginx.",
          "readme": null,
          "stars": 21422,
          "pulls": 13610589212,
          "last_updated_at": "2026-11-18T19:55:13.910348Z",
          "registered_at": "2014-06-05T19:14:45Z",
          "status": "active",
          "categories": [
            "Web servers"
          ],
          "tag_count": 1409,
          "tags": [
            {
              "name": "trixie-perl",
              "last_updated_at": "2026-11-18T19:55:11.281584Z",
              "size_bytes": 76072254,
              "digest": "sha256:9657d43040dc2a10c5697a68ab158c2ea50980c3338d5b1d876add119b92d346",
              "platforms": [
                "linux/amd64",
                "linux/ppc64le",
                "linux/386"
              ],
              "last_pulled_at": "2026-11-18T22:41:47.574035Z"
            },
            {
              "name": "stable-trixie-perl",
              "last_updated_at": "2026-11-18T19:55:06.331941Z",
              "size_bytes": 75784146,
              "digest": "sha256:39914e7bd94a6de938c6cf785ef6d1640a6810e5c027f97d7097ab8daa5596d8",
              "platforms": [
                "linux/amd64",
                "linux/ppc64le",
                "linux/386"
              ],
              "last_pulled_at": "2026-11-18T22:42:25.003976Z"
            }
          ],
          "fetched_at": "2026-11-19T18:07:40.050613Z"
        }
      ],
      "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: tags: 3 items, the first 2 shown.
    • Shortened: tags[0].platforms: 8 items, the first 3 shown.
    • Shortened: tags[1].platforms: 8 items, the first 3 shown.

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