Gender API

Déterminez le sexe à partir d'un prénom, d'un nom complet ou d'un courriel.

https://api.genderapi.io/api/?name={name}
{
    name:"{name}",
    gender:"{gender}",
    country:"{country}",
    probability:999999,
    remaining_credits:888888
}

Obtenez 200 crédits gratuits dès maintenant !
{
    status:false,
    errorno:93,
    errmsg:"query limit reached"
}

Obtenez 200 crédits gratuits dès maintenant !

Ce qui est inclus dans Gender API

Nombre total de noms
4.080.692
Pays pris en charge
249
Disponibilité
99.9%

Caractéristiques

Déterminez le sexe par le nom

Déterminez le sexe de l'enfant en lui demandant son nom.

  • Déterminez le sexe à partir du nom.
  • Déterminez le sexe à partir du nom complet.
  • Nous pouvons déterminer le sexe de 'Anna White', 'White, Anna' et de nombreuses autres variantes.

Déterminer le sexe à partir de l'adresse e-mail

Nous pouvons maintenant déterminer le sexe de la personne à partir de l'adresse e-mail.

Déterminer le sexe à partir de l'adresse e-mail

Progrès Excel CSV

Nous pouvons faire évoluer vos fichiers CSV et Excel avec des informations sur le genre.

  • Téléchargez vos fichiers Excel et CSV volumineux.
  • Téléchargez votre nouveau fichier CSV contenant des données sur le sexe et le pays.
  • Accédez à vos données en quelques minutes.
  • Trouvez le sexe en utilisant le nom, le nom complet ou un e-mail.
  • Activez le filtre pays (facultatif)
Progrès Excel CSV

Extension GenderAPI pour Google Sheets™

Utilisez l'extension GenderAPI.io pour Google Sheets™ afin de déterminer rapidement et facilement le genre des données de noms et d'emails.

  • Sélectionnez la colonne contenant des noms ou des emails dans Sheets.
  • Cliquez sur 'Extensions => GenderAPI.io => Determine Gender' dans le menu.
  • Sélectionnez la colonne où le résultat du genre sera écrit et cliquez sur 'Run'.
  • C'est tout ! Toutes les étapes sont simples et rapides.
Installez maintenant!

Intégrer

Téléchargez l'exemple d'intégration que nous avons préparé pour les langages logiciels les plus courants dans notre bibliothèque, et intégrez-le instantanément.

Nous faisons de notre mieux pour pouvoir nous intégrer facilement dans votre système.

Nous concevons les fichiers de ressources de manière à ce qu'ils occupent le moins d'espace possible sur votre système.

Obtenez 99,9 % des résultats les plus précis des millions d'analyses que nous avons effectuées.

php logo
java logo
c++ logo
jquery logo
python logo
ruby logo
visual logo
android logo
swift logo
javascript logo

Documentation de l'API

Voici des exemples de codes que nous avons préparés pour vous.

Sélectionnez votre langue de programmation
GET
$curl = curl_init();

