API documentationREST · JSONPHP · Python

Name Parser API.

Integrate our blazing fast RESTful API into your game, app or online application. It returns JSON objects that fit into any new or existing project, with documentation and examples for every endpoint.

GETParse a name
https://api.parser.name/?api_key=YOUR_KEY&endpoint=parse&name=John%20Bruch
Response200 OK
{
"results": 1,
"error": null,
"data": [{
"salutation": { "salutation": "Mr.", "initials": "J." },
"name": {
"firstname": { "name": "John", "gender_formatted": "male" },
"lastname": { "name": "Bruch", "validated": true }
},
"country": { "name": "United States", "country_certainty": 63 }
}]
}

Introduction

Our blazing fast RESTful API returns JSON objects that easily integrate into any new or existing project. For each endpoint listed below we have extensive documentation and code examples for PHP and Python.

All the endpoints are available via web app and API. To use our web app or API you need to create an account. After you activate your account you can start using the API or the example projects with your API key.

Example projects on GitHub

A list of available example projects for our API, with coding examples for different languages. Feel free to use all the provided examples within your new or existing projects.

We’re looking for some help to add more example projects, so feel free to contact us and discuss the possibilities.

Endpoints

Request objects

Each endpoint has different parameters. Three parameters are used globally: your API key, the response type and the gender type.

api_keyrequired

Your API key is required for every API call. Register for a free API key ›

93d471ea85d1937e713e8aafffb32090
response_typeoptional

The API returns JSON objects written in key/value pairs by default. If needed you can get the response as a JSON array instead.

objectarray
gender_typeoptional

Sets the wording of gender_formatted. By default the field returns “male” or “female”. You can change the formatting from sex (default) to gender, marital, birth or slang.

sexgendermaritalbirthslang

Response objects

The API returns JSON objects written in key/value pairs by default (JSON arrays are optional). The key is always a string and values are data types like string, integer, boolean, array or null. If a boolean, integer or string is empty the value contains a null. If an array is empty we return an empty array. Each response object has a structure like this:

{
"results": 1,
"error": null,
"error_code": null,
"data": []
}

The key results is an integer that tells you how many result objects you can expect in the data array. The error key will (hopefully) always be null, but if an error occurs it will contain a description as a string and the data array will be empty. Additionally, an appropriate status code will be returned.

The key error_code is the machine-readable version of the error. Your code can act on it without parsing the error message, which may change. Every error code is listed in our OpenAPI specification.

missing_api_key403

The request has no api_key.

invalid_api_key401

The API key does not exist, is disabled or is not valid anymore.

rate_limit_exceeded429

The rate limit per hour, day or month is reached. Retry-After tells how many seconds to wait.

unsupported_api_version400

The API-Version header asks for a major version we do not serve.

unknown_endpoint400

The endpoint parameter is missing or unknown.

endpoint_gone410

The endpoint is no longer available.

missing_name_or_email400

A parse request without name or email.

name_and_email_together400

A parse request with both name and email.

too_many_queries400

More names or email addresses than your plan allows per request.

invalid_country_code400

The country_code is not a supported two-letter code.

invalid_language400

The language is not one of en, nl, de, fr or es.

invalid_name400

The input does not seem to be a name.

invalid_email400

The input does not seem to be an email address.

invalid_gender400

The gender is not f or m.

invalid_results400

The number of results is not between 1 and 25.

name_not_found404

No name could be found in the name or email address.

some_items_failed200

Several names or email addresses were sent and at least one has its own error in data.

internal_error500

Something is broken on our side. Try again later.

Rate limits

To make sure our APIs are running as efficiently as possible we have rate limits. Depending on your subscription you can send a limited number of requests per hour. Paid subscriptions have a higher rate limit.

Per hourMoving windowEvery account
Per dayMoving windowFree accounts
Per monthFixed windowPaid subscriptions

The rate limits per day and per hour are a moving time window: for each request we look back in time and count how many requests were made during that window. The rate limit per month, for paid subscriptions, is a fixed window.

The rate limit applies to all endpoints except the account information endpoint. If you exceed the rate limit the response will contain an error and status code 429 will be raised. Requests that result in an error response are excluded from rate limit calculations.

Every rate-limited response carries the standard RateLimit-Policy and RateLimit headers. A response with status 429 also carries Retry-After with the number of seconds to wait. Your code can use these headers to slow down before it reaches the limit.

HTTP status codes

The API always returns the appropriate HTTP status code for every request. You can get the status code from the HTTP headers. Each endpoint has a code example showing how to use the status codes for error handling.

200OKSuccess.
400Bad RequestThe request is not valid: an unknown endpoint, a missing or invalid parameter, or a name that does not seem to be a name.
401UnauthorizedThe given API key does not exist, is disabled or is not valid.
403ForbiddenThe request is missing the API key.
404Not FoundNo name could be found in the request.
410GoneThe given endpoint is no longer available.
429Too Many RequestsThe rate limit per hour, day or month is reached.
500Internal Server ErrorSomething is broken.
502Bad GatewayOur service is down, or being upgraded.
503Service UnavailableThe servers are up but overloaded with requests.

HTTP headers

The HTTP headers allow us to pass additional information with the response. An HTTP header consists of its case-insensitive name followed by a colon and then its value, without line breaks. The API passes the following information with each response.

X-API-Version

Our API can be updated without notice. This header returns the version of the live API. Use it to detect updates programmatically. Changes can be found in our changelog.

X-Database-Version

Our name database can be updated without notice. This header returns the version of the live database. Use it to detect updates programmatically. Changes can be found in our changelog.

X-Execution-TimeAlways returned

Time in milliseconds (ms) it took to execute the request. Use this to track the performance of our API.

X-Requests-Remaining-HourAlways returned

Number of requests that you can still do in this hour. The rate limit per hour is a moving time window: it looks back an hour and counts the number of requests in that period.

X-Requests-Remaining-DayFree accounts only

Number of requests that you can still do during this 24 hour time window. The rate limit per day is a moving time window: it looks back 24 hours and counts the number of requests in that period.

X-Requests-Remaining-MonthPaid subscriptions only

Number of requests that you can still do during the current month.

RateLimit-PolicyRate-limited accounts

Your quotas in the format of the IETF RateLimit header fields: hour;q=100;w=3600, day;q=100;w=86400. q is the number of requests, w the window in seconds.

RateLimitRate-limited accounts

The requests still available per quota after this request: hour;a=39, day;a=39.

Retry-AfterStatus 429 only

The number of seconds until a request is possible again.

Deprecation, SunsetDeprecated versions only

The date a version or endpoint was deprecated, and the date after which it stops answering. See versioning below.

Versioning

Our API is versioned with HTTP headers, not with paths: it always runs on https://api.parser.name/. Every response returns the live version in X-API-Version as major.minor, and the version of the name database in X-Database-Version.

Minor versions only add endpoints, parameters or response fields. Breaking changes only come in a new major version. Send the optional request header API-Version: 2 to pin the major version you built against. A request for a major version we do not serve gets status 400 with error_code unsupported_api_version, never an answer in a format your code does not expect.

Before we retire a major version or an endpoint, its responses carry the Deprecation header (RFC 9745) and the Sunset header (RFC 8594). We announce it by email and on this page at least 12 months before the Sunset date.

Register for a free API key. Activate your account and start using the API or the example projects.