country
LocationGenerate country names or ISO country codes. Toggle between full names ('Germany') and codes ('DE') with a single parameter.
Example Outputs
GermanyJapanBrazilCanadaSwedenParameters
| Parameter | Description |
|---|---|
| code | Return ISO code instead of name (boolean) |
API Usage
Send a POST request to generate country data:
curl -X POST https://mockhero.dev/api/v1/generate \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"tables": [
{
"name": "example",
"count": 5,
"fields": [
{
"name": "country",
"type": "country",
"params": {
"code": true
}
}
]
}
]
}'Common Use Cases
- Dropdown population
- Address forms
- Shipping destination testing
- Geo-targeting testing
Quick Info
- Field Type
- country
- Category
- Location
- Parameters
- 1 parameter
- Output Format
- JSON, CSV, SQL
Related Types
Generate Country + 155 more types via API
One API call. Multiple tables. Relational integrity. Free tier included.