curl_setopt_array($curl, array(
    CURLOPT_URL => 'https://api.genderapi.io/api/?name=abraham&key=<YourAPIkey>',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_ENCODING => '',
    CURLOPT_MAXREDIRS => 10,
    CURLOPT_TIMEOUT => 0,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
    CURLOPT_CUSTOMREQUEST => 'GET',
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

POST
$curl = curl_init();

curl_setopt_array($curl, array(
    CURLOPT_URL => 'https://api.genderapi.io/api/',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_ENCODING => '',
    CURLOPT_MAXREDIRS => 10,
    CURLOPT_TIMEOUT => 0,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_POSTFIELDS => 'name=abraham&key=<YourAPIkey>',
    CURLOPT_HTTPHEADER => array(
        'Content-Type: application/x-www-form-urlencoded'
    ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

GET
$client = new Client();
$request = new Request('GET', 'https://api.genderapi.io/api/?name=abraham&key=<YourAPIkey>');
$res = $client->sendAsync($request)->wait();
echo $res->getBody();

POST
$client = new Client();
$headers = [
    'Content-Type' => 'application/x-www-form-urlencoded'
];
$options = [
    'form_params' => [
        'name' => 'abraham',
        'key' => '<YourAPIkey>'
    ]];
$request = new Request('POST', 'https://api.genderapi.io/api/', $headers);
$res = $client->sendAsync($request, $options)->wait();
echo $res->getBody();

GET
require_once 'HTTP/Request2.php';
$request = new HTTP_Request2();
$request->setUrl('https://api.genderapi.io/api/?name=abraham&key=<YourAPIkey>');
$request->setMethod(HTTP_Request2::METHOD_GET);
$request->setConfig(array(
    'follow_redirects' => TRUE
));
try {
    $response = $request->send();
    if ($response->getStatus() == 200) {
        echo $response->getBody();
    }
    else {
        echo 'Unexpected HTTP status: ' . $response->getStatus() . ' ' .
        $response->getReasonPhrase();
    }
}
catch(HTTP_Request2_Exception $e) {
    echo 'Error: ' . $e->getMessage();
}

POST
require_once 'HTTP/Request2.php';
$request = new HTTP_Request2();
$request->setUrl('https://api.genderapi.io/api/');
$request->setMethod(HTTP_Request2::METHOD_POST);
$request->setConfig(array(
    'follow_redirects' => TRUE
));
$request->setHeader(array(
    'Content-Type' => 'application/x-www-form-urlencoded'
));
$request->addPostParameter(array(
    'name' => 'maria',
    'key' => '<YourAPIkey>'
));
try {
    $response = $request->send();
    if ($response->getStatus() == 200) {
        echo $response->getBody();
    }
    else {
        echo 'Unexpected HTTP status: ' . $response->getStatus() . ' ' . $response->getReasonPhrase();
    }
}
catch(HTTP_Request2_Exception $e) {
    echo 'Error: ' . $e->getMessage();
}

GET
$client = new http\Client;
$request = new http\Client\Request;
$request->setRequestUrl('https://api.genderapi.io/api/?name=abraham&key=<YourAPIkey>');
$request->setRequestMethod('GET');
$request->setOptions(array());

$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();

POST
$client = new http\Client;
$request = new http\Client\Request;
$request->setRequestUrl('https://api.genderapi.io/api/');
$request->setRequestMethod('POST');
$body = new http\Message\Body;
$body->append(new http\QueryString(array(
    'name' => 'maria',
    'key' => '<YourAPIkey>')));$request->setBody($body);
$request->setOptions(array());
$request->setHeaders(array(
    'Content-Type' => 'application/x-www-form-urlencoded'
));
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();

GET
import http.client
conn = http.client.HTTPSConnection("api.genderapi.io")
payload = ''
headers = {}
conn.request("GET", "/api/?name=abraham&key=<YourAPIkey>", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))

POST
import http.client
conn = http.client.HTTPSConnection("api.genderapi.io")
payload = 'name=maria&key=<YourAPIkey>'
headers = {
    'Content-Type': 'application/x-www-form-urlencoded'
}
conn.request("POST", "/api/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))

GET
import requests

url = "https://api.genderapi.io/api/?name=abraham&key=<YourAPIkey>"

payload = {}
headers = {}

response = requests.request("GET", url, headers=headers, data=payload)

print(response.text)

POST
import requests

url = "https://api.genderapi.io/api/"

payload = 'name=maria&key=<YourAPIkey>'
headers = {
    'Content-Type': 'application/x-www-form-urlencoded'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)

GET
OkHttpClient client = new OkHttpClient().newBuilder().build();
MediaType mediaType = MediaType.parse("text/plain");
RequestBody body = RequestBody.create(mediaType, "");
Request request = new Request.Builder()
    .url("https://api.genderapi.io/api/?name=abraham&key=<YourAPIkey>")
    .method("GET", body)
    .build();
Response response = client.newCall(request).execute();

POST
OkHttpClient client = new OkHttpClient().newBuilder()
    .build();
MediaType mediaType = MediaType.parse("application/x-www-form-urlencoded");
RequestBody body = RequestBody.create(mediaType, "name=maria&key=<YourAPIkey>");
Request request = new Request.Builder()
    .url("https://api.genderapi.io/api/")
    .method("POST", body)
    .addHeader("Content-Type", "application/x-www-form-urlencoded")
    .build();
Response response = client.newCall(request).execute();

GET
Unirest.setTimeouts(0, 0);
HttpResponse<String> response = Unirest.get("https://api.genderapi.io/api/?name=abraham&key=<YourAPIkey>")
    .asString();

POST
Unirest.setTimeouts(0, 0);
HttpResponse<String> response = Unirest.post("https://api.genderapi.io/api/")
    .header("Content-Type", "application/x-www-form-urlencoded")
    .field("name", "maria")
    .field("key", "<YourAPIkey>")
    .asString();

GET
var requestOptions = {
    method: 'GET',
    redirect: 'follow'
};

fetch("https://api.genderapi.io/api/?name=abraham&key=<YourAPIkey>", requestOptions)
    .then(response => response.text())
    .then(result => console.log(result))
    .catch(error => console.log('error', error));

POST
var myHeaders = new Headers();
myHeaders.append("Content-Type", "application/x-www-form-urlencoded");

var urlencoded = new URLSearchParams();
urlencoded.append("name", "maria");
urlencoded.append("key", "<YourAPIkey>");

var requestOptions = {
    method: 'POST',
    headers: myHeaders,
    body: urlencoded,
    redirect: 'follow'
};

fetch("https://api.genderapi.io/api/", requestOptions)
    .then(response => response.text())
    .then(result => console.log(result))
    .catch(error => console.log('error', error));

GET
var settings = {
    "url": "https://api.genderapi.io/api/?name=abraham&key=<YourAPIkey>",
    "method": "GET",
    "timeout": 0,
};

$.ajax(settings).done(function (response) {
    console.log(response);
});

POST
var settings = {
"url": "https://api.genderapi.io/api/",
"method": "POST",
"timeout": 0,
"headers": {
    "Content-Type": "application/x-www-form-urlencoded"
},
"data": {
    "name": "maria",
    "key": "<YourAPIkey>"
}
};

$.ajax(settings).done(function (response) {
    console.log(response);
});

GET
// WARNING: For GET requests, body is set to null by browsers.
var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function() {
    if(this.readyState === 4) {
        console.log(this.responseText);
    }
});

xhr.open("GET", "https://api.genderapi.io/api/?name=abraham&key=<YourAPIkey>");

xhr.send();

POST
// WARNING: For POST requests, body is set to null by browsers.
var data = "name=maria&key=<YourAPIkey>";

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function() {
    if(this.readyState === 4) {
        console.log(this.responseText);
    }
});

xhr.open("POST", "https://api.genderapi.io/api/");
xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");

xhr.send(data);

GET
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Get, "https://api.genderapi.io/api/?name=abraham&key=<YourAPIkey>");
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());

POST
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, "https://api.genderapi.io/api/");
var collection = new List<KeyValuePair<string, string>>();
collection.Add(new("name", "maria"));
collection.Add(new("key", "<YourAPIkey>"));
var content = new FormUrlEncodedContent(collection);
request.Content = content;
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());

