Random Address Generator
Batch generate random mainland China addresses, including province, city, district, street number, and postal code. Supports filtering by province and city, generates up to 100 entries per request, suitable for test data population.
Documentation
API Capabilities
This API is used to batch generate random mainland China address information. The generated address data structure is complete, including province, city, district, street number, postal code, and a complete concatenated address string. Developers can filter generated addresses by region by passing country, province, and city parameters to obtain random address data for specific areas.
Request and Response
Request parameters include the number to generate (count, up to 100 per request), country code (country, e.g., CN), province (province), and city (city). Upon successful API response, the data field will return an array of JSON objects. Each object contains fields such as province, city, district, street, zipCode, and full (full address), making it convenient for developers to parse and use directly.
Use Cases
Integration Examples
Includes ready-to-use Shell, Python, Go, Java, and PHP examples for direct integration.
Request Example
{
"count": 5,
"country": "CN",
"province": "广东",
"city": "深圳"
}Response Example
{
"code": "SUCCESS",
"message": "success",
"data": [
{
"province": "广东省",
"city": "深圳市",
"district": "南山区",
"street": "科技路88号",
"zipCode": "518000",
"full": "广东省深圳市南山区科技路88号",
"country": "CN"
}
]
}Request Fields
The fields below are derived from example JSON for integration reference only.
| Path | Type | Sample |
|---|---|---|
| count | number | 5 |
| country | string | CN |
| province | string | 广东 |
| city | string | 深圳 |
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 | {"province":"广东省","city":"深圳市","district":"南山区","street":"科技路88号","zipCode":"518000","full":"广东省深圳市南山区科技路88号","country":"CN"} |
| data[] | object | {...} |
| data[].province | string | 广东省 |
| data[].city | string | 深圳市 |
| data[].district | string |