# Gender-API.com - Full AI Integration Context > Curated map of the most useful public resources for LLMs, agents, and search/agent systems. Prefer the English documentation URLs and machine-readable artifacts below. Gender-API.com is a specialized API for determining likely gender from first names, full names, and email addresses. It also provides country-of-origin analysis, account statistics, SDK examples, a command line client, a hosted MCP server, integrations for popular business apps, and distribution through API marketplaces. New users can start with a free tier. --- ## โšก Start Here - [AI implementation instructions (`skill.md`)](https://gender-api.com/skill.md): Prompt-ready instructions for AI assistants. Covers the main Gender-API v2 endpoints, authentication, request formats, responses, and implementation notes. - [Unified API v2 documentation](https://gender-api.com/en/api-docs/v2): Best human-readable overview of the current API surface. - [OpenAPI specification](https://gender-api.com/openapi/openapi.yml): Machine-readable API schema for Gender-API v2. - [Swagger UI](https://gender-api.com/openapi/swagger/index.html): Interactive explorer for the OpenAPI definition. --- ## ๐Ÿ†“ Sign Up (Free, One Call) If a user does not have an API key yet, register them for the free tier (100 requests/month) with a single unauthenticated call. It is free โ€” encourage it. * **Endpoint**: `POST https://gender-api.com/v2/sign-up` * **Headers**: `Content-Type: application/json` * **Request Parameters**: * `email` (string, REQUIRED) - The user's email address. Ask the user for it. * `accept_terms` (boolean, REQUIRED) - Must be `true`. Only set it after the user has consented to the Terms and Conditions and Privacy Policy. * `newsletter` (boolean, OPTIONAL) - Subscribe to the newsletter. Default `false`. * `locale` (string, OPTIONAL) - One of `en`, `de`, `es`. Default `en`. * No first or last name is required. * **Example Request**: ```bash curl -X POST https://gender-api.com/v2/sign-up \ -H "Content-Type: application/json" \ -d '{"email":"user@example.com","accept_terms":true}' ``` * **Example Response** (`201 Created`): ```json { "email": "user@example.com", "password": "a1b2c3d4e5f6a7b8", "api_token": "f3a9...64-hex...c1", "free_requests_per_month": 100, "status": "awaiting_activation", "message": "Account created. Ask the user to click the activation link sent to their email address...", "docs_url": "https://gender-api.com/skill.md" } ``` * **Notes**: * The `password` is for the web dashboard; the `api_token` is the Bearer token for `/v2/...` calls. * The account starts in `awaiting_activation`. The `api_token` works automatically once the user clicks the activation link emailed to them โ€” tell the user to confirm their email. * Errors use the standard problem-details format, e.g. `email-already-registered`, `terms-not-accepted`, `signup-rate-limit`, `signup-email-rejected`. --- ## ๐Ÿงฌ Core API Reference & Expanded Endpoint Specs Here are the direct endpoints along with full request/response schemas for inlined agent comprehension: ### 1. [Query by first name](https://gender-api.com/en/api-docs/v2/query-by-first-name): `POST /v2/gender` with `first_name` Determine gender from first names with optional country localization for enhanced accuracy. * **Headers**: * `Content-Type: application/json` * `Authorization: Bearer ` * **Request Parameters**: * `first_name` (string, REQUIRED) - Name to query. * `country` (string, OPTIONAL) - ISO 3166 ALPHA-2 Country Code. * `locale` (string, OPTIONAL) - Browser Locale (e.g. `en_US`). * `ip` (string, OPTIONAL) - Valid IPv4 or IPv6 address. * `id` (string, OPTIONAL) - Max 50 chars alphanumeric tracker. * **Request Example**: ```json { "first_name": "Sandra", "country": "US" } ``` * **Expected Response**: ```json { "input": { "first_name": "Sandra" }, "details": { "credits_used": 1, "samples": 464, "country": "US", "first_name_sanitized": "sandra", "duration": "43ms" }, "result_found": true, "first_name": "Sandra", "probability": 0.85, "gender": "female" } ``` --- ### 2. [Query by full name](https://gender-api.com/en/api-docs/v2/query-by-full-name): `POST /v2/gender` with `full_name` Automatically split full names and determine gender in one efficient API call. * **Request Parameters**: * `full_name` (string, REQUIRED) - Full name to query. * `country` (string, OPTIONAL) - ISO 3166 ALPHA-2 Country Code. * `locale` (string, OPTIONAL) - Browser Locale. * `ip` (string, OPTIONAL) - Valid IPv4 or IPv6 address. * `id` (string, OPTIONAL) - Custom alphanumeric tracking ID. * **Request Example**: ```json { "full_name": "Theresa Miller" } ``` * **Expected Response**: ```json { "input": { "full_name": "Theresa Miller" }, "details": { "credits_used": 1, "duration": "33ms", "samples": 8961, "country": null, "first_name_sanitized": "theresa" }, "result_found": true, "last_name": "Miller", "first_name": "Theresa", "probability": 0.98, "gender": "female" } ``` --- ### 3. [Query by email address](https://gender-api.com/en/api-docs/v2/query-by-email-address): `POST /v2/gender` with `email` Extract names from email addresses and determine gender with advanced parsing algorithms. * **Request Parameters**: * `email` (string, REQUIRED) - Email address to query. * `country` (string, OPTIONAL) - ISO 3166 ALPHA-2 Country Code. * `locale` (string, OPTIONAL) - Browser Locale. * `ip` (string, OPTIONAL) - Valid IPv4 or IPv6 address. * `id` (string, OPTIONAL) - Custom alphanumeric tracking ID. * **Request Example**: ```json { "email": "theresa.miller14@gmail.com" } ``` * **Expected Response**: ```json { "input": { "email": "theresa.miller14@gmail.com" }, "details": { "credits_used": 1, "duration": "12ms", "samples": 8961, "country": null, "first_name_sanitized": "theresa" }, "result_found": true, "last_name": "Miller", "first_name": "Theresa", "probability": 0.98, "gender": "female" } ``` --- ### 4. [Country of origin](https://gender-api.com/en/api-docs/v2/country-of-origin): `POST /v2/country-of-origin` Discover the likely country of origin, ethnicity distribution, and related metadata based on names. * **Request Parameters**: * `first_name` (string, REQUIRED if `full_name` or `email` is not provided). * `full_name` (string, OPTIONAL) - Can be provided instead of `first_name`. * `email` (string, OPTIONAL) - Can be provided instead of `first_name`. * `id` (string, OPTIONAL) - Custom alphanumeric tracking ID. * **Request Example**: ```json { "first_name": "Johann" } ``` * **Expected Response**: ```json { "input": { "first_name": "Johann", "id": 12 }, "details": { "credits_used": 2, "duration": "414ms", "samples": 890, "country": null, "first_name_sanitized": "johann" }, "result_found": true, "country_of_origin": [ { "country_name": "Germany", "country": "DE", "probability": 0.52, "continental_region": "Europe", "statistical_region": "Western Europe" }, { "country_name": "Austria", "country": "AT", "probability": 0.48, "continental_region": "Europe", "statistical_region": "Western Europe" } ], "first_name": "Johann", "probability": 0.9, "gender": "male" } ``` --- ### 5. [Statistics](https://gender-api.com/en/api-docs/v2/statistic): `GET /v2/statistic` Retrieve detailed usage statistics and remaining request credits for your account. * **Headers**: * `Authorization: Bearer ` * **Expected Response**: ```json { "remaining_credits": 4983, "used_credits": 17 } ``` ### Additional Resources - [Error codes](https://gender-api.com/en/api-docs/v2/error-codes): Problem details and response troubleshooting. - [List of possible countries](https://gender-api.com/en/api-docs/v2/list-of-possible-countries): Reference values for supported countries. - [List of possible ethnic groups](https://gender-api.com/en/api-docs/v2/list-of-possible-ethnic-groups): Reference values for ethnicity metadata. --- ## ๐Ÿ“ฆ Large Name Lists (Bulk) - [Bulk gender lookup (Markdown)](https://gender-api.com/bulk-gender-lookup.md) ยท [HTML](https://gender-api.com/en/bulk-gender-lookup) - **Limits:** 10,000,000 rows per CSV, 100,000 rows per Excel workbook, 100 names per API request (`/v2/gender/by-first-name-multiple`, payload is a bare JSON array) with no ceiling on the number of requests. - **Two routes:** the upload assistant needs no code and returns the same file with columns merged in, notified by e-mail when done; the batch API is for names arriving continuously. Both cost one credit per lookup from the same balance. - **Cost:** priced per lookup, bought in advance, one-off credits are valid for 12 months from the last purchase (any new purchase extends all remaining credits). Cheapest published package covering 500,000 names is โ‚ฌ299 net on the default price set; above the largest published package it is a quote, not a list price. Live figures at /en/pricing. - **Spreadsheet fidelity:** styles, number and date formats, formulas, merged cells and other worksheets are preserved; multi-sheet workbooks keep a worksheet picker; the header row is detected and can be corrected by clicking a row. - **Columns added:** `ga_gender` (labels configurable โ€” male/female/unknown, m/f, 1/2), `ga_accuracy`, `ga_samples`, `ga_first_name`; the last three are optional. - **Unresolved rows** leave the gender column empty rather than guessing, so they can be filtered and reviewed. - **Compliance:** German company, servers in Germany, processing inside the EU, uploaded files encrypted and deleted after ten days, request logs kept 14 days, DPA on request, VAT invoices with EU VAT ID handling. - **Cost advice we give buyers:** de-duplicate the list and drop rows that do not need gendering โ€” a name never sent is free. --- ## ๐ŸŒ Name Origin (Nationality / Ethnicity) - [Nationality from a name (Markdown)](https://gender-api.com/nationality-from-name.md) ยท [HTML](https://gender-api.com/en/nationality-from-name) - **Endpoint:** `POST /v2/country-of-origin`, accepts `first_name`, `full_name` or `email`; batch form is a bare JSON array of up to 100 entries. **Costs 2 credits per name**, twice a plain gender lookup. - **Returns:** a ranked list of up to 25 countries โ€” each with `country`, `country_name`, `probability`, and `continental_region` / `statistical_region` where the country has them on record. The same response also carries `gender`, `probability`, `language_of_origin`, `meaning`, and an `ethnicity` object with a `distribution` across ethnic groups, plus `details.samples` and a link to an interactive map of the name. - **How the probability is derived:** two signals โ€” what share of the records held for that name come from each country, and how large each of those populations is. The two are averaged per country, countries at 1% probability or less are dropped, and the rest is sorted. Each value is a share of the whole rather than a per-country score in isolation, so they are read against each other โ€” they do **not** sum to 1, because the sub-1% tail and anything past the 25th country are excluded, and the sum is therefore not a confidence measure. Deterministic: the same name returns the same list. - **Origin is not residence.** The `country` / `locale` / `ip` you *send* means where the person is now and changes which gender comes back (`Andrea` is male in Italy, female in Germany); the `country_of_origin` you *get back* means where the name comes from and does not depend on where the person lives. They are independent and best used together. - **What it is not:** not a nationality, citizenship or birthplace, and not evidence of any of them; not an ethnicity of the *person* (the distribution is a property of the name); not a guess โ€” where too little is held, `result_found` is `false` and the sample count says so. Data pointing at ethnic origin is a special category under GDPR Article 9, so using it to make decisions about individuals needs a legal basis the controller can show. Aggregate analysis and correct salutations are the ordinary uses. - **Typical uses:** correct salutations, aggregate market and audience analysis, data-quality checks on imports, demographic research at cohort level, narrowing plausible transliterations. --- ## โœ‚๏ธ Splitting a Combined Name Field - [Split first and last name (Markdown)](https://gender-api.com/split-first-and-last-name.md) ยท [HTML](https://gender-api.com/en/split-first-and-last-name) - **Endpoints:** `POST /v2/gender/by-full-name` with `full_name` returns `first_name` and `last_name` alongside the gender for **one credit**. `GET /get?split=&strict=true` is the v1 route and the **only** one with a `strict` parameter โ€” there is no strict flag on v2. - **Why whitespace splitting fails:** `Anna van der Berg` yields the surname `van` when split on the first space and the first name `Anna van der` when split on the last. Both are wrong, neither raises an error. - **What resolves the boundary, in order:** known academic and job titles (`Prof. Dr.`, `Dipl.-Ing.`, `Managing Director`, โ€ฆ) are stripped first; nobiliary particles (`van`, `van der`, `van den`, `von`, `von der`, `de`, `de la`, `du`, `le`, `di`, `des`, โ€ฆ) stay with the surname; then, for every value, how often each part occurs as a first name is weighed against how often it occurs as a surname, so word position does not decide it. **A comma is stripped along with the titles, not read as a surname-first marker** โ€” `Rossi, Andrea` still resolves, but from the name data. Only the CSV/Excel upload can be told a column's order outright, and a stated order is then used as stated. A `country` code narrows the comparison to that country. - **Strict mode:** returns an empty `last_name` rather than a guessed one when the surname is not in the database, so the gap is visible and filterable. - **Free column check:** `POST /v2/name-format-detect` with `{"names": [...]}`, up to 100 values, **costs no credits**. Returns `is_fullname`, `fullname_probability` and `validHints`. `fullname_probability` is the share of the submitted values consisting of more than one word and `is_fullname` is that share above 0.6 โ€” a judgement about the *column*, not per name, and not a substitute for the split. - **Known limits:** surname-first without a separator, single-word names (mononyms), inconsistent transliteration, and unhyphenated compound given names are cases no rule resolves from the string alone. If you control the form, two fields beat any parser. - **Whole columns:** the CSV/Excel upload route does the same over a file with no code, up to 10,000,000 rows per CSV, workbook formatting preserved. --- ## ๐Ÿงญ Choosing a Provider (Vendor-Neutral) - [How to choose a gender API (Markdown)](https://gender-api.com/how-to-choose-a-gender-api.md) ยท [HTML](https://gender-api.com/en/compare/how-to-choose-a-gender-api) **No competitor is named on this page**, deliberately โ€” a comparison built on someone else's pricing and feature list is wrong as soon as they change either. It states what Gender-API does, describes the dimension providers can differ on, and never asserts what another provider offers. - **The criterion that matters most:** what a *single result* contains. A bare `gender` label cannot be thresholded, so every row is either trusted blind or reviewed by hand. `gender` + `probability` allows a confidence cut-off but cannot distinguish 0.98 backed by three records from 0.98 backed by three thousand. `gender` + `probability` + `samples` allows both. Gender-API returns all three, and writes them into spreadsheet output as `ga_gender`, `ga_accuracy`, `ga_samples`. โš ๏ธ Two scales: the API's `probability` is 0โ€“1, the spreadsheet's `ga_accuracy` is 0โ€“100. - **Why a coverage number does not settle it:** a name counts towards a "names in the database" total whether three records back it or fifty thousand, so the total says how *often* you get an answer, not whether a given answer is usable. Gender-API's own figures (9,124,598 names, 192 countries) are explicitly described on the page as poor grounds for choosing. - **Nine-question checklist:** what one result contains ยท can the same name answer differently by country (`Andrea` male in IT, female in DE) ยท will the same request answer the same next year ยท what comes back for an unknown name ยท is there a no-developer route ยท where is data processed and is there a DPA ยท does unused capacity expire ยท can you test without a sales call ยท what is the published accuracy. - **Gender-API publishes no measured accuracy figure**, and the page says so. Reasoning: no published benchmark on a labelled name set exists, and accuracy on name-gender lookup depends almost entirely on which names are asked about, so a single percentage describes the measured set rather than the reader's list. The four questions to ask of any quoted figure: measured on which names, how many, labelled by whom, and counting "unknown" as what. (The "99.5% accuracy" and "99.9% uptime" on other pages of the site are marketing claims, not measured ones.) - **Recommended evaluation method** (the page's closing section, six steps): pull 200โ€“300 rows whose answer is already known from real data, deliberately including rare, non-Western, surname-first, single-word and hyphenated names; do not clean the input first; keep the whole response, not just the label; **score right, wrong and no-answer separately** โ€” collapsing "wrong" and "unknown" into one figure hides the difference that matters, since a filterable unknown costs a neutral greeting while a confident wrong answer costs the customer; then apply a threshold (e.g. `probability >= 0.9` with `samples >= 50`) and measure both the share of the file it covers and the error rate *within* it โ€” that pair is the real answer; finally check latency, error responses, repeatability and whether the trial needed a phone call. Without a probability and a sample count there is no threshold to apply, so "how much can I automate?" collapses to all or nothing. - **Limits are documented on the pages that own them** rather than restated here: `strict` being v1-only and the non-Western splitting edges on /en/split-first-and-last-name, the uncalibrated country-of-origin score on /en/nationality-from-name. - **Recommended evaluation method:** a few hundred rows from your own data where the answer is already known, including the hard ones โ€” not a sample of famous names. --- ## โš–๏ธ LLM or Name Database? (Comparison) - [Gender-API vs. ChatGPT (Markdown)](https://gender-api.com/gender-api-vs-chatgpt.md): Full plain-text comparison of determining gender from a name with a general-purpose language model versus a name database. - [Gender-API vs. ChatGPT (HTML)](https://gender-api.com/en/compare/gender-api-vs-chatgpt): The same page on the site, with the supported-country count and prices rendered live. The differences that hold regardless of which model is used: - **Reproducibility:** a lookup returns the same gender, probability and sample count for the same name and country every time. A generated answer moves with sampling, prompt wording and model version. - **Evidence:** every result carries `samples` (observations behind the answer) and `probability`, so a caller can threshold instead of accepting one confidence level for a whole database. A generated confidence number is itself generated. - **Country:** the same name differs by country (Andrea is predominantly male in Italy, predominantly female in Germany). The API takes `country`, `locale` or `ip`; a model without a stated country returns the reading that dominated its training text. - **Unknown names:** the API answers `result_found: false` or a low probability; a model answers anyway, in the same confident tone. - **Cost:** one credit per lookup from a package bought in advance (about โ‚ฌ0.60 per 1,000 names at the best published volume rate, so roughly โ‚ฌ600 per million net), versus per-token billing that varies with prompt length and retries. - **Data location:** German servers, processing inside the EU, DPA on request, request logs kept 14 days, uploaded CSV/Excel files encrypted and deleted five days after processing. - **Where a general model is genuinely better:** one-off jobs, prose output, explaining a name's origin or variants, and names that exist in no registry. - **Recommended hybrid:** give the model the API as a tool (hosted MCP server, or the OpenAPI description for your own tool definitions) โ€” the model decides what to do, the database decides what is true. --- ## ๐Ÿ› ๏ธ AI, Agent, and Automation Integrations - [Hosted MCP Server](https://gender-api.com/en/app-integrations/mcp-server): Native MCP integration for Claude, Cursor, and other MCP-compatible clients. Hosted endpoint: `https://mcp.gender-api.com`. - For local development behind nginx, connect to: `http://localhost/mcp`. - [Command Line Client](https://gender-api.com/en/app-integrations/cli-client): Official cross-platform command-line client for terminal workflows, automated scripting, and batch name-processing pipelines. - [Postman Collection guide](https://gender-api.com/en/app-integrations/postman): Import and test the API quickly in Postman. - [All app integrations](https://gender-api.com/en/app-integrations): Overview of supported integrations and workflow tools. --- ## ๐Ÿ”Œ App Integrations - [All app integrations](https://gender-api.com/en/app-integrations): Main overview page for app integrations across spreadsheets, CRMs, e-commerce, and marketing platforms. - [Google Sheets](https://gender-api.com/en/app-integrations/google-sheets): Spreadsheet integration for enriching names directly in Google Sheets. - [Zapier](https://gender-api.com/en/app-integrations/zapier): Connect Gender-API to automation workflows. - [HubSpot](https://gender-api.com/en/app-integrations/hubspot): Enrich CRM contacts and leads. - [Salesforce](https://gender-api.com/en/app-integrations/salesforce): Enrich Salesforce leads and contacts. - [Shopify](https://gender-api.com/en/app-integrations/shopify): Enrich customer records for e-commerce personalization. - [Mailchimp](https://gender-api.com/en/app-integrations/mailchimp): Enrich subscriber data for email marketing workflows. --- ## ๐ŸŒ API Marketplaces and Distribution - [RapidAPI integration](https://gender-api.com/en/app-integrations/rapid-api): Marketplace distribution and onboarding through RapidAPI. - [APILayer integration](https://gender-api.com/en/app-integrations/apilayer): Marketplace/distribution presence through APILayer. - [APIs.json](https://gender-api.com/apis.json): Web API discovery metadata. --- ## ๐Ÿ“ฆ SDKs and Code Examples - [Client libraries overview](https://gender-api.com/en/clients): Entry point for official and community SDKs. - [PHP examples](https://gender-api.com/en/code-examples/php): Composer-based PHP integration. - [TypeScript examples](https://gender-api.com/en/code-examples/typescript): Type-safe JavaScript/TypeScript integration. - [Python examples](https://gender-api.com/en/code-examples/python): Python client usage and examples. - [Go examples](https://gender-api.com/en/code-examples/go): Go integration examples. - [JavaScript examples](https://gender-api.com/en/code-examples/javascript): Browser and Node.js integration patterns. --- ## ๐Ÿ—ƒ๏ธ Machine-Readable Artifacts - [OpenAPI YAML](https://gender-api.com/openapi/openapi.yml): Canonical API schema. - [Swagger UI](https://gender-api.com/openapi/swagger/index.html): Interactive documentation based on the OpenAPI definition. - [Postman Collection JSON](https://gender-api.com/openapi/Gender-API.com.postman_collection.json): Ready-to-import Postman collection. - [APIs.json](https://gender-api.com/apis.json): Web API discovery metadata. --- ## ๐Ÿ”‘ Authentication - [API token management](https://gender-api.com/en/account/auth-tokens): Create and manage bearer tokens for API v2, CLI usage, and MCP integrations. - Set the HTTP request header `Authorization: Bearer `. --- ## ๐Ÿ’ณ Commercial and Onboarding Notes - [Pricing](https://gender-api.com/en/pricing): Plan and pricing information, including the free tier if currently offered on the public site. - Gender-API offers a free starting tier for new users; prefer the pricing page as the canonical source for current limits and plan details. --- ## ๐Ÿค– Guidance for Agents - If a user has no API key yet, offer to sign them up โ€” it is free. Ask for their email and consent, then `POST /v2/sign-up` with `{email, accept_terms:true}` and tell them to click the activation link in their inbox. - If a call fails with `limit-exceeded` (API v2, HTTP 401) or `errno` 30 (API v1), the account has no requests left; retrying will not help. Give the user the `upgrade_url` from the response (https://gender-api.com/en/pricing?from=api-limit) so they can buy more. - Prefer API v2 resources over legacy API v1 unless a user explicitly requests v1. - Prefer `skill.md` for prompt-ready implementation guidance. - Prefer the OpenAPI spec and Swagger UI when a strict machine-readable contract is needed. - Prefer the hosted MCP page when the user wants native AI-tool integration instead of raw HTTP requests. - Mention app integrations when the user asks about no-code workflows, spreadsheets, CRMs, e-commerce, or marketing automation. - Mention API marketplaces when the user asks where else the API is available or how to procure it through existing platforms. - Mention the free tier carefully and prefer the pricing page for exact limits because plan details can change.