GET
var options = new RestClientOptions("https://api.genderapi.io")
{
    MaxTimeout = -1,
};
var client = new RestClient(options);
var request = new RestRequest("/api/?name=abraham&key=<YourAPIkey>", Method.Get);
RestResponse response = await client.ExecuteAsync(request);
Console.WriteLine(response.Content);

POST
var options = new RestClientOptions("https://api.genderapi.io")
{
    MaxTimeout = -1,
};
var client = new RestClient(options);
var request = new RestRequest("/api/", Method.Post);
request.AddHeader("Content-Type", "application/x-www-form-urlencoded");
request.AddParameter("name", "maria");
request.AddParameter("key", "<YourAPIkey>");
RestResponse response = await client.ExecuteAsync(request);
Console.WriteLine(response.Content);

GET
curl --location 'https://api.genderapi.io/api/?name=abraham&key=<Your-API-Key>'

POST
curl --location 'https://api.genderapi.io/api/' \
    --header 'Content-Type: application/x-www-form-urlencoded' \
    --data-urlencode 'name=maria' \
    --data-urlencode 'key=<YourAPIkey>'

GET
var dio = Dio();
var response = await dio.request(
    'https://api.genderapi.io/api/?name=abraham&key=<YourAPIkey>',
    options: Options(
        method: 'GET',
    ),
);

if (response.statusCode == 200) {
    print(json.encode(response.data));
}
else {
    print(response.statusMessage);
}

