Skip to the content
EnrichedNowDocs

    Type to search every page.

    Menu

    Scraper APIGitHub

    github.repository

    A public GitHub repository: description, stars, forks, watchers, open issues, language, topics, licence, the dates it was created and last pushed to, and its README.

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

    Start it with POST /v1/scrapers/github.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 github.repository
    FieldTypeDescription
    repositoryrequiredstringThe repository as owner/name, e.g. pallets/flask, or its address on github.com.Limit: at least 3 characters, at most 300 characters.
    include_readmebooleanAlso return the README's text; false leaves it out and makes the run lighter.Default: true.
    • repository is owner/name, or any address inside the repository on github.com. A repository asked for under an old name is returned under the name it has now.
    • source says where the record was read. It is api as a rule. When GitHub's allowance for visitors without an account is used up for the moment, the repository's page is read instead and source is page: language, open_issues, size_kb, pushed_at, updated_at, parent and the has_ flags are then null, and readme is plain text.
    • readme is the README file as written, whatever its format; readme_path names the file. A repository without one has both null. include_readme: false leaves it out.
    • open_issues counts open issues and open pull requests together. license is the SPDX identifier, NOASSERTION for a licence file GitHub cannot match.
    • 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 github.repository
    FieldTypeNotes
    full_namestringThe repository as owner/name, e.g. "pallets/flask".
    ownerstringThe account that owns the repository: a user's or an organisation's login.
    namestringThe repository's own name, without the owner.
    urlstringThe repository's address on github.com.
    sourcestringWhere the record was read: "api" (GitHub's public API) or "page" (the repository's page on github.com, read when the API has no answer left for the moment). From the page, language, open_issues, size_kb, parent, the dates other than created_at and the has_ flags are null, and the README is plain text.
    repository_idinteger or nullGitHub's numeric id of the repository; it stays the same when the repository is renamed.
    owner_typestring or null"User" or "Organization".
    descriptionstring or nullThe one-line description under the repository's name; null when it has none.
    homepagestring or nullThe website the repository links to; null when it names none.
    languagestring or nullThe main programming language GitHub detects, e.g. "Python"; null when it detects none.
    topicsarray of stringThe topics the owner tagged the repository with, e.g. ["python", "web-framework"].
    licensestring or nullThe licence's SPDX identifier, e.g. "MIT", "Apache-2.0"; "NOASSERTION" for a licence file GitHub cannot match; null when there is no licence file.
    license_namestring or nullThe licence's name, e.g. "BSD 3-Clause \"New\" or \"Revised\" License".
    starsinteger or nullHow many accounts starred the repository.
    forksinteger or nullHow many forks the repository has.
    watchersinteger or nullHow many accounts watch the repository (are notified of its activity).
    open_issuesinteger or nullOpen issues and open pull requests together, as GitHub counts them.
    default_branchstring or nullThe branch the repository opens on, e.g. "main".
    size_kbinteger or nullThe size of the repository in kilobytes.
    created_atstring (date-time) or nullWhen the repository was created, in UTC.
    updated_atstring (date-time) or nullWhen the repository itself last changed (a push, a star, an edited description), in UTC.
    pushed_atstring (date-time) or nullWhen code was last pushed to any branch, in UTC.
    is_forkboolean or nullTrue when the repository is a fork of another.
    parentstring or nullFor a fork, the repository it was forked from, as owner/name.
    is_archivedboolean or nullTrue when the owner archived the repository (read-only).
    is_templateboolean or nullTrue for a template repository.
    has_issuesboolean or nullTrue when the repository's issue tracker is on.
    has_wikiboolean or nullTrue when the repository's wiki is on.
    has_discussionsboolean or nullTrue when the repository's discussions are on.
    readmestring or nullThe README's text: the file as written (Markdown, reStructuredText, ...) when source is "api", its plain text when source is "page". Null when the repository has none, when include_readme was false, or when it could not be read.
    readme_pathstring or nullThe README file's path in the repository, e.g. "README.md".
    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/github.repository/runs?wait=60" \
      -H "Authorization: Bearer $ENRICHEDNOW_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{"input":{"repository":"pallets/flask"}}'
    
    # 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("github.repository", {"repository": "pallets/flask"})
    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("github.repository", { repository: "pallets/flask" });
    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, "github.repository", map[string]any{"repository": "pallets/flask"})
    	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("github.repository", Map.of("repository", "pallets/flask"));
            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 github.repository --input repository=pallets/flask

    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": "pallets/flask"
      }
    }

    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": "github.repository",
      "scraper_version": 1,
      "status": "ok",
      "reason": null,
      "input": {
        "repository": "pallets/flask"
      },
      "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": "pallets/flask",
          "owner": "pallets",
          "name": "flask",
          "url": "https://github.com/pallets/flask",
          "source": "api",
          "repository_id": 596892,
          "owner_type": "Organization",
          "description": "The Python micro framework for building web applications.",
          "homepage": "https://flask.palletsprojects.com",
          "language": "Python",
          "topics": [
            "flask",
            "jinja",
            "pallets"
          ],
          "license": "BSD-3-Clause",
          "license_name": "BSD 3-Clause \"New\" or \"Revised\" License",
          "stars": 75249,
          "forks": 17336,
          "watchers": 2153,
          "open_issues": 4,
          "default_branch": "main",
          "size_kb": 12227,
          "created_at": "2010-04-06T11:11:59Z",
          "updated_at": "2026-11-18T22:03:15Z",
          "pushed_at": "2026-10-30T15:05:22Z",
          "is_fork": false,
          "parent": null,
          "is_archived": false,
          "is_template": false,
          "has_issues": true,
          "has_wiki": false,
          "has_discussions": false,
          "readme": "<div align=\"center\"><img src=\"https://raw.githubusercontent.com/pallets/flask/refs/heads/stable/docs/_static/flask-name.svg\" alt=\"\" height=\"150\"></div>\n\n# Flask\n\nFlask is a lightweight [WSGI] web application framework. It is designed\nto … [truncated]",
          "readme_path": "README.md",
          "fetched_at": "2026-11-19T18:07:40.277931Z"
        }
      ],
      "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: topics: 7 items, the first 3 shown.
    • Shortened: readme: 1,639 characters, the first 236 shown.

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