Gender Prediction
/api/gender 1 credit(s) per call
Statistically predict the likely gender and probability for a given first name based on worldwide name frequency data.
Overview
The Gender Prediction API provides a statistical prediction of the likely gender for a given first name based on worldwide name frequency data from multiple sources. Optionally filter results by country using an ISO 3166-1 alpha-2 code.
Note: This API returns a population-level statistical prediction based on name frequency data. It does not determine or imply anyone's gender identity. Results reflect historical naming patterns and should not be used to make assumptions about individuals.
Endpoint
/api/gender
/api/gender/predict?name=Maria&country=US
Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| name | string | Yes | The first name to look up (case-insensitive) |
| country | string | No | ISO 3166-1 alpha-2 country code (e.g. GB, US) to filter results |
Response Fields
The response is wrapped in a standard API envelope:
| Field | Type | Description |
|---|---|---|
| success | boolean | true on success |
| data.name | string | The normalized name queried |
| data.predictedGender | string | Statistically predicted gender: male, female, or unisex |
| data.probability | double | Confidence of the prediction (0.00–1.00) |
| data.sampleSize | long | Total number of name records used for the prediction |
| data.country | string? | ISO country code if filtered, otherwise null |
| data.sources | array | List of data source names contributing to the result |
Example
Predict gender for a name:
curl -X POST https://simplewebapis.com/api/gender \
-H "Content-Type: application/json" \
-H "X-Api-Key: swa_your_key" \
-d '{"name": "Maria", "country": "US"}'
The response is a JSON object (Content-Type: application/json).
Try it out
Use the Playground to test this API live.