POST
var headers = {
    'Content-Type': 'application/x-www-form-urlencoded'
};
var data = {
    'name': 'maria',
    'key': '<YourAPIkey>'
};
var dio = Dio();
var response = await dio.request(
    'https://api.genderapi.io/api/',
    options: Options(
        method: 'POST',
        headers: headers,
    ),
    data: data,
);

if (response.statusCode == 200) {
    print(json.encode(response.data));
}
else {
    print(response.statusMessage);
}

GET
var request = http.Request('GET', Uri.parse('https://api.genderapi.io/api/?name=abraham&key=<YourAPIkey>'));
http.StreamedResponse response = await request.send(); if (response.statusCode == 200) { print(await response.stream.bytesToString()); } else { print(response.reasonPhrase); }
POST
var headers = {
    'Content-Type': 'application/x-www-form-urlencoded'
};
var request = http.Request('POST', Uri.parse('https://api.genderapi.io/api/'));
request.bodyFields = {
    'name': 'maria',
    'key': '<YourAPIkey>'
};
request.headers.addAll(headers);

http.StreamedResponse response = await request.send();

if (response.statusCode == 200) {
    print(await response.stream.bytesToString());
}
else {
    print(response.reasonPhrase);
}

GET
package main
import (
    "fmt"
    "net/http"
    "io/ioutil"
)

func main() {

    url := "https://api.genderapi.io/api/?name=abraham&key=<YourAPIkey>"
    method := "GET"

    client := &http.Client {}
    req, err := http.NewRequest(method, url, nil)

    if err != nil {
        fmt.Println(err)
        return
    }
    res, err := client.Do(req)
    if err != nil {
        fmt.Println(err)
        return
    }
    defer res.Body.Close()

    body, err := ioutil.ReadAll(res.Body)
    if err != nil {
        fmt.Println(err)
        return
    }
    fmt.Println(string(body))
}

POST
package main
import (
    "fmt"
    "strings"
    "net/http"
    "io/ioutil"
)

func main() {

    url := "https://api.genderapi.io/api/"
    method := "POST"

    payload := strings.NewReader("name=maria&key=<YourAPIkey>")

    client := &http.Client {
    }
    req, err := http.NewRequest(method, url, payload)

    if err != nil {
        fmt.Println(err)
        return
    }
    req.Header.Add("Content-Type", "application/x-www-form-urlencoded")

    res, err := client.Do(req)
    if err != nil {
        fmt.Println(err)
        return
    }
    defer res.Body.Close()

    body, err := ioutil.ReadAll(res.Body)
    if err != nil {
        fmt.Println(err)
        return
    }
    fmt.Println(string(body))
}

GET
val client = OkHttpClient()
val request = Request.Builder()
    .url("https://api.genderapi.io/api/?name=abraham&key=<YourAPIkey>")
    .build()
val response = client.newCall(request).execute()

POST
val client = OkHttpClient()
val mediaType = "application/x-www-form-urlencoded".toMediaType()
val body = "name=maria&key=<YourAPIkey>".toRequestBody(mediaType)
val request = Request.Builder()
    .url("https://api.genderapi.io/api/")
    .post(body)
    .addHeader("Content-Type", "application/x-www-form-urlencoded")
    .build()
val response = client.newCall(request).execute()

GET
CURL *curl;
CURLcode res;
curl = curl_easy_init();
if(curl) {
    curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "GET");
    curl_easy_setopt(curl, CURLOPT_URL, "https://api.genderapi.io/api/?name=abraham&key=<YourAPIkey>");
    curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L);
    curl_easy_setopt(curl, CURLOPT_DEFAULT_PROTOCOL, "https");
    struct curl_slist *headers = NULL;
    curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);
    res = curl_easy_perform(curl);
}
curl_easy_cleanup(curl);

POST
CURL *curl;
CURLcode res;
curl = curl_easy_init();
if(curl) {
    curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "POST");
    curl_easy_setopt(curl, CURLOPT_URL, "https://api.genderapi.io/api/");
    curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L);
    curl_easy_setopt(curl, CURLOPT_DEFAULT_PROTOCOL, "https");
    struct curl_slist *headers = NULL;
    headers = curl_slist_append(headers, "Content-Type: application/x-www-form-urlencoded");
    curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);
    const char *data = "name=maria&key=<YourAPIkey>";
    curl_easy_setopt(curl, CURLOPT_POSTFIELDS, data);
    res = curl_easy_perform(curl);
}
curl_easy_cleanup(curl);

