Gender API
Kostenlos registrieren
Sprache expand_more

Go / Golang Client

High-performance Go client for Gender-API.com built with native Go idioms and standard libraries. Our specialized API provides 99.5% accurate gender detection in under 100ms, perfect for concurrent processing and microservices. The client supports goroutines for parallel batch processing and includes proper context handling. Unlike generic AI solutions that are slow and resource-intensive, our API is 10x-90x faster with superior accuracy. Ideal for high-throughput applications, data pipelines, and cloud-native services. Access over 9 million names across 150+ countries with intelligent fallback. Memory-efficient and production-ready with comprehensive error handling. Start free with 100 API calls monthly.

Installiere zuerst unsere Bibliothek mit Composer:

Vollständige Client-Dokumentation hier:

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

Installiere zuerst unsere Bibliothek mit npm:

Vollständige Client-Dokumentation hier:

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

Installiere zuerst unsere Bibliothek mit npm:

Vollständige Client-Dokumentation hier:

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

Installiere zuerst unsere Bibliothek mit pip:

Vollständige Client-Dokumentation hier:

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

package main

import (
    "bytes"
    "encoding/json"
    "fmt"
    "io/ioutil"
    "net/http"
)

// Response defines the structure of the JSON response from Gender-API.com
type Response struct {
    ResultFound bool    `json:"result_found"`
    FirstName   string  `json:"first_name"`
    Gender      string  `json:"gender"`
    Probability float64 `json:"probability"`
}

func main() {
    // Determine the gender of a first name using API V2
    // ---------------------------------------------------
    apiKey := "YOUR_API_KEY" // Get your key at https://gender-api.com/en/account/auth-tokens
    firstName := "Theresa"

    // Construct the JSON payload
    requestBody, _ := json.Marshal(map[string]string{
        "first_name": firstName,
    })

    // Create the request
    req, err := http.NewRequest("POST", "https://gender-api.com/v2/gender/by-first-name", bytes.NewBuffer(requestBody))
    if err != nil {
        fmt.Printf("Error creating request: %s\n", err)
        return
    }

    // Set headers
    req.Header.Set("Content-Type", "application/json")
    req.Header.Set("Authorization", "Bearer "+apiKey)

    // Perform the request
    client := &http.Client{}
    resp, err := client.Do(req)
    if err != nil {
        fmt.Printf("Error making request: %s\n", err)
        return
    }
    defer resp.Body.Close()

    // Read the response body
    body, err := ioutil.ReadAll(resp.Body)
    if err != nil {
        fmt.Printf("Error reading response: %s\n", err)
        return
    }

    // Parse the JSON response
    var result Response
    if err := json.Unmarshal(body, &result); err != nil {
        fmt.Printf("Error parsing JSON: %s\n", err)
        return
    }

    // Output the result
    fmt.Printf("Name: %s\n", result.FirstName)
    fmt.Printf("Gender: %s\n", result.Gender)
    fmt.Printf("Probability: %.2f\n", result.Probability)
}

Professionelle Gender-Erkennung für deine Anwendungen

Gender-API.com liefert Gender-Erkennung auf Enterprise-Niveau mit 99,5 % Genauigkeit in über 150 Ländern. Unsere spezialisierte API übertrifft generische KI-Lösungen mit 10- bis 90-fach schnelleren Antwortzeiten und einer um 9–34 % höheren Genauigkeit.

Warum Gender-API statt generischer KI?

  • Speziell entwickelt : Spezialisiert auf Gender-Erkennung, keine Allzweck-KI
  • Blitzschnell : Antwortzeiten von unter 100 ms im Vergleich zu Sekunden bei generischer KI
  • Genauer : 99,5 % Genauigkeit mit kultureller und regionaler Intelligenz
  • Größere Datenbank : Über 9 Millionen Namen, 37 % mehr als typische KI-Trainingsdaten
  • Zuverlässig : SLA mit 99,9 % Verfügbarkeit und vorhersehbarer Leistung

Hauptfunktionen

  • Einfache Integration mit nur wenigen Codezeilen
  • Batch-Verarbeitung für Anwendungen mit hohem Volumen
  • Länderspezifische Genauigkeit für regionale Namensvarianten
  • Intelligente Normalisierung zur Behandlung von Tippfehlern und Varianten
  • DSGVO-konform und Enterprise-ready

Starte noch heute kostenlos

Erhalte 100 kostenlose API-Aufrufe pro Monat ohne Kreditkarte. Skaliere bei Wachstum mit flexiblen Preisen für jeden Anwendungsfall.

Chat