API Documentation

New! March 28, 2018: 1) JSON support and 2) the "related" function is available to all.

Behindthename.com's API is currently limited to three functions. Requests are made via HTTPS with parameters passed in the query string. Results are returned in XML or JSON format.

In all cases an API access key must be used. Visit the API gateway to get your API key.

Look up

This will return information about a given name.

XML URL: https://www.behindthename.com/api/lookup.xml
JSON URL: https://www.behindthename.com/api/lookup.json

Parameters:

parameterrequireddefaultdescription
keyY(none)your API access key
nameY(none)the name to look up
exactNnowhether the name supplied is exact (meaning there are no missing diacritics)

Return value: name details

XML example: https://www.behindthename.com/api/lookup.xml?name=mary&key=#key#
JSON example: https://www.behindthename.com/api/lookup.json?name=mary&key=#key#

Random Name

This will return a random name.

XML URL: https://www.behindthename.com/api/random.xml
JSON URL: https://www.behindthename.com/api/random.json

Parameters:

parameterrequireddefaultdescription
keyY(none)your API access key
genderN(none)gender to restrict names to (eg. f for feminine names)
usageN(none)usage to restrict names to (eg. eng for English-language names)
numberN2number of given names to return (max 6)
randomsurnameNnopass yes to generate a random surname as well

Return value: list of names

XML example: https://www.behindthename.com/api/random.xml?usage=ita&gender=f&key=#key#
JSON example: https://www.behindthename.com/api/random.json?usage=ita&gender=f&key=#key#

Related Names

This will return potential aliases for a given name.

XML URL: https://www.behindthename.com/api/related.xml
JSON URL: https://www.behindthename.com/api/related.json

Parameters:

parameterrequireddefaultdescription
keyY(none)your API access key
nameY(none)the name to look up
usageN(none)usage to restrict aliases to (eg. eng for English-language names)
genderN(none)gender to restrict aliases to (eg. f for feminine names)

Return value: list of names

XML example: https://www.behindthename.com/api/related.xml?name=richard&usage=eng&key=#key#
JSON example: https://www.behindthename.com/api/related.json?name=richard&usage=eng&key=#key#