Fake country
A country that does not exist, made up on the spot: its name, flag, map, capital, currency with a rate to the euro, a motto in real Latin and a national dish. Same seed, same country, every time, so you can link to one.
The Republic of Medeneti (capital Khantos) pays in biscuits and is famous for surprisingly good hats.
Fake, but never by accident real
The names come from a character chain trained on real country, region and city names from Natural Earth, then filtered so that no real country (current, former or famous from fiction), no near copy of one, nothing that starts or ends like a country or capital and no well known place comes out. The internet domain is two letters no country has: not a top-level domain in the IANA root zone, not an ISO 3166 code. The calling code is one the ITU lists as unassigned, and the currency code is not in ISO 4217.
Flags use real layouts (bands, Nordic cross, canton, saltire, hoist triangle, disc, diagonal band) in colours real flags fly, and keep the rule of tincture strictly: a light colour always touches a dark one, never itself. A design that matches a real national flag is drawn again. The Latin is real Latin, with every noun in the case its preposition asks for. The money is converted to euros, at a rate nobody will ever trade at.
Endpoints
| Method | Path | What you get |
|---|---|---|
| GET | /v1/countries/fake | The whole country as JSON, with links to its flag, map and card, the seed and a permalink. Takes format=text for one line. |
| GET | /v1/countries/fake/flag | Its flag, SVG by default. Takes width, border and format. |
| GET | /v1/countries/fake/map | Its map: coastline, islands, capital, highest point, scale bar. Takes size and format. |
| GET | /v1/countries/fake/card | A 1200x630 profile card with the flag, the map and the key facts. PNG by default, good for link previews. |
Parameters
| Name | Example | Does |
|---|---|---|
seed | velmaria | Every endpoint. 1 to 64 letters, digits, - or _. The same seed always gives the same country, flag, map and card. Leave it out for a new one each time. |
format | png | json or text on /fake; svg or png on the images (the card defaults to png, the rest to svg). |
width | 300 | Flag only: 60 to 1200 pixels, default 600. The height follows the flag's own ratio, 2:3 or 1:2. |
border | 1 | Flag only: 1 adds a thin ink outline, for flags with a white edge on a white page. |
size | 800 | Map only: 200 to 1200 pixels, square, default 600. |
Calls
$ curl "https://api.tasta.space/v1/countries/fake?seed=velmaria"
$ curl "https://api.tasta.space/v1/countries/fake?format=text"
$ curl -o flag.png "https://api.tasta.space/v1/countries/fake/flag?seed=velmaria&format=png&width=300"
$ curl -o card.png "https://api.tasta.space/v1/countries/fake/card?seed=velmaria"
A few seeds to start with
| Seed | Country | Look |
|---|---|---|
velmaria |
Confederation of Mirnaka | JSON · flag · map · card |
banana |
Commonwealth of Latanam | JSON · flag · map · card |
tasta |
Republic of Friborier | JSON · flag · map · card |
bucuresti |
Grand Duchy of Iglese | JSON · flag · map · card |
42 |
Republic of Narativu | JSON · flag · map · card |
The country up top, as JSON
{
"data": {
"name": "Medeneti",
"official_name": "Republic of Medeneti",
"government": "Republic",
"demonym": "Medenetian",
"capital": "Khantos",
"population": 51878019,
"area_km2": 743607,
"density_per_km2": 69.8,
"coastline_km": 5860,
"highest_point": {
"name": "Redongor Hill",
"elevation_m": 296
},
"founded": 1946,
"driving_side": "right",
"time_zone": "UTC-07:00",
"tld": ".kl",
"calling_code": "+854",
"currency": {
"name": "Medenetian biscuit",
"unit": "biscuit",
"plural": "biscuits",
"code": "KLB",
"subunit": "penny",
"subunit_plural": "pence",
"subunits_per_unit": 100,
"per_eur": 2790.0,
"eur_per_unit": 0.0003584
},
"motto": {
"latin": "Mare et lac",
"english": "The sea and milk"
},
"national_dish": "Charcoal-grilled carp under a blanket of cheese",
"national_animal": "Dignified newt",
"national_sport": "Long-distance chair stacking",
"famous_for": "surprisingly good hats",
"flag": {
"url": "https://api.tasta.space/v1/countries/fake/flag?seed=fktomggv",
"png": "https://api.tasta.space/v1/countries/fake/flag?seed=fktomggv&format=png",
"layout": "stars",
"aspect_ratio": "2:3",
"colors": [
{
"name": "sky",
"hex": "#75AADB"
},
{
"name": "navy",
"hex": "#012169"
}
],
"emblem": "star"
},
"map": {
"url": "https://api.tasta.space/v1/countries/fake/map?seed=fktomggv",
"png": "https://api.tasta.space/v1/countries/fake/map?seed=fktomggv&format=png"
},
"card": {
"url": "https://api.tasta.space/v1/countries/fake/card?seed=fktomggv",
"svg": "https://api.tasta.space/v1/countries/fake/card?seed=fktomggv&format=svg"
},
"seed": "fktomggv",
"permalink": "https://api.tasta.space/v1/countries/fake?seed=fktomggv"
},
"meta": {
"fictional": true,
"note": "None of this exists. If a real country ever slips through the name filter, tell us and it goes."
}
}
Its map
The coast is a few seeded waves around a centre, stretched, then roughened by splitting every edge and nudging its middle, five times over. Up to three islands sit offshore. The orange star is the capital, the two peaks are the highest point.
The map has no scale of its own: the country's area_km2 decides how many kilometres the drawing covers, which is where the scale bar and coastline_km come from. So the numbers agree with the picture, even if nothing else does.
Errors of its own
On top of the hub's errors.
| Status | Code | When |
|---|---|---|
| 422 | invalid_parameter | A seed with spaces or over 64 characters, a width or size out of range, border other than 0 or 1, a format the endpoint does not speak |
Try it
Where the real bits come from
The chain learned from the names in Natural Earth's countries, states and provinces, and populated places (public domain). Only the made-up names it produced ship with the API, never the real ones. The two-letter domains are checked against IANA's list of top-level domains and the ISO 3166-1 codes, the calling codes against the ITU's E.164 list of assigned codes, and the currency codes against ISO 4217, current and historic. The flag colours are close to common published values, not any country's official shade.
Everything else, from the government to the national sport, is invented. If a real country, a real flag or something unkind ever slips through, write to hello@tasta.space and it goes.