メールアドレスから性別を予測(複数リクエスト)

1リクエストで複数のメールアドレスを分析

50件までのメールアドレスから名前を抽出し、性別を予測。国や記録IDをオプションで指定可能

POSThttps://api.genderapi.io/api/email/multi/country

大量リクエストの概要

50件までのメールアドレスを処理

送信するdata配列。GenderAPIは各住所から可能性のある名前を抽出し、該当する予測を返します。あなたのオプションidはデータベースの相関を決定論的に行います。

MethodPOST
Maximum50件のメール
AuthenticationBearerトークン
結果のフォーマットnames[]
HDR

必要なHTTPヘッダー

ブロックリクエストの認可

Content-Typeapplication/json
AuthorizationBearer YOUR_API_KEY

JSONリクエストボディ

パラメータ

FieldTypeRequirementDescription
dataobject[]必須1から50までのメールレコードを含む配列。
data[].emailstring必須GenderAPIが可能性のある初めの名前を抽出するメールアドレス。
data[].countrystringオプション地域コンテキストとして使用されるISO 3166-1 alpha-2国コード。
data[].idstring | integerオプションあなたのレコード識別子。対応する結果とともに変更なしで返される。
レコードの一致

ユニークなid各項目に対して。GenderAPIはその項目の結果とともに返却するため、配列の位置に頼らず正しいデータベース記録を更新できます。

リクエストペイロード

メール配列を構築

JSON
{
  "data": [
    { "email": "andrea.schmidt@example.com", "country": "DE", "id": "123" },
    { "email": "andrea.rossi@example.it", "country": "IT", "id": "456" },
    { "email": "james.brown@example.com", "country": "US", "id": "789" }
  ]
}

コード例

複数メールを送信

cURL
curl -X POST "https://api.genderapi.io/api/email/multi/country" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{"data":[{"email":"andrea.schmidt@example.com","country":"DE","id":"123"},{"email":"james.brown@example.com","country":"US","id":"789"}]}'
JavaScript
const data = [
  { email: "andrea.schmidt@example.com", country: "DE", id: "123" },
  { email: "james.brown@example.com", country: "US", id: "789" }
];
const response = await fetch("https://api.genderapi.io/api/email/multi/country", {
  method: "POST", headers: { "Content-Type": "application/json", "Authorization": "Bearer YOUR_API_KEY" },
  body: JSON.stringify({ data })
});

200レスポンス

抽出された名前と予測結果

JSON
{
  "status": true, "used_credits": 3, "remaining_credits": 7265,
  "expires": 1717069765,
  "names": [
    { "name": "Andrea", "q": "andrea.schmidt@example.com", "gender": "female", "country": "DE", "total_names": 644, "probability": 88, "id": "123" },
    { "name": "James", "q": "james.brown@example.com", "gender": "male", "country": "US", "total_names": 45274, "probability": 100, "id": "789" }
  ], "duration": "5ms"
}

レスポンスフィールド

FieldTypeDescription
statusbooleanブロックスリクエストが成功したかどうか。
used_creditsintegerすべての送信メールに対して消費されたクレジット。
remaining_creditsintegerこのリクエスト後の利用可能なクレジット。
expiresintegerパッケージの有効期限をUNIXタイムスタンプで表す。
namesobject[]送信されたメールの結果を順に並べたオーダー付きのコレクション。
names[].namestringメールアドレスから抽出された名前(初名)。
names[].qstringリクエストで送信された元のメールアドレス。
names[].genderstring | null予測値:男性、女性、またはnull。
names[].countrystringこの結果に使用された国コード。
names[].total_namesintegerこの結果を支持するサンプルの数。
names[].probabilityinteger予測信頼度(パーセンテージ)。
names[].idstring | integer記録の相関のために返された入力識別子。
durationstringサーバー処理時間の合計。

各リクエストは50件までに保つこと

すべての住所を検証し、大きなデータセットは50件以下のバッチに分割する。抽出した内容を確認するname and probability結果を適用する前に

次へのガイド

ユーザー名から性別を決定する

ユーザー名の単一リクエスト1つのユーザー名から名前を抽出 →メールアドレスの単一リクエスト1つのメールに対してAIフィールドを活用 →