GET
const axios = require('axios');

let config = {
    method: 'get',
    maxBodyLength: Infinity,
    url: 'https://api.genderapi.io/api/?name=abraham&key=<YourAPIkey>',
    headers: { }
};

axios.request(config)
    .then((response) => {
        console.log(JSON.stringify(response.data));
    })
    .catch((error) => {
        console.log(error);
    });

POST
const axios = require('axios');
const qs = require('qs');

let data = qs.stringify({
    'name': 'maria',
    'key': '<YourAPIkey>'
});

let config = {
    method: 'post',
    maxBodyLength: Infinity,
    url: 'https://api.genderapi.io/api/',
    headers: {
        'Content-Type': 'application/x-www-form-urlencoded'
    },
    data : data
};

axios.request(config)
    .then((response) => {
        console.log(JSON.stringify(response.data));
    })
    .catch((error) => {
        console.log(error);
    });

GET
var https = require('follow-redirects').https;
var fs = require('fs');

var options = {
    'method': 'GET',
    'hostname': 'api.genderapi.io',
    'path': '/api/?name=abraham&key=<YourAPIkey>',
    'headers': {},
    'maxRedirects': 20
};

var req = https.request(options, function (res) {
    var chunks = [];

    res.on("data", function (chunk) {
        chunks.push(chunk);
    });

    res.on("end", function (chunk) {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
    });

    res.on("error", function (error) {
        console.error(error);
    });
});

req.end();

POST
var https = require('follow-redirects').https;
var fs = require('fs');

var qs = require('querystring');

var options = {
    'method': 'POST',
    'hostname': 'api.genderapi.io',
    'path': '/api/',
    'headers': {
        'Content-Type': 'application/x-www-form-urlencoded'
    },
    'maxRedirects': 20
};

var req = https.request(options, function (res) {
    var chunks = [];

    res.on("data", function (chunk) {
        chunks.push(chunk);
    });

    res.on("end", function (chunk) {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
    });

    res.on("error", function (error) {
        console.error(error);
    });
});

var postData = qs.stringify({
    'name': 'maria',
    'key': '<YourAPIkey>'
});

req.write(postData);

req.end();

GET
var request = require('request');
var options = {
    'method': 'GET',
    'url': 'https://api.genderapi.io/api/?name=abraham&key=<YourAPIkey>',
    'headers': {}
};
request(options, function (error, response) {
    if (error) throw new Error(error);
    console.log(response.body);
});

POST
var request = require('request');
var options = {
    'method': 'POST',
    'url': 'https://api.genderapi.io/api/',
    'headers': {
        'Content-Type': 'application/x-www-form-urlencoded'
    },
    form: {
        'name': 'maria',
        'key': '<YourAPIkey>'
    }
};
request(options, function (error, response) {
    if (error) throw new Error(error);
    console.log(response.body);
});

GET
var unirest = require('unirest');
var req = unirest('GET', 'https://api.genderapi.io/api/?name=abraham&key=<YourAPIkey>')
    .end(function (res) {
        if (res.error) throw new Error(res.error);
        console.log(res.raw_body);
    });

POST
var unirest = require('unirest');
var req = unirest('POST', 'https://api.genderapi.io/api/')
    .headers({
        'Content-Type': 'application/x-www-form-urlencoded'
    })
    .send('name=maria')
    .send('key=<YourAPIkey>')
    .end(function (res) {
        if (res.error) throw new Error(res.error);
        console.log(res.raw_body);
    });

GET
#import <Foundation/Foundation.h>
dispatch_semaphore_t sema = dispatch_semaphore_create(0);

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"https://api.genderapi.io/api/?name=abraham&key=<YourAPIkey>"]
  cachePolicy:NSURLRequestUseProtocolCachePolicy
  timeoutInterval:10.0];

[request setHTTPMethod:@"GET"];

NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
    if (error) {
        NSLog(@"%@", error);
        dispatch_semaphore_signal(sema);
    } else {
        NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
        NSError *parseError = nil;
        NSDictionary *responseDictionary = [NSJSONSerialization JSONObjectWithData:data options:0 error:&parseError];
        NSLog(@"%@",responseDictionary);
        dispatch_semaphore_signal(sema);
    }
}];
[dataTask resume];
dispatch_semaphore_wait(sema, DISPATCH_TIME_FOREVER);

