TypeScript Client
Type-safe TypeScript client for Gender-API.com with full IntelliSense support and strict type checking. Our AI-powered API delivers 99.5% accurate gender detection 10x-90x faster than generic AI models like ChatGPT. Perfect for modern web applications, Node.js backends, and Angular/React/Vue projects. The strongly-typed interfaces ensure compile-time safety and excellent developer experience. Access our specialized database of over 9 million names across 150+ countries with country-specific accuracy. Unlike generic LLMs, our API is purpose-built for name-gender associations with smart normalization and continuous learning. Start free with 100 monthly API calls. GDPR compliant and production-ready.
First install our library with npm:
npm install gender-api.com-client --save
import { Client } from 'gender-api.com-client';
const client = new Client('your-api-key');
// Simple gender lookup
const result = await client.getByFirstName('Theresa');
console.log(`${result.first_name} is ${result.gender} (Probability: ${result.probability}`);
// First name with country (e.g., "Andrea" varies by country)
const resultWithCountry = await client.getByFirstName('Andrea', { country: 'IT' });
console.log(`${resultWithCountry.first_name} in Italy is ${resultWithCountry.gender}`);
// Full name with automatic first/last name splitting
const fullResult = await client.getByFullName('John Smith');
console.log(`${fullResult.first_name} ${fullResult.last_name} is ${fullResult.gender}`);
// Email address analysis
const emailResult = await client.getByEmailAddress('marie.curie@example.com');
console.log(`Email gender: ${emailResult.gender}`);
// Batch processing - multiple names in one call
const names = [
{ id: '1', first_name: 'Theresa', country: 'US' },
{ id: '2', first_name: 'John', country: 'US' }
];
const batchResults = await client.getByFirstNameMultiple(names);
batchResults.forEach(r => {
console.log(`ID: ${r.input.id}, Gender: ${r.gender}`);
});
// Account statistics
const stats = await client.getStatistics();
console.log(`Credits Remaining: ${stats.remaining_credits}`);
See full client documentation here:
Professional Gender Detection for Your Applications
Gender-API.com delivers enterprise-grade gender detection with 99.5% accuracy across 150+ countries. Our specialized API outperforms generic AI solutions with 10x-90x faster response times and 9-34% better accuracy.
Why Choose Gender-API Over Generic AI?
- Purpose-Built : Specialized for gender detection, not a general-purpose AI
- Lightning Fast : Sub-100ms response times vs. seconds for generic AI
- More Accurate : 99.5% accuracy with cultural and regional intelligence
- Larger Database : 9+ million names, 37% more than typical AI training data
- Reliable : 99.9% uptime SLA with predictable performance
Key Features
- Easy integration with just a few lines of code
- Batch processing for high-volume applications
- Country-specific accuracy for regional name variations
- Smart normalization handling typos and variants
- GDPR compliant and enterprise-ready
Start Free Today
Get 100 free API calls per month with no credit card required. Scale as you grow with flexible pricing for every use case.