---
title: "Get best email addresses by GitHub username"
method: POST
path: "/users/best-email/by-login"
---

# Get best email addresses by GitHub username

`POST /users/best-email/by-login`

## Request

- Base URL: `https://api.bountylab.io/v3`
- URL: `https://api.bountylab.io/v3/users/best-email/by-login`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/bountylaboratories/apis/bounty-lab-public-api/docs/users/best-email/by-login/post.ts> (a function with typed inputs; its response is checked against the schema)

Fetch the best email address for GitHub users by their usernames (login). Uses intelligent selection to prioritize personal emails over work emails and verifies domain validity. Returns the best email plus all other email candidates. Supports batch requests (1-100 logins). Requires RAW service. Credits: 1 per result returned.

## Request body

- GetBestEmailByLoginRequest
  - `logins` string[], required: Array of GitHub usernames (1-100)
  - `signals` EmailSignals: Optional signal data for tracking email context (body, subject, sender)
    - `emailBody` string: Email body content for tracking
    - `emailSubject` string: Email subject for tracking
    - `sender` string: Sender identifier for tracking
    - `repoReasonForEmail` string: Provide the repo ID for why you are emailing the user
    - `reasonForEmailNaturalLanguage` string: Provide the reason for emailing the user in natural language

## Response `200`

Best emails retrieved successfully

- BestEmailResponse
  - `results` BestEmailResult[], required: Array of best email results
    - `githubId` string, required: GitHub node ID
    - `login` string, required: GitHub username
    - `bestEmail` string, nullable, required: Best email address, or null if none available
    - `otherCandidates` string[], required: Deprecated. Always returns an empty array.
    - `profile` 'WORK' | 'PERSONAL' | 'SCHOOL' | 'FORMER' | 'null', nullable, required: Email category: WORK (current-employer domain), PERSONAL, SCHOOL, or FORMER (a non-free domain that is NOT the current employer — likely to bounce, not a sendable current work address)
  - `count` number, required: Number of results returned

## Other responses

- `400`: Bad request - invalid input
- `401`: Unauthorized - API key missing
- `403`: Forbidden - Invalid API key or RAW service access denied
- `429`: Too Many Requests - Hourly credit limit exceeded

## Changes

- **2026-10-16** `fa6dbe462ebc`: 1 warning
  - added the new `FORMER` enum value to the `results/items/profile` response property for the response status `200`
- **2026-02-08** `da5c989e5333`: 1 warning
  - added the new `SCHOOL` enum value to the `results/items/profile` response property for the response status `200`
- **2026-02-08** `e48bb60651d2`: 1 info
  - added the required property `results/items/profile` to the response with the `200` status
- **2026-01-23** `5c9577c7441a`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/bountylaboratories/apis/bounty-lab-public-api/changes/users/best-email/by-login/post.md)

---

[API](https://skmtc.dev/bountylaboratories/apis/bounty-lab-public-api.md) - [All operations](https://skmtc.dev/bountylaboratories/apis/bounty-lab-public-api/llms.txt) - [OpenAPI document](https://skmtc.dev/bountylaboratories/apis/bounty-lab-public-api/revisions/fa6dbe462ebc?raw)
