v43

latestOpenAPI 3.1.0raw.githubusercontent.com2026-03-0520621.8 MB

Search GitHub repositories

Semantic search across repository READMEs and descriptions using vector embeddings and cosine similarity. Results include relevance scores. Requires SEARCH service. Credits: 1 per result returned.

post/search/repos

Request body

maxResultsinteger

Maximum number of results to return (default: 100, max: 1000)

firstinteger

Alias for maxResults (takes precedence if both provided)

enablePaginationboolean

Enable cursor-based pagination to fetch results across multiple requests

afterstring

Cursor for pagination (from previous response pageInfo.endCursor)

applyFiltersToIncludeAttributesboolean

When true, applies the search filter to all user-returning includeAttributes (contributors, starrers). This filters the returned users to match the same criteria.

dataset'standard' | 'professional'

Which dataset to search. 'standard' uses the base namespace; 'professional' uses the LinkedIn-enriched namespace with additional owner LinkedIn fields.

Example request

{
  "maxResults": 50,
  "first": 50,
  "enablePagination": true,
  "after": "Y3Vyc29yOjEyMzQ1",
  "includeAttributes": {
    "owner": true,
    "contributors": {
      "first": 10
    },
    "starrers": {
      "first": 10
    }
  },
  "applyFiltersToIncludeAttributes": true,
  "dataset": "standard"
}

Response

Search results retrieved successfully

countnumber required

Number of repositories returned

Example response

{
  "repositories": [
    {
      "id": "9f0b8901cf1848298a60a60083b5aac0",
      "githubId": "MDEwOlJlcG9zaXRvcnkxMjk2MjY5",
      "ownerLogin": "octocat",
      "name": "Hello-World",
      "description": "My first repository on GitHub!",
      "stargazerCount": 1500,
      "language": "JavaScript",
      "totalIssuesCount": 150,
      "totalIssuesOpen": 42,
      "totalIssuesClosed": 108,
      "readmePreview": "# Hello World\n\nThis is my first repository...",
      "lastContributorLocations": [
        "San Francisco, CA",
        "Berlin, Germany"
      ],
      "createdAt": "2011-01-26T19:01:12Z",
      "updatedAt": "2024-01-15T12:30:00Z",
      "embeddedAt": "2024-01-15T14:00:00Z",
      "score": 0.08,
      "owner": {
        "id": "9f0b8901cf1848298a60a60083b5aac0",
        "githubId": "MDQ6VXNlcjU4MzIzMQ==",
        "login": "octocat",
        "displayName": "The Octocat",
        "bio": "I build things for GitHub",
        "company": "GitHub",
        "location": "San Francisco, CA",
        "websiteUrl": "https://github.blog",
        "socialAccounts": [
          {
            "provider": "twitter",
            "url": "https://twitter.com/github"
          }
        ],
        "emails": [
          "***at@github.com",
          "***hn@gmail.com"
        ],
        "resolvedCountry": "United States",
        "resolvedState": "California",
        "resolvedCity": "San Francisco",
        "createdAt": "2011-01-25T18:44:36Z",
        "updatedAt": "2024-01-15T12:30:00Z",
        "embeddedAt": "2024-01-15T14:00:00Z",
        "score": 0.12
      },
      "contributors": {
        "edges": [
          {
            "id": "9f0b8901cf1848298a60a60083b5aac0",
            "githubId": "MDQ6VXNlcjU4MzIzMQ==",
            "login": "octocat",
            "displayName": "The Octocat",
            "bio": "I build things for GitHub",
            "company": "GitHub",
            "location": "San Francisco, CA",
            "websiteUrl": "https://github.blog",
            "socialAccounts": [
              {
                "provider": "twitter",
                "url": "https://twitter.com/github"
              }
            ],
            "emails": [
              "***at@github.com",
              "***hn@gmail.com"
            ],
            "resolvedCountry": "United States",
            "resolvedState": "California",
            "resolvedCity": "San Francisco",
            "createdAt": "2011-01-25T18:44:36Z",
            "updatedAt": "2024-01-15T12:30:00Z",
            "embeddedAt": "2024-01-15T14:00:00Z",
            "score": 0.12
          }
        ]
      },
      "starrers": {
        "edges": [
          {
            "id": "9f0b8901cf1848298a60a60083b5aac0",
            "githubId": "MDQ6VXNlcjU4MzIzMQ==",
            "login": "octocat",
            "displayName": "The Octocat",
            "bio": "I build things for GitHub",
            "company": "GitHub",
            "location": "San Francisco, CA",
            "websiteUrl": "https://github.blog",
            "socialAccounts": [
              {
                "provider": "twitter",
                "url": "https://twitter.com/github"
              }
            ],
            "emails": [
              "***at@github.com",
              "***hn@gmail.com"
            ],
            "resolvedCountry": "United States",
            "resolvedState": "California",
            "resolvedCity": "San Francisco",
            "createdAt": "2011-01-25T18:44:36Z",
            "updatedAt": "2024-01-15T12:30:00Z",
            "embeddedAt": "2024-01-15T14:00:00Z",
            "score": 0.12
          }
        ]
      }
    }
  ],
  "count": 20
}