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
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
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
}