Quickstart
Get started with Bounty Lab in minutes using the TypeScript SDK.
Get started with Bounty Lab in minutes using the TypeScript SDK.
Prerequisites
Section titled “Prerequisites”- Node.js 18+ or Bun runtime
- A Bounty Lab account with an API key
Get Your API Key
Section titled “Get Your API Key”- Sign in to the Bounty Lab Dashboard
- Create an organization (if you haven’t already)
- Navigate to your organization settings
- Go to “API Keys” and click “Generate New Key”
- Copy and securely store your API key
Important: API keys are only shown once. Save them securely!
Install the SDK
Section titled “Install the SDK”npm install @bountylab/bountylab# orpnpm add @bountylab/bountylab# orbun add @bountylab/bountylabCreate a Client
Section titled “Create a Client”import Bountylab from "@bountylab/bountylab";
const client = new Bountylab({ apiKey: process.env.BOUNTYLAB_API_KEY,});Make Your First API Call
Section titled “Make Your First API Call”Search for Users
Section titled “Search for Users”// Search for TypeScript developers in San Franciscoconst result = await client.searchUsers.search({ query: "typescript engineer", filters: { field: "resolvedCity", op: "Eq", value: "San Francisco", }, maxResults: 10,});
console.log(`Found ${result.count} users`);result.users.forEach((user) => { console.log(`- ${user.login}: ${user.bio}`);});Search for Repositories
Section titled “Search for Repositories”// Find popular React component librariesconst result = await client.searchRepos.search({ query: "react component library", filters: { op: "And", filters: [ { field: "language", op: "Eq", value: "TypeScript" }, { field: "stargazerCount", op: "Gte", value: 1000 }, ], }, maxResults: 10,});
console.log(`Found ${result.count} repositories`);result.repositories.forEach((repo) => { console.log( `- ${repo.ownerLogin}/${repo.name} (${repo.stargazerCount} stars)`, );});Retrieve Specific Users or Repos
Section titled “Retrieve Specific Users or Repos”// Get users by loginconst result = await client.rawUsers.byLogin({ logins: ["torvalds", "gaearon"],});
console.log(`Found ${result.count} users`);
// Get repositories by full nameconst repos = await client.rawRepos.byFullname({ fullNames: ["facebook/react", "microsoft/typescript"],});
// Force refresh to get latest dataconst freshUser = await client.rawUsers.byLogin({ logins: ["octocat"], forceRefresh: true,});Next Steps
Section titled “Next Steps”- Explore search filters: See the Search Guide for advanced filtering options
- Query data in real-time: Use the GraphQL proxy to run custom queries
- Review API reference: Check out the full API documentation
- Build your application: Integrate Bounty Lab into your developer tools, analytics, or recruiting platform
Need Help?
Section titled “Need Help?”- API Documentation: api.bountylab.io/docs
- Support: Contact us through the dashboard