POST
#import <Foundation/Foundation.h>
dispatch_semaphore_t sema = dispatch_semaphore_create(0);

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"https://api.genderapi.io/api/"]
    cachePolicy:NSURLRequestUseProtocolCachePolicy
    timeoutInterval:10.0];
NSDictionary *headers = @{
    @"Content-Type": @"application/x-www-form-urlencoded"
};

[request setAllHTTPHeaderFields:headers];
NSMutableData *postData = [[NSMutableData alloc] initWithData:[@"name=maria" dataUsingEncoding:NSUTF8StringEncoding]];
[postData appendData:[@"&key=<YourAPIkey>" dataUsingEncoding:NSUTF8StringEncoding]];
[request setHTTPBody:postData];

[request setHTTPMethod:@"POST"];

NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
    if (error) {
        NSLog(@"%@", error);
        dispatch_semaphore_signal(sema);
    } else {
        NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
        NSError *parseError = nil;
        NSDictionary *responseDictionary = [NSJSONSerialization JSONObjectWithData:data options:0 error:&parseError];
        NSLog(@"%@",responseDictionary);
        dispatch_semaphore_signal(sema);
    }
}];
[dataTask resume];
dispatch_semaphore_wait(sema, DISPATCH_TIME_FOREVER);

GET
open Lwt
open Cohttp
open Cohttp_lwt_unix

let reqBody =
let uri = Uri.of_string "https://api.genderapi.io/api/?name=abraham&key=<YourAPIkey>" in
Client.call `GET uri >>= fun (_resp, body) ->
body |> Cohttp_lwt.Body.to_string >|= fun body -> body

let () =
let respBody = Lwt_main.run reqBody in
print_endline (respBody)

POST
open Lwt
open Cohttp
open Cohttp_lwt_unix

let postData = ref "name=maria&key=<YourAPIkey>";;

let reqBody =
let uri = Uri.of_string "https://api.genderapi.io/api/" in
let headers = Header.init ()
|> fun h -> Header.add h "Content-Type" "application/x-www-form-urlencoded"
in
let body = Cohttp_lwt.Body.of_string !postData in

Client.call ~headers ~body `POST uri >>= fun (_resp, body) ->
body |> Cohttp_lwt.Body.to_string >|= fun body -> body

let () =
let respBody = Lwt_main.run reqBody in
print_endline (respBody)

GET
$response = Invoke-RestMethod 'https://api.genderapi.io/api/?name=abraham&key=<YourAPIkey>' -Method 'GET' -Headers $headers
$response | ConvertTo-Json

POST
$headers = New-Object "System.Collections.Generic.Dictionary[[String],[String]]"
$headers.Add("Content-Type", "application/x-www-form-urlencoded")

$body = "name=maria&key=<YourAPIkey>"

$response = Invoke-RestMethod 'https://api.genderapi.io/api/' -Method 'POST' -Headers $headers -Body $body
$response | ConvertTo-Json

GET
library(httr)
res <- VERB("GET", url = "https://api.genderapi.io/api/?name=abraham&key=<YourAPIkey>") cat(content(res, 'text'))
POST
library(httr)

headers = c(
    'Content-Type' = 'application/x-www-form-urlencoded'
)

body = list(
    'name' = 'maria',
    'key' = '<YourAPIkey>'
)

res <- VERB("POST", url = "https://api.genderapi.io/api/", body = body, add_headers(headers), encode = 'form')

cat(content(res, 'text'))

GET
library(RCurl)
res <- getURL("https://api.genderapi.io/api/?name=abraham&key=<YourAPIkey>", .opts=list(followlocation = TRUE))
cat(res)

POST
library(RCurl)
headers = c(
    "Content-Type" = "application/x-www-form-urlencoded"
)
params = c(
    "name" = "maria",
    "key" = "<YourAPIkey>"
)
res <- postForm("https://api.genderapi.io/api/", .params = params, .opts=list(httpheader = headers, followlocation = TRUE), style = "post")
cat(res)

GET
require "uri"
require "net/http"

url = URI("https://api.genderapi.io/api/?name=abraham&key=<YourAPIkey>")

https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true

request = Net::HTTP::Get.new(url)

response = https.request(request)
puts response.read_body

