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

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' | 'null', nullable, required — Whether the email is a work or personal 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

---

[API](https://skmtc.net/bountylaboratories/apis/bounty-lab-public-api.md) · [All operations](https://skmtc.net/bountylaboratories/apis/bounty-lab-public-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/bountylaboratories/bounty-lab-public-api/revisions/910f8a49ca9e/schema)
