PHP Legacy Client

Our legacy PHP implementation provides a simple, standalone solution for projects without Composer dependency. Gender-API.com delivers lightning-fast gender determination with 99.5% accuracy, processing names in under 100ms. This legacy client is perfect for older codebases and shared hosting environments. Unlike generic AI solutions that are slow and less accurate, our specialized API is purpose-built for name-gender associations with country-specific nuances. The simple manual integration requires just a few lines of code. Access our database of over 9 million names across 150+ countries. Start with 100 free API calls monthly and scale as needed. GDPR compliant and trusted globally.

First install our library with composer:

See full client documentation here:

https://github.com/markus-perl/gender-api-client

function getGender($firstname) {
  $myKey = 'insert your server key here';
  $data = json_decode(file_get_contents(
  'https://gender-api.com/get?key=' .
  $myKey .
  '&name=' . urlencode($firstname)));
  return $data->gender;
  }

  echo getGender('markus'); //Output: male

First install our library with npm:

See full client documentation here:

https://github.com/markus-perl/gender-api-client-npm

First install our library with npm:

See full client documentation here:

https://github.com/markus-perl/gender-api-client-npm

First install our library with pip:

See full client documentation here:

https://github.com/markus-perl/gender-api-client-python
https://pypi.org/project/gender-api-client/

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.

Chat