ทำนายเพศจากอีเมล · คำขอหลายรายการ

วิเคราะห์หลายอีเมลในคำขอเดียว

แยกชื่อและทำนายเพศจากอีเมลสูงสุด 50 รายการ พร้อมข้อมูลประเทศและ ID ระเบียนที่เลือกใส่ได้

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

ภาพรวมคำขอหลายรายการ

ประมวลผลได้สูงสุด 50 อีเมล

ส่งอาร์เรย์ data แล้ว GenderAPI จะแยกชื่อจากแต่ละอีเมลและคืนผลลัพธ์ ใช้ idที่เลือกใส่ได้เพื่อเชื่อมกับระเบียนต้นทางอย่างแม่นยำ

วิธีPOST
สูงสุด50 อีเมล
การยืนยันตัวตนBearer token
รูปแบบผลลัพธ์names[]
HDR

HTTP header ที่จำเป็น

ยืนยันตัวตนคำขอหลายรายการ

Content-Typeapplication/json
AuthorizationBearer YOUR_API_KEY

เนื้อหาคำขอ JSON

พารามิเตอร์

ฟิลด์ชนิดข้อกำหนดคำอธิบาย
dataobject[]จำเป็นรายการระเบียนอีเมล 1–50 รายการ
data[].emailstringจำเป็นอีเมลที่ GenderAPI จะใช้แยกชื่อ
data[].countrystringไม่บังคับรหัสประเทศ ISO 3166-1 alpha-2 สำหรับบริบทภูมิภาค
data[].idstring | integerไม่บังคับID ระเบียนจากระบบของคุณที่ส่งคืนโดยไม่เปลี่ยนแปลงพร้อมผลลัพธ์
การเชื่อมระเบียน

ใช้ id ที่ไม่ซ้ำในแต่ละรายการ GenderAPI จะคืน ID พร้อมผลลัพธ์ จึงอัปเดตระเบียนที่ถูกต้องได้ โดยไม่ต้องพึ่งลำดับอาร์เรย์

เพย์โหลดคำขอ

สร้างอาร์เรย์อีเมล

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"
}

ฟิลด์ผลลัพธ์

ฟิลด์ชนิดคำอธิบาย
statusbooleanระบุว่าคำขอหลายรายการประมวลผลโดยไม่มีข้อผิดพลาดหรือไม่
used_creditsintegerเครดิตที่ใช้กับอีเมลทั้งหมด
remaining_creditsintegerเครดิตคงเหลือหลังคำขอ
expiresintegerUNIX timestamp ที่แพ็กเกจหมดอายุ
namesobject[]รายการผลลัพธ์ของอีเมลที่ส่ง
names[].namestringชื่อที่แยกจากอีเมล
names[].qstringอีเมลเดิมที่ส่ง
names[].genderstring | nullผลการทำนายเป็น male, female หรือ null
names[].countrystringรหัสประเทศที่ใช้กับผลลัพธ์
names[].total_namesintegerจำนวนระเบียนชื่อที่เป็นพื้นฐานของผลลัพธ์
names[].probabilityintegerเปอร์เซ็นต์ความเชื่อมั่น
names[].idstring | integerID อินพุตที่ส่งคืนเพื่อเชื่อมระเบียน
durationstringเวลาประมวลผลทั้งหมดของเซิร์ฟเวอร์

จำกัดไม่เกิน 50 ระเบียนต่อคำขอ

ตรวจสอบแต่ละอีเมลและแบ่งชุดข้อมูลขนาดใหญ่เป็นชุดละไม่เกิน 50 รายการ ตรวจสอบ name และprobability ก่อนใช้ผลลัพธ์ คำขออีเมลจะไม่ถูกจัดเก็บ

คู่มือถัดไป

ทำนายเพศจากชื่อผู้ใช้

คำขอชื่อผู้ใช้เดียวแยกชื่อจากชื่อผู้ใช้หนึ่งรายการ →คำขออีเมลเดียวใช้ AI เสริมกับอีเมลเดียว →