DEV Community

Cover image for # How to Build a Free Name Meaning & Origin Lookup Without API Keys
Parvez
Parvez

Posted on • Edited on

# How to Build a Free Name Meaning & Origin Lookup Without API Keys

If you want to build a name meaning and origin lookup tool — similar to নামের অর্থ কি? — but without the hassle of API keys or paid services, here’s a simple guide using public, free APIs.


Why This Matters

People are naturally curious about their names. Whether it's for naming a baby, exploring family roots, or just for fun, knowing the meaning, origin, gender, and popularity of a name adds real value.

If you're building a name-related tool, adding this kind of data makes your app or website more engaging and useful.


Free Public APIs — No API Key Required

These APIs work great together and don’t require any authentication:

API Purpose URL Example API Key?
Genderize Predict gender https://api.genderize.io?name=rahim No
Nationalize Predict nationality https://api.nationalize.io?name=rahim No
Agify Estimate age https://api.agify.io?name=rahim No

Example: Fetching Data with JavaScript

Here’s a basic example using vanilla JavaScript:

const name = "rahim";

Promise.all([
  fetch(`https://api.genderize.io?name=${name}`).then(res => res.json()),
  fetch(`https://api.nationalize.io?name=${name}`).then(res => res.json()),
  fetch(`https://api.agify.io?name=${name}`).then(res => res.json()),
])
.then(([genderData, nationalityData, ageData]) => {
  console.log({
    name,
    gender: genderData.gender,
    genderProbability: genderData.probability,
    nationalities: nationalityData.country,
    estimatedAge: ageData.age,
  });
})
.catch(console.error);


**Sample Output**

`{
  "name": "rahim",
  "gender": "male",
  "genderProbability": 0.99,
  "nationalities": [
    { "country_id": "BD", "probability": 0.45 },
    { "country_id": "PK", "probability": 0.30 }
  ],
  "estimatedAge": 34
}`

## Displaying the Info on Your Website

Here's how you might show the data on a webpage using plain HTML and JavaScript:

Enter fullscreen mode Exit fullscreen mode

Loading name information...

const name = "rahim";

Promise.all([
fetch(https://api.genderize.io?name=${name}).then(res => res.json()),
fetch(https://api.nationalize.io?name=${name}).then(res => res.json()),
fetch(https://api.agify.io?name=${name}).then(res => res.json()),
])
.then(([gender, nationality, age]) => {
const countries = nationality.country
.map(c => ${c.country_id} (${(c.probability * 100).toFixed(1)}%))
.join(", ");

document.getElementById("name-info").innerHTML = `
  নাম: ${name} <br/>
  লিঙ্গ: ${gender.gender} (প্রায়ঃ ${(gender.probability * 100).toFixed(1)}%) <br/>
  সম্ভাব্য দেশসমূহ: ${countries} <br/>
  আনুমানিক বয়স: ${age.age}
`;
Enter fullscreen mode Exit fullscreen mode

})
.catch(() => {
document.getElementById("name-info").textContent = "তথ্য লোড করতে সমস্যা হয়েছে।";
});



**Final Notes **

These APIs are free, open, and do not require any API key

They are great for quick projects, learning, or even production use if you cache responses

You can extend this tool by adding name meanings or origin data from other sources like:

- Behind the Name API
- Wikipedia
- Your own local dataset

If you're building something for Bengali-speaking users, this approach works well as a base. You can localize the frontend and combine results with your own dictionary database.
Enter fullscreen mode Exit fullscreen mode

Top comments (0)