# Gender Detector API

> Gender Detector is a gender prediction API that estimates the likely gender of a person from their name. Pass a first name and get back the predicted gender as JSON, ready for salutations, profile defaults, or audience analysis.

**Endpoint:** `GET https://api.apiverve.com/v1/genderdetector`  
**Category:** Data Lookup  
**Cost:** 2 credits per call  
**Canonical page:** https://apiverve.com/marketplace/genderdetector

## Overview

Gender Detector works by analyzing the name provided and predicting the likely gender of the person. It uses a machine learning model trained on a large dataset of names and their associated genders to make the prediction.

## Authentication

Every call carries your key in an `x-api-key` header. The same key works across the whole
APIVerve catalog — there are no per-API subscriptions. Responses always use the same three
top-level keys: `status`, `error`, and `data`.

## Example request

```bash
curl "https://api.apiverve.com/v1/genderdetector?name=John%20Mcdonald&country=US" \
  -H "x-api-key: YOUR_API_KEY"
```

## Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `name` | string | Yes | The name for which you want to detect the gender |
| `country` | string | No | The country code for the name (e.g., US). Recorded and echoed back in the response, but detection does not yet vary by country - the same name returns the same gender whichever code you pass. default us. length 2-2 |

## Response fields

- `name` — string · The input name submitted for gender detection analysis
- `country` — string · The country code as submitted, echoed back. Detection does not yet vary by country
- `detected` — boolean · Always true on a successful response - a name the detector cannot place returns a 404 rather than detected: false
- `gender` — string · The predicted gender of the person based on name analysis

## Sample response

```json
{
  "status": "ok",
  "error": null,
  "data": {
    "name": "John Mcdonald",
    "country": "US",
    "detected": true,
    "gender": "male"
  }
}
```

## Use cases

- **Email Salutation Selection** — When drafting automated outreach, sales platforms choose correct honorifics and greeting styles based on the predicted gender returned for each recipient.
- **Account Profile Onboarding** — Assign default avatars and profile pronouns automatically when a user signs up by matching their entered first name against regional gender predictions.
- **Audience Demographic Audits** — To evaluate subscriber breakdowns without intrusive survey forms, newsletter editors tabulate aggregate gender distributions across their imported subscriber lists.
- **Personalized Catalog Navigation** — Ecommerce fashion apps preselect relevant apparel landing tabs for new accounts by checking customer first names against country-specific gender results.

## SDKs

- **npm** — `npm install @apiverve/genderdetector` (https://www.npmjs.com/package/@apiverve/genderdetector)
- **PyPI** — `pip install apiverve-genderdetector` (https://pypi.org/project/apiverve-genderdetector/)
- **NuGet** — `dotnet add package APIVerve.API.GenderDetector` (https://www.nuget.org/packages/APIVerve.API.GenderDetector)
- **Source** — https://github.com/apiverve/genderdetector-api

## More

- Full reference: https://docs.apiverve.com/ref/genderdetector
- Get an API key: https://dashboard.apiverve.com
- Full catalog: https://apiverve.com/marketplace
