# Name Info (`apioracle/name-info`) Actor

Instantly analyze names to predict gender, country of origin, and name type (first vs. last). This API returns detailed probability scores to provide accurate global demographic insights. Perfect for data enrichment, cleaning, and user personalization.

- **URL**: https://apify.com/apioracle/name-info.md
- **Developed by:** [Leo Barone](https://apify.com/apioracle) (community)
- **Categories:** Lead generation, Social media, Agents
- **Stats:** 8 total users, 0 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.00 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## 🧠 Name Info API — Predict Gender, Origin & Name Type Instantly

**Name Info** is an Apify Actor that analyzes **any name** and instantly predicts its **gender**, **country of origin**, and whether it is more likely a **first name** or **last name**.\
It produces **rich probability scores**, global rankings, and detailed demographic insights — perfect for **data enrichment**, **CRM cleaning**, **user personalization**, and **identity analytics**.

You can submit **one or multiple names** as input, and the Actor will automatically return a structured dataset with all insights.

If you only need a lightweight API for **email → name/country/gender prediction**, you can use:
👉 **<https://apify.com/apioracle/email-info>**

***

### ✨ What can the Name Info Actor do?

With this Actor, you can:

- 🔍 **Predict gender** with probability scores
- 🌍 **Identify the likely country of origin** (+ ISO codes + emoji flags)
- 🧩 **Determine name type** (first name vs. last name)
- 📊 Get **probabilistic distribution** across countries
- 🏅 Access **country ranking data**
- 📦 Process **multiple names at once**
- ⚡ Benefit from Apify features like scheduling, API calls, integrations, and monitoring

This Actor provides **global demographic intelligence** with one API call.

***

### 📘 What data can the Name Info API return?

| Field | Description |
|-------|-------------|
| `matched_name` | Cleaned and matched version of the input name |
| `gender` | Predicted gender (`male`, `female`, or null) |
| `country` | Most likely country of origin |
| `country_iso_2`, `country_iso_3`, `country_flag` | Country codes & emoji flag |
| `type` | Whether the name is a first or last name |
| `male_probability` / `female_probability` | Gender confidence |
| `first_name_probability` / `last_name_probability` | Name type probabilities |
| `first_name_countries_probability` | Country probability distribution |
| `last_name_countries_probability` | Same for last-name probabilities |
| `first_name_countries_rank` | First-name rank by country |
| `last_name_countries_rank` | Last-name rank by country |

***

### 🚀 How to use Name Info Actor

1. Open the Actor in Apify Console
2. Enter one or more names in the input field
3. Click **Run**
4. Download the dataset as JSON/CSV/Excel
5. Or access results via API

#### Example input:

````json
{
  "names": ["John", "Miyamoto", "Fatima"]
}

# Actor input Schema

## `names` (type: `array`):

The names you want to lookup
## `extended` (type: `boolean`):

Include all the countries.

## Actor input object example

```json
{
  "names": [
    "Luke",
    "Mario"
  ],
  "extended": true
}
````

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "names": [
        "Luke",
        "Mario"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("apioracle/name-info").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "names": [
        "Luke",
        "Mario",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("apioracle/name-info").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "names": [
    "Luke",
    "Mario"
  ]
}' |
apify call apioracle/name-info --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,apioracle/name-info"
        }
    }
}

```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/io2tgFaLVdNOpNbLc/builds/MDUM7ORTeji8A9pYJ/openapi.json
