Skip to the content
EnrichedNowDocs

    Type to search every page.

    Menu

    Scraper APIGitHub

    github.search

    The public repositories GitHub's search finds for a query, a page at a time: name, description, stars, forks, language, topics, licence and dates.

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

    Start it with POST /v1/scrapers/github.search/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.search
    FieldTypeDescription
    queryrequiredstringWhat to search for, in GitHub's own search syntax: words, and qualifiers such as language:python, stars:>1000, topic:cli, user:pallets, pushed:>2026-01-01, in:readme.Limit: at least 1 characters, at most 256 characters.
    sort"best_match" | "stars" | "forks" | "updated"The order of the results: best_match, stars, forks or updated.Default: "best_match".
    order"desc" | "asc"With a sort other than best_match: desc (most first) or asc.Default: "desc".
    max_resultsintegerRepositories a page; 100 at most.Limit: 1 to 100. Default: 30.
    pageintegerThe results page, from 1. GitHub serves the first 1,000 results of a search.Limit: 1 to 1000. Default: 1.
    • query is GitHub's own search syntax: words, and qualifiers such as language:python, stars:>1000, topic:cli, user:pallets, pushed:>2026-01-01, license:mit, in:readme.
    • One run reads one page: max_results repositories, position counting on across pages. GitHub serves the first 1,000 results of a search, so page x max_results may not exceed 1,000.
    • A search nothing matches ends ok with zero records. One GitHub refuses as written ends failed with search_not_accepted — 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.search
    FieldTypeNotes
    positionintegerThe repository's place in the whole result list, from 1 (page 2 of 30 a page starts at 31).
    pageintegerThe results page the repository was on.
    full_namestringThe repository as owner/name.
    ownerstringThe account that owns the repository.
    namestringThe repository's own name, without the owner.
    urlstringThe repository's address on github.com.
    repository_idinteger or nullGitHub's numeric id of the repository.
    owner_typestring or null"User" or "Organization".
    descriptionstring or nullThe one-line description; null when the repository has none.
    homepagestring or nullThe website the repository links to; null when it names none.
    languagestring or nullThe main programming language GitHub detects; null when it detects none.
    topicsarray of stringThe topics the repository is tagged with.
    licensestring or nullThe licence's SPDX identifier, e.g. "MIT"; null when there is no licence file.
    starsinteger or nullHow many accounts starred the repository.
    forksinteger or nullHow many forks the repository has.
    open_issuesinteger or nullOpen issues and open pull requests together.
    default_branchstring or nullThe branch the repository opens on.
    created_atstring (date-time) or nullWhen the repository was created, in UTC.
    updated_atstring (date-time) or nullWhen the repository itself last changed, in UTC.
    pushed_atstring (date-time) or nullWhen code was last pushed, in UTC.
    is_forkboolean or nullTrue when the repository is a fork.
    is_archivedboolean or nullTrue when the repository is archived.
    fetched_atstring (date-time)When the results were 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.search/runs?wait=60" \
      -H "Authorization: Bearer $ENRICHEDNOW_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{"input":{"query":"web scraper language:python","sort":"stars","max_results":5}}'
    
    # 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.search", {
        "query": "web scraper language:python",
        "sort": "stars",
        "max_results": 5,
    })
    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.search", {
      query: "web scraper language:python",
      sort: "stars",
      max_results: 5,
    });
    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.search", map[string]any{"query": "web scraper language:python", "sort": "stars", "max_results": 5})
    	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.search", Map.of("query", "web scraper language:python", "sort", "stars", "max_results", 5));
            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.search --input 'query=web scraper language:python' --input sort=stars --input max_results=5

    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": {
        "query": "web scraper language:python",
        "sort": "stars",
        "max_results": 5
      }
    }

    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.search",
      "scraper_version": 1,
      "status": "ok",
      "reason": null,
      "input": {
        "query": "web scraper language:python",
        "sort": "stars",
        "max_results": 5
      },
      "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": [
        {
          "position": 1,
          "page": 1,
          "full_name": "unclecode/crawl4ai",
          "owner": "unclecode",
          "name": "crawl4ai",
          "url": "https://github.com/unclecode/crawl4ai",
          "repository_id": 798201435,
          "owner_type": "User",
          "description": "Official Crawl4AI Cloud: a hosted web scraping, extraction, and search API for AI agents. Free API key, 1,000 credits a month, no card. Fully open source: this repo is the Apache-2.0 crawler that powers it, and you can self-host it.",
          "homepage": "https://crawl4ai.com/?ref=github-about",
          "language": "Python",
          "topics": [
            "ai",
            "ai-agents",
            "crawl4ai-cloud"
          ],
          "license": "Apache-2.0",
          "stars": 87529,
          "forks": 9130,
          "open_issues": 350,
          "default_branch": "main",
          "created_at": "2024-05-09T09:48:50Z",
          "updated_at": "2026-11-18T21:36:09Z",
          "pushed_at": "2026-11-18T15:37:54Z",
          "is_fork": false,
          "is_archived": false,
          "fetched_at": "2026-11-19T18:07:40.285580Z"
        }
      ],
      "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: 16 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 GitHub scrapers are in their own section there.