Baby Names API

The Baby Names API provides tens of thousands of unique and popular baby names for boys, girls, and gender-neutral names.

/v1/babynames GET

https://api.api-ninjas.com/v1/babynames

Returns 10 baby name results.


Parameters

  • gender  optional

    Baby name gender. Must be one of the following: boy, girl, neutral

  • popular_only  optional

    Whether to only return popular (top 10%) of names. Must be either true or false. If unset, default is true.

Headers

  • X-Api-Key  required

    API Key associated with your account.

Sample Request Live Demo!

gender
https://api.api-ninjas.com/v1/babynames?gender=neutral

Sample Response

JSON
1 2 3 4 5 6 7 8 9 10 11 12 [ "Quinn", "Mackenzie", "Cody", "Kelly", "Duncan", "Shelby", "Shane", "Zane", "Jordan", "Lake" ]

Code Examples

1 2 3 4 5 6 7 8 9 import requests gender = 'neutral' api_url = 'https://api.api-ninjas.com/v1/babynames?gender={}'.format(gender) response = requests.get(api_url, headers={'X-Api-Key': 'YOUR_API_KEY'}) if response.status_code == requests.codes.ok: print(response.text) else: print("Error:", response.status_code, response.text)

If your programming language is not listed in the Code Example above, you can still make API calls by using a HTTP request library written in your programming language and following the above documentation.