country_code
LocationGenerate ISO 3166-1 alpha-2 country codes (DE, US, JP, etc.). Compact country identifiers for databases and API responses.
Example Outputs
DEUSJPBRSEAPI Usage
Send a POST request to generate country code 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_code",
"type": "country_code"
}
]
}
]
}'Common Use Cases
- Database country fields
- API response mocking
- Internationalization testing
- Currency mapping
Quick Info
- Field Type
- country_code
- Category
- Location
- Parameters
- None required
- Output Format
- JSON, CSV, SQL
Related Types
Generate Country Code + 155 more types via API
One API call. Multiple tables. Relational integrity. Free tier included.