API & Developers
Access TheNameDB data programmatically. Free for non-commercial use with attribution.
Name Lookup
Look up a given name or surname by exact match.
GET /api/lookup?name={name}
Returns: found, type (given_name or surname), name, slug, meaning, origin, gender, url
Search
Search across given names, surnames, and historical people.
GET /api/search?q={query}
Returns an array of search results with name, type, slug, and content.
Name Popularity
Get year-by-year birth counts for a name (SSA data, 1880-2023).
GET /api/name-popularity/{name}
Returns an array of {year, count} objects.
Name Generator
Get random names with optional filters.
GET /api/name-generator?gender={M|F}&origin={origin}&letter={A-Z}
Returns an array of {name, slug, gender, origin, meaning} objects. All parameters are optional.
Family Names Analysis
Look up multiple names at once (2-6 names, comma-separated).
GET /api/family-names?names={name1},{name2},{name3}
Returns an array of results, each with input, found, found_as, and the full name data.
Name of the Day Widget
Get today's featured name.
GET /api/widget/notd
Returns {name, slug, meaning, origin, gender, url}.
Embeddable Widget
Add the "Name of the Day" widget to your website. Just paste this snippet:
The widget renders a styled card with today's featured name and links back to TheNameDB.
OG Image Cards
Get shareable social media cards (1200x630 PNG) for any name.
GET /api/og/name/{slug}
GET /api/og/surname/{slug}
Attribution
When using TheNameDB data, please include a link back to thenamedb.com. Example: