### Install Demografix Go SDK Source: https://genderize.io/documentation/api/sdk Install the Go package via go get. The package wraps all three APIs (gender, age, nationality) behind one API key. ```bash go get github.com/DemografixGenderize/demografix-go ``` -------------------------------- ### Install demografix with curl Source: https://genderize.io/documentation/cli One-line installer for macOS and Linux. Downloads and runs the install script from the demografix-cli repository. ```bash curl -fsSL https://raw.githubusercontent.com/DemografixGenderize/demografix-cli/main/install.sh | sh ``` -------------------------------- ### Install Demografix Ruby SDK Source: https://genderize.io/documentation/api/sdk Install the Ruby gem via gem install. The package wraps all three APIs (gender, age, nationality) behind one API key. ```bash gem install demografix ``` -------------------------------- ### Table output example Source: https://genderize.io/documentation/cli Example table output showing columns for name, gender, probability, and count. ```text name gender probability count peter male 1.00 1346866 ``` -------------------------------- ### Install Demografix Node SDK Source: https://genderize.io/documentation/api/sdk Install the Node package via npm. The package wraps all three APIs (gender, age, nationality) behind one API key. ```bash npm install demografix ``` -------------------------------- ### Install Demografix C# SDK Source: https://genderize.io/documentation/api/sdk Install the C# package via dotnet add package. The package wraps all three APIs (gender, age, nationality) behind one API key. ```bash dotnet add package Demografix ``` -------------------------------- ### JSONL output example Source: https://genderize.io/documentation/cli Example JSONL output when piped, one JSON object per line. ```json {"name":"peter","gender":"male","probability":1.0,"count":1346866} ``` -------------------------------- ### Install Demografix PHP SDK Source: https://genderize.io/documentation/api/sdk Install the PHP package via Composer. The package wraps all three APIs (gender, age, nationality) behind one API key. ```bash composer require demografix/demografix ``` -------------------------------- ### Basic usage with Go Source: https://genderize.io/documentation/api Use the net/http package to send a GET request and print the response body. ```go package main import ( "fmt" "io" "net/http" ) func main() { resp, _ := http.Get("https://api.genderize.io?name=peter") defer resp.Body.Close() body, _ := io.ReadAll(resp.Body) fmt.Println(string(body)) } ``` -------------------------------- ### Install Demografix Python SDK Source: https://genderize.io/documentation/api/sdk Install the Python package via pip. The package wraps all three APIs (gender, age, nationality) behind one API key. ```bash pip install demografix ``` -------------------------------- ### Example JSON response Source: https://genderize.io/documentation/api A sample response for the name 'peter', showing the fields returned by the API. ```json { "name": "peter", "gender": "male", "probability": 1.0, "count": 1346866 } ``` -------------------------------- ### Localized API Response Example Source: https://genderize.io/documentation/api Example JSON response when localization is applied. ```JSON { "name": "kim", "gender": "female", "probability": 0.94, "count": 62805, "country_id": "US" } ``` -------------------------------- ### Install demografix with Homebrew Source: https://genderize.io/documentation/cli Install demografix via Homebrew on macOS. Requires the Homebrew tap to be available. ```bash brew install demografixgenderize/tap/demografix ``` -------------------------------- ### Install Demografix Rust SDK Source: https://genderize.io/documentation/api/sdk Install the Rust crate via cargo add. The package wraps all three APIs (gender, age, nationality) behind one API key. ```bash cargo add demografix ``` -------------------------------- ### Basic usage with PHP Source: https://genderize.io/documentation/api Use file_get_contents to send a GET request and echo the response. ```php $response = file_get_contents("https://api.genderize.io?name=peter"); echo $response; ``` -------------------------------- ### Basic usage with Python Source: https://genderize.io/documentation/api Use the requests library to send a GET request and print the JSON response. ```python import requests response = requests.get("https://api.genderize.io", params={"name": "peter"}) print(response.json()) ``` -------------------------------- ### Basic usage with Ruby Source: https://genderize.io/documentation/api Use Net::HTTP to send a GET request and parse the JSON response. ```ruby require "net/http" require "json" response = Net::HTTP.get(URI("https://api.genderize.io?name=peter")) puts JSON.parse(response) ``` -------------------------------- ### Basic usage with JavaScript Source: https://genderize.io/documentation/api Use fetch to send a GET request and parse the JSON response. ```javascript const response = await fetch("https://api.genderize.io?name=peter"); const data = await response.json(); console.log(data); ``` -------------------------------- ### Basic usage with cURL Source: https://genderize.io/documentation/api Send a GET request with a name query parameter using cURL. ```bash curl "https://api.genderize.io?name=peter" ``` -------------------------------- ### Batch response JSON array Source: https://genderize.io/documentation/api Example response for a batch request with three names. The array is in the same order as the input names. ```json [ { "name": "peter", "gender": "male", "probability": 1.0, "count": 1346866 }, { "name": "lois", "gender": "female", "probability": 0.96, "count": 57781 }, { "name": "stewie", "gender": "male", "probability": 0.94, "count": 592 } ] ``` -------------------------------- ### Error response JSON example Source: https://genderize.io/documentation/api Example error response body returned when the API key is not recognized. The response includes an 'error' field with a message corresponding to the HTTP status code. ```json { "error": "Invalid API key" } ``` -------------------------------- ### Localize Predictions with Go Source: https://genderize.io/documentation/api Perform a GET request with the country_id query parameter. ```Go package main import ( "fmt" "io" "net/http" ) func main() { resp, _ := http.Get("https://api.genderize.io?name=kim&country_id=US") defer resp.Body.Close() body, _ := io.ReadAll(resp.Body) fmt.Println(string(body)) } ``` -------------------------------- ### Install Demografix Elixir SDK Source: https://genderize.io/documentation/api/sdk Add the Elixir dependency to your mix.exs. The package wraps all three APIs (gender, age, nationality) behind one API key. ```elixir {:demografix, "~> 1.0"} ``` -------------------------------- ### Endpoint URL Source: https://genderize.io/documentation/api The base URL for the Genderize API. All requests are GET requests to this endpoint. ```text https://api.genderize.io ``` -------------------------------- ### GET /?name[]=... Source: https://genderize.io/documentation/api Send a batch of up to 100 names to predict gender. The response is an array in the same order as the input. ```APIDOC ## [GET] /?name[]=... ### Description Send up to 100 names per request using repeated `name[]` parameters. The response is an array in the same order as the input. ### Method GET ### Endpoint https://api.genderize.io?name[]=peter&name[]=lois&name[]=stewie ### Parameters #### Query Parameters - **name[]** (string) - Required - Repeated parameter for each name to predict. Up to 100 names per request. ### Request Example ``` curl "https://api.genderize.io?name[]=peter&name[]=lois&name[]=stewie" ``` ### Response #### Success Response (200) - **name** (string) - The input name. - **gender** (string) - Predicted gender (e.g., "male" or "female"). - **probability** (number) - Probability of the prediction. - **count** (integer) - Number of data entries used for prediction. #### Response Example ``` [ { "name": "peter", "gender": "male", "probability": 1.0, "count": 1346866 }, { "name": "lois", "gender": "female", "probability": 0.96, "count": 57781 }, { "name": "stewie", "gender": "male", "probability": 0.94, "count": 592 } ] ``` ### Notes Each name in the batch counts toward your quota. A batch of 100 names consumes 100 from your monthly quota. ``` -------------------------------- ### GET /?name={name}&apikey={apikey} Source: https://genderize.io/documentation/api/reference Predicts the gender of a given name using the global frequency model. Requires an API key. ```APIDOC ## [GET] /?name={name}&apikey={apikey} ### Description Predicts the gender of a given name using the global frequency model. Requires an API key. ### Method GET ### Endpoint https://api.genderize.io?name={name}&apikey={apikey} ### Parameters #### Query Parameters - **name** (string) - Required - The first name to predict the gender for. - **apikey** (string) - Required - Your API key for authentication. ### Request Example ``` curl "https://api.genderize.io?name=peter&apikey=YOUR_API_KEY" ``` ### Response #### Success Response (200) - **name** (string) - The name that was queried. - **gender** (string) - The predicted gender (e.g., "male" or "female"). - **probability** (number) - The probability of the prediction. - **count** (number) - The number of records used for the prediction. #### Response Example ``` { "name": "peter", "gender": "male", "probability": 0.99, "count": 178742 } ``` ``` -------------------------------- ### GET https://api.genderize.io Source: https://genderize.io/documentation/api/reference Batch usage of the Genderize.io API to predict gender for up to 100 names per request. ```APIDOC ## [GET] https://api.genderize.io ### Description Send up to 100 names per request using repeated `name[]` parameters. The response is an array in the same order as the input. ### Method GET ### Endpoint https://api.genderize.io ### Parameters #### Query Parameters - **name[]** (string) - Required - The name to predict gender for. Can be repeated up to 100 times. ### Request Example ``` curl "https://api.genderize.io?name[]=peter&name[]=lois&name[]=stewie" ``` ### Response #### Success Response (200) - **name** (string) - The name that was queried. - **gender** (string) - The predicted gender (e.g., "male" or "female"). - **probability** (number) - The probability of the prediction. - **count** (integer) - The number of records used for the prediction. #### Response Example ``` [ { "name": "peter", "gender": "male", "probability": 1.0, "count": 1346866 }, { "name": "lois", "gender": "female", "probability": 0.96, "count": 57781 }, { "name": "stewie", "gender": "male", "probability": 0.94, "count": 592 } ] ``` ### Notes Each name in the batch counts toward your quota. A batch of 100 names consumes 100 from your monthly quota. ``` -------------------------------- ### GET https://api.genderize.io Source: https://genderize.io/documentation/api/reference Predicts gender from a name. Send a name as a query parameter and receive a prediction with probability and count. ```APIDOC ## GET https://api.genderize.io ### Description Predicts gender from a name. Send a name as a query parameter and receive a prediction with probability and count. ### Method GET ### Endpoint https://api.genderize.io ### Parameters #### Query Parameters - **name** (string) - Required - The name to predict gender for. Can be a full name or first name. ### Request Example curl "https://api.genderize.io?name=peter" ### Response #### Success Response (200) - **name** (string) - The name from the request, echoed exactly as sent. - **gender** (string) - "male" or "female". null when no prediction can be made. - **probability** (number) - Confidence of the prediction, between 0 and 1. - **count** (integer) - Data points the prediction was based on. #### Response Example { "name": "peter", "gender": "male", "probability": 1.0, "count": 1346866 } ``` -------------------------------- ### GET https://api.genderize.io Source: https://genderize.io/documentation/api The Genderize API predicts gender from a name. Send a name, receive a probability. Authentication uses an API key from your account dashboard. ```APIDOC ## [GET] https://api.genderize.io ### Description Predicts the gender of a given name. Send a name as a query parameter and receive the predicted gender, probability, and count of data points. ### Method GET ### Endpoint https://api.genderize.io ### Parameters #### Query Parameters - **name** (string) - Required - The name to predict gender for. Can be a full name or a first name. ### Request Example ``` curl "https://api.genderize.io?name=peter" ``` ### Response #### Success Response (200) - **name** (string) - The name from the request, echoed exactly as sent. - **gender** (string) - "male" or "female". null when no prediction can be made. - **probability** (number) - Confidence of the prediction, between 0 and 1. - **count** (integer) - Data points the prediction was based on. #### Response Example ``` { "name": "peter", "gender": "male", "probability": 1.0, "count": 1346866 } ``` ``` -------------------------------- ### GET / Source: https://genderize.io/documentation/api Predicts the gender of a given name. Requires an API key for authentication. Optionally accepts a country_id to scope the prediction to a specific country. ```APIDOC ## GET / ### Description Predicts the gender of a given name. Requires an API key for authentication. Optionally accepts a country_id to scope the prediction to a specific country. ### Method GET ### Endpoint https://api.genderize.io ### Parameters #### Query Parameters - **name** (string) - Required - The name to predict gender for. - **apikey** (string) - Required - Your API key for authentication. - **country_id** (string) - Optional - Two-letter ISO 3166-1 alpha-2 country code to scope the prediction. ### Request Example ``` curl "https://api.genderize.io?name=peter&apikey=YOUR_API_KEY" ``` ### Response #### Success Response (200) - **name** (string) - The name that was queried. - **gender** (string) - The predicted gender (e.g., "female"). - **probability** (number) - The probability of the prediction. - **count** (integer) - The number of records used for the prediction. - **country_id** (string) - The country code if localization was applied. #### Response Example ``` { "name": "kim", "gender": "female", "probability": 0.94, "count": 62805, "country_id": "US" } ``` ``` -------------------------------- ### GET / Source: https://genderize.io/documentation/api/reference The Genderize.io API returns a JSON object for single-name requests or an array for batch requests. Every response includes rate-limit headers. Errors return a JSON object with an error field and an appropriate HTTP status code. ```APIDOC ## GET / ### Description Returns gender predictions for given names. Success returns a JSON object for single-name requests or an array for batch requests. Errors return a JSON object with an error field and an appropriate HTTP status code. ### Method GET ### Endpoint / ### Response #### Success Response (200) - Returns a single JSON object for single-name requests, or an array for batch requests. Field shapes are documented under Basic usage. #### Response Example { "name": "peter", "gender": "male", "probability": 0.99, "count": 1832 } #### Rate-Limit Headers - **X-Rate-Limit-Limit** (integer) - Total names allowed in the current window. - **X-Rate-Limit-Remaining** (integer) - Names remaining in the current window. - **X-Rate-Limit-Reset** (integer) - Seconds until the window resets. #### Error Responses - **401** - Invalid API key - The key was not recognized. - **402** - Subscription is not active - The subscription tied to the key is paused, expired, or unpaid. - **422** - Missing 'name' parameter - No name was sent. - **422** - Invalid 'name' parameter - The name value is empty, too long, or otherwise malformed. - **429** - Request limit reached - The monthly quota or per-IP limit is exhausted. - **429** - Request too low to process - The request was throttled. Retry after a short delay. #### Error Response Example { "error": "Invalid API key" } ``` -------------------------------- ### GET /?name={name}&country_id={country_id} Source: https://genderize.io/documentation/api/reference Predicts the gender of a given name scoped to a specific country using the country_id parameter. Accepts a two-letter ISO 3166-1 alpha-2 country code. ```APIDOC ## [GET] /?name={name}&country_id={country_id} ### Description Predicts the gender of a given name scoped to a specific country. The country_id parameter is a two-letter ISO 3166-1 alpha-2 code. Without country_id, the API uses the global frequency model. ### Method GET ### Endpoint https://api.genderize.io?name={name}&country_id={country_id} ### Parameters #### Query Parameters - **name** (string) - Required - The first name to predict the gender for. - **country_id** (string) - Required - The two-letter ISO 3166-1 alpha-2 country code to scope the prediction. ### Request Example ``` curl "https://api.genderize.io?name=kim&country_id=US" ``` ### Response #### Success Response (200) - **name** (string) - The name that was queried. - **gender** (string) - The predicted gender (e.g., "male" or "female"). - **probability** (number) - The probability of the prediction. - **count** (number) - The number of records used for the prediction. - **country_id** (string) - The country code used for localization (echoed in the response). #### Response Example ``` { "name": "kim", "gender": "female", "probability": 0.94, "count": 62805, "country_id": "US" } ``` ``` -------------------------------- ### IMPORTAPI formula for Genderize API Source: https://genderize.io/documentation/spreadsheet/mixed-analytics Use this formula in Google Sheets to get gender predictions. Reference the cell holding the name (A2) and concatenate it into the URL. Drag down to enrich a list. Returns JSON; combine with QUERY or INDEX to extract fields. ```formula =IMPORTAPI("https://api.genderize.io/?name="&A2&"&apikey=YOUR_API_KEY") ``` -------------------------------- ### API URL Path for Genderize in Apipheny Source: https://genderize.io/documentation/spreadsheet/apipheny Set this as the API URL Path in Apipheny to get a gender prediction for a single name. Replace NAME with the cell range when using Apipheny's multiple query in one request mode to enrich a column. ```text https://api.genderize.io/?name=NAME&apikey=YOUR_API_KEY ``` -------------------------------- ### Preview cost with --dry-run Source: https://genderize.io/documentation/cli/spreadsheets Validates configuration and prints a plan (input rows, output, services, new columns, cost) without calling the API. Shows the exact plan layout; each enabled service bills one name per non-empty row. ```bash demografix enrich people.csv -o out.csv --gender --age --name-col full_name --dry-run ``` ```text plan input csv, 1200 rows output out.csv services gender, age name column full_name country none (global) new columns gender, gender_count, gender_probability, age, age_count cost 2400 names — no API calls made ``` -------------------------------- ### Batch request with PHP Source: https://genderize.io/documentation/api/reference Builds a query string with http_build_query and fetches the response using file_get_contents. Outputs the raw response. ```php $query = http_build_query(["name" => ["peter", "lois", "stewie"]]); $response = file_get_contents("https://api.genderize.io?$query"); echo $response; ``` -------------------------------- ### Batch request with Go Source: https://genderize.io/documentation/api/reference Uses net/http and net/url to send a batch of names. Prints the response body. ```go package main import ( "fmt" "io" "net/http" "net/url" ) func main() { q := url.Values{} for _, n := range []string{"peter", "lois", "stewie"} { q.Add("name[]", n) } resp, _ := http.Get("https://api.genderize.io?" + q.Encode()) defer resp.Body.Close() body, _ := io.ReadAll(resp.Body) fmt.Println(string(body)) } ``` -------------------------------- ### Authenticate with demografix login Source: https://genderize.io/documentation/cli Log in once to save your API key. Prompts for the key without echoing it and stores it at ~/.config/demografix/config.toml. ```bash demografix login ``` -------------------------------- ### Enrich a signup file Source: https://genderize.io/documentation/cli/spreadsheets Enriches signups.csv with gender, age, and nationality, writing to signups_enriched.csv. The output can then be pivoted for demographic analysis of the cohort. ```bash demografix enrich signups.csv -o signups_enriched.csv \ --gender --age --nationality --name-col full_name ``` -------------------------------- ### Authenticate API Requests with Go Source: https://genderize.io/documentation/api Use the net/http package to perform the authenticated request. ```Go package main import ( "fmt" "io" "net/http" ) func main() { resp, _ := http.Get("https://api.genderize.io?name=peter&apikey=YOUR_API_KEY") defer resp.Body.Close() body, _ := io.ReadAll(resp.Body) fmt.Println(string(body)) } ``` -------------------------------- ### Verify MCP server connection Source: https://genderize.io/documentation/mcp/claude-code Verifies the connection by listing configured MCP servers. Genderize should appear with a green status indicator. ```bash claude mcp list ``` -------------------------------- ### Resume after interruption with --resume Source: https://genderize.io/documentation/cli/spreadsheets A failed request does not abort the run; partial output is written. Re-run with --resume to fill only rows whose prediction columns are still empty. ```bash demografix enrich out.csv -o out.csv --gender --name-col full_name --resume ``` -------------------------------- ### Set nationality candidate count with --top-n Source: https://genderize.io/documentation/cli/spreadsheets For nationality, --top-n controls how many country candidates are appended (1 to 5, default 3). With --top-n 5, the output adds country_1 through country_5, a country_N_probability for each, and nationality_count. ```bash demografix enrich people.csv -o out.csv --nationality --name-col last_name --top-n 5 ``` -------------------------------- ### Authenticate API Requests with PHP Source: https://genderize.io/documentation/api Use file_get_contents to perform the authenticated request. ```PHP $response = file_get_contents( "https://api.genderize.io?name=peter&apikey=YOUR_API_KEY" ); echo $response; ``` -------------------------------- ### Batch request with Ruby Source: https://genderize.io/documentation/api/reference Uses net/http and json to send a batch of names. Parses and prints the JSON response. ```ruby require "net/http" require "json" uri = URI("https://api.genderize.io") uri.query = URI.encode_www_form("name[]" => ["peter", "lois", "stewie"]) puts JSON.parse(Net::HTTP.get(uri)) ``` -------------------------------- ### Batch name lookup with name[] parameters (cURL, Python, JavaScript, PHP, Ruby, Go) Source: https://genderize.io/documentation/api Send up to 100 names per request using repeated name[] parameters. The response is an array in the same order as the input. Each name in the batch counts toward your monthly quota; a batch of 100 names consumes 100 from the quota. ```bash curl "https://api.genderize.io?name[]=peter&name[]=lois&name[]=stewie" ``` ```python import requests response = requests.get( "https://api.genderize.io", params={"name[]": ["peter", "lois", "stewie"]}, ) print(response.json()) ``` ```javascript const params = new URLSearchParams(); ["peter", "lois", "stewie"].forEach(n => params.append("name[]", n)); const response = await fetch(`https://api.genderize.io?${params}`); console.log(await response.json()); ``` ```php $query = http_build_query(["name" => ["peter", "lois", "stewie"]]); $response = file_get_contents("https://api.genderize.io?$query"); echo $response; ``` ```ruby require "net/http" require "json" uri = URI("https://api.genderize.io") uri.query = URI.encode_www_form("name[]" => ["peter", "lois", "stewie"]) puts JSON.parse(Net::HTTP.get(uri)) ``` ```go package main import ( "fmt" "io" "net/http" "net/url" ) func main() { q := url.Values{} for _, n := range []string{"peter", "lois", "stewie"} { q.Add("name[]", n) } resp, _ := http.Get("https://api.genderize.io?" + q.Encode()) defer resp.Body.Close() body, _ := io.ReadAll(resp.Body) fmt.Println(string(body)) } ``` -------------------------------- ### Set DEMOGRAFIX_API_KEY environment variable Source: https://genderize.io/documentation/cli Set the API key as an environment variable for scripts and CI. Takes precedence over the saved key. ```bash export DEMOGRAFIX_API_KEY=your_api_key ``` -------------------------------- ### Authenticate API Requests with Ruby Source: https://genderize.io/documentation/api Use Net::HTTP to send the request with the apikey. ```Ruby require "net/http" require "json" uri = URI("https://api.genderize.io") uri.query = URI.encode_www_form(name: "peter", apikey: "YOUR_API_KEY") puts JSON.parse(Net::HTTP.get(uri)) ``` -------------------------------- ### Batch request with JavaScript Source: https://genderize.io/documentation/api/reference Uses fetch with URLSearchParams to send a batch of names. The response is logged to the console. ```javascript const params = new URLSearchParams(); ["peter", "lois", "stewie"].forEach(n => params.append("name[]", n)); const response = await fetch(`https://api.genderize.io?${params}`); console.log(await response.json()); ``` -------------------------------- ### MCP server configuration for multiple services Source: https://genderize.io/documentation/mcp JSON configuration to add the Genderize, Agify, and Nationalize MCP servers to a client. Each server uses the same API key as a bearer token in the headers. ```json { "mcpServers": { "genderize": { "url": "https://mcp.genderize.io", "headers": { "Authorization": "Bearer YOUR_API_KEY" } }, "agify": { "url": "https://mcp.agify.io", "headers": { "Authorization": "Bearer YOUR_API_KEY" } }, "nationalize": { "url": "https://mcp.nationalize.io", "headers": { "Authorization": "Bearer YOUR_API_KEY" } } } } ``` -------------------------------- ### Authenticate API Requests with Python Source: https://genderize.io/documentation/api Use the requests library to pass the apikey parameter. ```Python import requests response = requests.get( "https://api.genderize.io", params={"name": "peter", "apikey": "YOUR_API_KEY"}, ) print(response.json()) ``` -------------------------------- ### Batch request with Python Source: https://genderize.io/documentation/api/reference Uses the requests library to send a batch of names via the name[] parameter. The response is printed as JSON. ```python import requests response = requests.get( "https://api.genderize.io", params={"name[]": ["peter", "lois", "stewie"]}, ) print(response.json()) ``` -------------------------------- ### Authenticate API Requests with JavaScript Source: https://genderize.io/documentation/api Use the fetch API with URLSearchParams to include the apikey. ```JavaScript const url = new URL("https://api.genderize.io"); url.searchParams.set("name", "peter"); url.searchParams.set("apikey", "YOUR_API_KEY"); const response = await fetch(url); console.log(await response.json()); ``` -------------------------------- ### Authentication header for MCP server Source: https://genderize.io/documentation/mcp Send the API key as a bearer token in the Authorization header. Replace YOUR_API_KEY with your actual key from the dashboard. ```text URL: https://mcp.genderize.io Header: Authorization: Bearer YOUR_API_KEY ``` -------------------------------- ### Add Genderize MCP server via CLI Source: https://genderize.io/documentation/mcp/claude-code Adds the Genderize MCP server to Claude Code's user-scope config, making it available in every project. Replace YOUR_API_KEY with your dashboard key. ```bash claude mcp add --transport http genderize https://mcp.genderize.io \ --header "Authorization: Bearer YOUR_API_KEY" \ --scope user ``` -------------------------------- ### Prefix prediction columns with --prefix to avoid collisions Source: https://genderize.io/documentation/cli/spreadsheets A fresh run refuses to overwrite existing prediction columns. Add a prefix to the new column names when a collision would occur. ```bash demografix enrich people.csv -o out.csv --gender --name-col full_name --prefix pred_ ``` -------------------------------- ### Split first and last name columns with --first-name-col and --last-name-col Source: https://genderize.io/documentation/cli/spreadsheets When first and last names are in separate columns, use split mode by providing both column headers. The backslash line continuation is shown for readability. ```bash demografix enrich people.csv -o out.csv --gender \ --first-name-col first --last-name-col last ``` -------------------------------- ### Localize Predictions with PHP Source: https://genderize.io/documentation/api Include the country_id in the URL query string. ```PHP $response = file_get_contents( "https://api.genderize.io?name=kim&country_id=US" ); echo $response; ``` -------------------------------- ### Batch request with cURL Source: https://genderize.io/documentation/api/reference Sends a batch of names using repeated name[] parameters in a cURL command. The response is an array in the same order as the input. ```bash curl "https://api.genderize.io?name[]=peter&name[]=lois&name[]=stewie" ``` -------------------------------- ### Genderize API request URL for Note API Connector Source: https://genderize.io/documentation/spreadsheet/note-api-connector Use this URL pattern in Note API Connector, mapping the 'name' query parameter to a Notion text property (typically 'First name'). Replace YOUR_API_KEY with your actual key. ```text https://api.genderize.io/?name={{First name}}&apikey=YOUR_API_KEY ``` -------------------------------- ### Check quota Source: https://genderize.io/documentation/cli Print the remaining quota for your key. Every prediction command also prints a one-line quota summary to standard error; suppress it with -q. ```bash demografix quota ``` -------------------------------- ### Choose name column by index with --name-col Source: https://genderize.io/documentation/cli/spreadsheets Use a 1-based column index instead of a header name when the column holding names is known by position. Here the second column is used as the name column for gender prediction. ```bash demografix enrich people.csv -o out.csv --gender --name-col 2 ``` -------------------------------- ### Predict gender from standard input Source: https://genderize.io/documentation/cli Read one name per line from standard input to process a file of names in a single command. Groups names by country, batches 100 per request, and runs concurrently. ```bash demografix gender < names.txt ``` -------------------------------- ### Localize Predictions with Ruby Source: https://genderize.io/documentation/api Encode the country_id parameter in the URI query. ```Ruby require "net/http" require "json" uri = URI("https://api.genderize.io") uri.query = URI.encode_www_form(name: "kim", country_id: "US") puts JSON.parse(Net::HTTP.get(uri)) ``` -------------------------------- ### Localize Predictions with JavaScript Source: https://genderize.io/documentation/api Set the country_id search parameter using the URL API. ```JavaScript const url = new URL("https://api.genderize.io"); url.searchParams.set("name", "kim"); url.searchParams.set("country_id", "US"); const response = await fetch(url); console.log(await response.json()); ``` -------------------------------- ### Authenticate API Requests with apikey Source: https://genderize.io/documentation/api Pass your API key as an apikey query parameter to authenticate requests. ```cURL curl "https://api.genderize.io?name=peter&apikey=YOUR_API_KEY" ``` -------------------------------- ### Aggregate names to CSV Source: https://genderize.io/documentation/cli Write predictions to a CSV file for aggregating the gender split of a list. The output carries one row per name with the predicted gender. ```bash demografix gender < names.txt -o csv > predictions.csv ``` -------------------------------- ### Predict age and nationality Source: https://genderize.io/documentation/cli Use the same binary and key to predict age and nationality by swapping the command. ```bash demografix age peter demografix nationality nguyen ``` -------------------------------- ### Predict gender from arguments Source: https://genderize.io/documentation/cli Predict gender for names passed as command-line arguments. ```bash demografix gender peter lois meg ``` -------------------------------- ### Localize Predictions with Python Source: https://genderize.io/documentation/api Pass the country_id parameter in the requests params dictionary. ```Python import requests response = requests.get( "https://api.genderize.io", params={"name": "kim", "country_id": "US"}, ) print(response.json()) ``` -------------------------------- ### Edit JSON config for Genderize MCP Source: https://genderize.io/documentation/mcp/claude-code Directly edits ~/.claude.json to add the genderize entry under the top-level mcpServers key. Replace YOUR_API_KEY with your dashboard key. ```json { "mcpServers": { "genderize": { "type": "http", "url": "https://mcp.genderize.io", "headers": { "Authorization": "Bearer YOUR_API_KEY" } } } } ``` -------------------------------- ### Enrich a CSV file with gender, age, and nationality Source: https://genderize.io/documentation/cli/spreadsheets Basic invocation of demografix enrich on people.csv. Enabled services append prediction columns: --gender adds gender, gender_count, gender_probability; --age adds age and age_count; --nationality adds ranked country candidates and nationality_count. ```bash demografix enrich people.csv -o out.csv --gender --age --nationality --name-col full_name ``` -------------------------------- ### Localize Predictions with cURL Source: https://genderize.io/documentation/api Use the country_id parameter to scope predictions to a specific country. ```cURL curl "https://api.genderize.io?name=kim&country_id=US" ``` -------------------------------- ### MCP server endpoint URL Source: https://genderize.io/documentation/mcp The endpoint for the Genderize MCP server. Use this URL when configuring an MCP-compatible client. ```text https://mcp.genderize.io ``` -------------------------------- ### Output gender prediction as JSON Source: https://genderize.io/documentation/cli Override the output format with -o. Accepts table, json, jsonl, tsv, and csv. Defaults to table on a terminal and jsonl when piped. ```bash demografix gender peter -o json ``` -------------------------------- ### Scope gender and age by per-row country column Source: https://genderize.io/documentation/cli/spreadsheets Use --country-col to read a country value from a column for each row. This applies that country to gender and age predictions for the corresponding row. ```bash demografix enrich people.csv -o out.csv --gender --age --name-col full_name --country-col country ``` -------------------------------- ### Predict gender with country scope Source: https://genderize.io/documentation/cli Scope predictions to a country using --country with an ISO 3166-1 alpha-2 code. ```bash demografix gender andrea --country IT ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.