Geslacht API
Bepaal het geslacht aan de hand van een voornaam, volledige naam of e-mail.
{
status:false,
errorno:93,
errmsg:"query limit reached"
}
Wat is inbegrepen in Gender API
Functionaliteiten
Bepaal geslacht van naam
Achterhaal het geslacht door naar de naam te vragen.
- Achterhaal geslacht van naam.
- Achterhaal geslacht van volledige naam.
- We kunnen het geslacht bepalen van 'Anna de Wit', 'de Wit, Anna' en veel andere variaties.
Bepaal geslacht van e-mailadres
Nu kunnen we het geslacht van de persoon uit de e-mail voorspellen.
- Achterhaal geslacht van e-mailadres.
- We kunnen het geslacht bepalen in e-mails van zowel 'Anna', '[email protected]', '[email protected]', '[email protected]' en veel andere variaties.
![Bepaal geslacht van e-mailadres](/assets/images/email-to-gender.webp)
Excel CSV-verwerking
We kunnen uw CSV- en Excel-bestanden verwerken met geslachtsinformatie.
- Upload uw grote Excel- en CSV-bestanden.
- Download uw nieuwe CSV-bestand met daarin geslachts- en landinformatie.
- Krijg toegang tot uw gegevens binnen enkele minuten.
- Achterhaal het geslacht met behulp van naam, volledige naam of e-mail.
- Schakel landfilter in (optioneel)
![Excel CSV-verwerking](/assets/images/excel-csv-to-gender.webp)
GenderAPI-add-on voor Google Sheets™
Gebruik de GenderAPI.io-add-on voor Google Sheets™ om snel en eenvoudig het geslacht van naam- en e-mailgegevens te bepalen.
- Selecteer de kolom met namen of e-mails in Sheets.
- Klik op 'Extensions => GenderAPI.io => Determine Gender' in het menu.
- Selecteer de kolom waar het geslachtsresultaat wordt geschreven en klik op 'Run'.
- Dat is alles! Alle stappen zijn eenvoudig en snel.
Integreren
We doen ons best om gemakkelijk met uw systeem te kunnen integreren.
We maken de bronbestanden zo dat ze zo min mogelijk ruimte innemen op uw systeem.
Krijg 99,9% van de meest nauwkeurige resultaten in miljoenen analyses die we hebben uitgevoerd.
![php logo](/assets/images/php.webp)
![java logo](/assets/images/java.webp)
![c++ logo](/assets/images/c++.webp)
![jquery logo](/assets/images/jquery.webp)
![python logo](/assets/images/python.webp)
![ruby logo](/assets/images/ruby.webp)
![visual logo](/assets/images/visual.webp)
![android logo](/assets/images/android.webp)
![swift logo](/assets/images/swift.webp)
![javascript logo](/assets/images/js.webp)
API Documentatie
Hier zijn voorbeeldcodes die we voor u hebben gemaakt.
Selecteer Uw Programmeertaal
$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;
$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();
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();
}
$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();
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"))
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)
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();
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();
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));
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);
});
// 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);
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());
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);
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>'
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);
}
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);
}
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))
}
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()
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);
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);
});
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();
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);
});
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);
});
#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);
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)
$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
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'))
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)
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
#[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(¶ms);
let response = request.send().await?;
let body = response.text().await?;
println!("{}", body);
Ok(())
}
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()
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'
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/'
Prijzen
- 10.000 verzoek/maand
- Excel & CSV
- Ondersteuning 24/7
- Geen tarieflimiet
- Duur: 1 maand
- 200.000 verzoek/maand
- Excel & CSV
- Ondersteuning 24/7
- Geen tarieflimiet
- Duur: 1 maand
- 1.000.000 verzoek/maand
- Excel & CSV
- Ondersteuning 24/7
- Geen tarieflimiet
- Duur: 1 maand
- 5.000.000 verzoek/maand
- Excel & CSV
- Ondersteuning 24/7
- Geen tarieflimiet
- Duur: 1 maand
- 30.000.000 verzoek/maand
- Excel & CSV
- Ondersteuning 24/7
- Geen tarieflimiet
- Duur: 1 maand