Search GitHub repositories
client.searchRepos.search(SearchRepoSearchParams { query, after, applyFiltersToIncludeAttributes, 6 more } body, RequestOptionsoptions?): SearchRepoSearchResponse { count, repositories, pageInfo }
POST/search/repos
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.
Parameters
Returns
Search GitHub repositories
import Bountylab from '@bountylab/bountylab';
const client = new Bountylab({
apiKey: process.env['BOUNTYLAB_API_KEY'], // This is the default and can be omitted
});
const response = await client.searchRepos.search({ query: 'react component library with typescript' });
console.log(response.count);{
"count": 20,
"repositories": [
{
"id": "9f0b8901cf1848298a60a60083b5aac0",
"githubId": "MDEwOlJlcG9zaXRvcnkxMjk2MjY5",
"name": "Hello-World",
"ownerLogin": "octocat",
"stargazerCount": 1500,
"totalIssuesClosed": 108,
"totalIssuesCount": 150,
"totalIssuesOpen": 42,
"contributors": {
"edges": [
{
"id": "9f0b8901cf1848298a60a60083b5aac0",
"githubId": "MDQ6VXNlcjU4MzIzMQ==",
"login": "octocat",
"bio": "I build things for GitHub",
"company": "GitHub",
"createdAt": "2011-01-25T18:44:36Z",
"displayName": "The Octocat",
"emails": [
"***at@github.com",
"***hn@gmail.com"
],
"embeddedAt": "2024-01-15T14:00:00Z",
"location": "San Francisco, CA",
"resolvedCity": "San Francisco",
"resolvedCountry": "United States",
"resolvedState": "California",
"score": 0.12,
"socialAccounts": [
{
"provider": "twitter",
"url": "https://twitter.com/github"
}
],
"updatedAt": "2024-01-15T12:30:00Z",
"websiteUrl": "https://github.blog"
}
],
"pageInfo": {
"endCursor": "endCursor",
"hasNextPage": true
}
},
"createdAt": "2011-01-26T19:01:12Z",
"description": "My first repository on GitHub!",
"embeddedAt": "2024-01-15T14:00:00Z",
"language": "JavaScript",
"lastContributorLocations": [
"San Francisco, CA",
"Berlin, Germany"
],
"owner": {
"id": "9f0b8901cf1848298a60a60083b5aac0",
"githubId": "MDQ6VXNlcjU4MzIzMQ==",
"login": "octocat",
"bio": "I build things for GitHub",
"company": "GitHub",
"createdAt": "2011-01-25T18:44:36Z",
"displayName": "The Octocat",
"emails": [
"***at@github.com",
"***hn@gmail.com"
],
"embeddedAt": "2024-01-15T14:00:00Z",
"location": "San Francisco, CA",
"resolvedCity": "San Francisco",
"resolvedCountry": "United States",
"resolvedState": "California",
"score": 0.12,
"socialAccounts": [
{
"provider": "twitter",
"url": "https://twitter.com/github"
}
],
"updatedAt": "2024-01-15T12:30:00Z",
"websiteUrl": "https://github.blog"
},
"ownerDevrank": {
"community": 0,
"crackedScore": 0,
"createdAt": "createdAt",
"followersIn": 0,
"followingOut": 0,
"pc": 0,
"rawScore": 0,
"tier": "tier",
"trust": 0,
"updatedAt": "updatedAt"
},
"ownerProfessional": {
"awards": [
"string"
],
"certifications": [
"string"
],
"city": "city",
"connectionsCount": 0,
"country": "country",
"currentIndustry": "currentIndustry",
"departments": [
"string"
],
"education": [
{
"campus": "campus",
"endDate": "endDate",
"major": "major",
"specialization": "specialization",
"startDate": "startDate"
}
],
"experience": [
{
"company": "company",
"endDate": "endDate",
"industry": "industry",
"isCurrent": true,
"location": "location",
"startDate": "startDate",
"summary": "summary",
"title": "title"
}
],
"expertise": [
"string"
],
"firstName": "firstName",
"followerCount": 0,
"functionalArea": "functionalArea",
"headline": "headline",
"languages": [
"string"
],
"lastName": "lastName",
"linkedinUrl": "linkedinUrl",
"location": "location",
"memberships": [
"string"
],
"organization": "organization",
"patents": [
"string"
],
"priorIndustries": [
"string"
],
"publications": [
"string"
],
"seniority": "seniority",
"seniorityLevel": "seniorityLevel",
"state": "state",
"title": "title"
},
"readmePreview": "# Hello World\n\nThis is my first repository...",
"score": 0.08,
"starrers": {
"edges": [
{
"id": "9f0b8901cf1848298a60a60083b5aac0",
"githubId": "MDQ6VXNlcjU4MzIzMQ==",
"login": "octocat",
"bio": "I build things for GitHub",
"company": "GitHub",
"createdAt": "2011-01-25T18:44:36Z",
"displayName": "The Octocat",
"emails": [
"***at@github.com",
"***hn@gmail.com"
],
"embeddedAt": "2024-01-15T14:00:00Z",
"location": "San Francisco, CA",
"resolvedCity": "San Francisco",
"resolvedCountry": "United States",
"resolvedState": "California",
"score": 0.12,
"socialAccounts": [
{
"provider": "twitter",
"url": "https://twitter.com/github"
}
],
"updatedAt": "2024-01-15T12:30:00Z",
"websiteUrl": "https://github.blog"
}
],
"pageInfo": {
"endCursor": "endCursor",
"hasNextPage": true
}
},
"updatedAt": "2024-01-15T12:30:00Z"
}
],
"pageInfo": {
"endCursor": "endCursor",
"hasNextPage": true
}
}Returns Examples
{
"count": 20,
"repositories": [
{
"id": "9f0b8901cf1848298a60a60083b5aac0",
"githubId": "MDEwOlJlcG9zaXRvcnkxMjk2MjY5",
"name": "Hello-World",
"ownerLogin": "octocat",
"stargazerCount": 1500,
"totalIssuesClosed": 108,
"totalIssuesCount": 150,
"totalIssuesOpen": 42,
"contributors": {
"edges": [
{
"id": "9f0b8901cf1848298a60a60083b5aac0",
"githubId": "MDQ6VXNlcjU4MzIzMQ==",
"login": "octocat",
"bio": "I build things for GitHub",
"company": "GitHub",
"createdAt": "2011-01-25T18:44:36Z",
"displayName": "The Octocat",
"emails": [
"***at@github.com",
"***hn@gmail.com"
],
"embeddedAt": "2024-01-15T14:00:00Z",
"location": "San Francisco, CA",
"resolvedCity": "San Francisco",
"resolvedCountry": "United States",
"resolvedState": "California",
"score": 0.12,
"socialAccounts": [
{
"provider": "twitter",
"url": "https://twitter.com/github"
}
],
"updatedAt": "2024-01-15T12:30:00Z",
"websiteUrl": "https://github.blog"
}
],
"pageInfo": {
"endCursor": "endCursor",
"hasNextPage": true
}
},
"createdAt": "2011-01-26T19:01:12Z",
"description": "My first repository on GitHub!",
"embeddedAt": "2024-01-15T14:00:00Z",
"language": "JavaScript",
"lastContributorLocations": [
"San Francisco, CA",
"Berlin, Germany"
],
"owner": {
"id": "9f0b8901cf1848298a60a60083b5aac0",
"githubId": "MDQ6VXNlcjU4MzIzMQ==",
"login": "octocat",
"bio": "I build things for GitHub",
"company": "GitHub",
"createdAt": "2011-01-25T18:44:36Z",
"displayName": "The Octocat",
"emails": [
"***at@github.com",
"***hn@gmail.com"
],
"embeddedAt": "2024-01-15T14:00:00Z",
"location": "San Francisco, CA",
"resolvedCity": "San Francisco",
"resolvedCountry": "United States",
"resolvedState": "California",
"score": 0.12,
"socialAccounts": [
{
"provider": "twitter",
"url": "https://twitter.com/github"
}
],
"updatedAt": "2024-01-15T12:30:00Z",
"websiteUrl": "https://github.blog"
},
"ownerDevrank": {
"community": 0,
"crackedScore": 0,
"createdAt": "createdAt",
"followersIn": 0,
"followingOut": 0,
"pc": 0,
"rawScore": 0,
"tier": "tier",
"trust": 0,
"updatedAt": "updatedAt"
},
"ownerProfessional": {
"awards": [
"string"
],
"certifications": [
"string"
],
"city": "city",
"connectionsCount": 0,
"country": "country",
"currentIndustry": "currentIndustry",
"departments": [
"string"
],
"education": [
{
"campus": "campus",
"endDate": "endDate",
"major": "major",
"specialization": "specialization",
"startDate": "startDate"
}
],
"experience": [
{
"company": "company",
"endDate": "endDate",
"industry": "industry",
"isCurrent": true,
"location": "location",
"startDate": "startDate",
"summary": "summary",
"title": "title"
}
],
"expertise": [
"string"
],
"firstName": "firstName",
"followerCount": 0,
"functionalArea": "functionalArea",
"headline": "headline",
"languages": [
"string"
],
"lastName": "lastName",
"linkedinUrl": "linkedinUrl",
"location": "location",
"memberships": [
"string"
],
"organization": "organization",
"patents": [
"string"
],
"priorIndustries": [
"string"
],
"publications": [
"string"
],
"seniority": "seniority",
"seniorityLevel": "seniorityLevel",
"state": "state",
"title": "title"
},
"readmePreview": "# Hello World\n\nThis is my first repository...",
"score": 0.08,
"starrers": {
"edges": [
{
"id": "9f0b8901cf1848298a60a60083b5aac0",
"githubId": "MDQ6VXNlcjU4MzIzMQ==",
"login": "octocat",
"bio": "I build things for GitHub",
"company": "GitHub",
"createdAt": "2011-01-25T18:44:36Z",
"displayName": "The Octocat",
"emails": [
"***at@github.com",
"***hn@gmail.com"
],
"embeddedAt": "2024-01-15T14:00:00Z",
"location": "San Francisco, CA",
"resolvedCity": "San Francisco",
"resolvedCountry": "United States",
"resolvedState": "California",
"score": 0.12,
"socialAccounts": [
{
"provider": "twitter",
"url": "https://twitter.com/github"
}
],
"updatedAt": "2024-01-15T12:30:00Z",
"websiteUrl": "https://github.blog"
}
],
"pageInfo": {
"endCursor": "endCursor",
"hasNextPage": true
}
},
"updatedAt": "2024-01-15T12:30:00Z"
}
],
"pageInfo": {
"endCursor": "endCursor",
"hasNextPage": true
}
}