Random Email Generator
批量生成随机邮箱地址,支持自定义前缀长度、字符集、域名。最多 100 条/次。
Documentation
Bulk generate random email addresses. Supports custom prefix lengths, character sets, and domains. Generate up to 100 addresses at a time.
Integration Examples
Includes ready-to-use Shell, Python, Go, Java, and PHP examples for direct integration.
Shell Example
curl --request POST \
--url 'https://openapi.toolkk.com/v1/random-email-generate' \
--header 'Content-Type: application/json' \
--header 'X-API-Key: YOUR_API_KEY' \
--data '{\n "count": 10,\n "minLength": 6,\n "maxLength": 10,\n "includeLowercase": true,\n "includeNumbers": true,\n "domains": [\n "gmail.com",\n "outlook.com"\n ]\n}'Python Example
import os
import requests
url = "https://openapi.toolkk.com/v1/random-email-generate"
payload = {
"count": 10,
"minLength": 6,
"maxLength": 10,
"includeLowercase": true,
"includeNumbers": true,
"domains": [
"gmail.com",
"outlook.com"
]
}
headers = {
"Content-Type": "application/json",
"X-API-Key": os.getenv("TOOLKK_API_KEY", "YOUR_API_KEY"),
}
response = requests.request("POST", url, headers=headers, json=payload, timeout=30)
response.raise_for_status()
print(response.json())Go Example
package main
import (
"bytes"
"fmt"
"io"
"net/http"
)
func main() {
endpoint := "https://openapi.toolkk.com/v1/random-email-generate"
payload := []byte("{\n \"count\": 10,\n \"minLength\": 6,\n \"maxLength\": 10,\n \"includeLowercase\": true,\n \"includeNumbers\": true,\n \"domains\": [\n \"gmail.com\",\n \"outlook.com\"\n ]\n}")
req, err := http.NewRequest("POST", endpoint, bytes.NewBuffer(payload))
if err != nil {
panic(err)
}
req.Header.Set("Content-Type", "application/json")
req.Header.Set("X-API-Key", "YOUR_API_KEY")
resp, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
body, err := io.ReadAll(resp.Body)
if err != nil {
panic(err)
}
fmt.Println(string(body))
}Java Example
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class ToolkkExample {
public static void main(String[] args) throws Exception {
String payload = "{\n \"count\": 10,\n \"minLength\": 6,\n \"maxLength\": 10,\n \"includeLowercase\": true,\n \"includeNumbers\": true,\n \"domains\": [\n \"gmail.com\",\n \"outlook.com\"\n ]\n}";
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://openapi.toolkk.com/v1/random-email-generate"))
.method("POST", HttpRequest.BodyPublishers.ofString(payload))
.header("Content-Type", "application/json")
.header("X-API-Key", "YOUR_API_KEY")
.build();
HttpResponse<String> response = HttpClient.newHttpClient()
.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Request Example
{
"count": 10,
"minLength": 6,
"maxLength": 10,
"includeLowercase": true,
"includeNumbers": true,
"domains": [
"gmail.com",
"outlook.com"
]
}Response Example
{
"code": "SUCCESS",
"message": "success",
"data": [
"a8kx2m@gmail.com",
"jd7fn4p@outlook.com"
]
}Request Fields
The fields below are derived from example JSON for integration reference only.
| Path | Type | Sample |
|---|---|---|
| count | number | 10 |
| minLength | number | 6 |
| maxLength | number | 10 |
| includeLowercase | boolean | true |
| includeNumbers | boolean | true |
| domains | array | "gmail.com" |
| domains[] | string | gmail.com |
Response Fields
The fields below are derived from example JSON for integration reference only.
| Path | Type | Sample |
|---|---|---|
| code | string | SUCCESS |
| message | string | success |
| data | array | "a8kx2m@gmail.com" |
| data[] | string | a8kx2m@gmail.com |