POST
require "uri"
require "net/http"

url = URI("https://api.genderapi.io/api/")

https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Content-Type"] = "application/x-www-form-urlencoded"
request.body = "name=maria&key=<YourAPIkey>"

response = https.request(request)
puts response.read_body

GET
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    let client = reqwest::Client::builder()
        .build()?;

    let request = client.request(reqwest::Method::GET, "https://api.genderapi.io/api/?name=abraham&key=<YourAPIkey>");

    let response = request.send().await?;
    let body = response.text().await?;

    println!("{}", body);

    Ok(())
}

POST
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    let client = reqwest::Client::builder()
        .build()?;

    let mut headers = reqwest::header::HeaderMap::new();
    headers.insert("Content-Type", "application/x-www-form-urlencoded".parse()?);

    let mut params = std::collections::HashMap::new();
    params.insert("name", "maria");
    params.insert("key", "<YourAPIkey>");

    let request = client.request(reqwest::Method::POST, "https://api.genderapi.io/api/")
        .headers(headers)
        .form(&params);

    let response = request.send().await?;
    let body = response.text().await?;

    println!("{}", body);

    Ok(())
}

GET
var request = URLRequest(url: URL(string: "https://api.genderapi.io/api/?name=Anna&key=<YourAPIkey>")!,timeoutInterval: Double.infinity)
request.httpMethod = "GET"

let task = URLSession.shared.dataTask(with: request) { data, response, error in
    guard let data = data else {
        print(String(describing: error))
        return
    }
    print(String(data: data, encoding: .utf8)!)
}

task.resume()

POST
let parameters = "name=abraham&key=<YourAPIkey>"
let postData =  parameters.data(using: .utf8)

var request = URLRequest(url: URL(string: "https://api.genderapi.io/api/")!,timeoutInterval: Double.infinity)
request.addValue("application/x-www-form-urlencoded", forHTTPHeaderField: "Content-Type")

request.httpMethod = "POST"
request.httpBody = postData

let task = URLSession.shared.dataTask(with: request) { data, response, error in
    guard let data = data else {
        print(String(describing: error))
        return
    }
    print(String(data: data, encoding: .utf8)!)
}

task.resume()

GET
http --follow --timeout 3600 GET 'https://api.genderapi.io/api/?name=Anna&key=<YourAPIkey>'

POST
http --ignore-stdin --form --follow --timeout 3600 POST 'https://api.genderapi.io/api/' \
    'name'='abraham' \
    'key'='<YourAPIkey>' \
    Content-Type:'application/x-www-form-urlencoded'

GET
wget --no-check-certificate --quiet \
    --method GET \
    --timeout=0 \
    --header '' \
    'https://api.genderapi.io/api/?name=Anna&key=<YourAPIkey>'

POST
wget --no-check-certificate --quiet \
    --method POST \
    --timeout=0 \
    --header 'Content-Type: application/x-www-form-urlencoded' \
    --body-data 'name=abraham&key=<YourAPIkey>' \
    'https://api.genderapi.io/api/'

Prix

Free

€0

  • 200 req/jour
  • Excel & CSV
  • Assistance 24/7
  • Pas de limite de tarif
  • Durée de l'abonnement : 1 jour

S'inscrire
Start-Up

6.99/mo

  • 10.000 req/mo
  • Excel & CSV
  • Assistance 24/7
  • Pas de limite de tarif
  • Durée de l'abonnement 1 mois

Achetez maintenant
Medium

19.99/mo

  • 200.000 req/mo
  • Excel & CSV
  • Assistance 24/7
  • Pas de limite de tarif
  • Durée de l'abonnement 1 mois

Achetez maintenant
Average
Populaire

39.99/mo

  • 1.000.000 req/mo
  • Excel & CSV
  • Assistance 24/7
  • Pas de limite de tarif
  • Durée de l'abonnement 1 mois

Achetez maintenant
Large

99.99/mo

  • 5.000.000 req/mo
  • Excel & CSV
  • Assistance 24/7
  • Pas de limite de tarif
  • Durée de l'abonnement 1 mois

Achetez maintenant
X-Large

189.99/mo

  • 30.000.000 req/mo
  • Excel & CSV
  • Assistance 24/7
  • Pas de limite de tarif
  • Durée de l'abonnement 1 mois

Achetez maintenant