Reference data from catalogs
Some values must be real: a country code your system validates, a currency with its correct minor units, the list of EU members. Catalogs hold that reference data. Use it inside a recipe, or download a list directly.
A real value per record
A catalog field picks one record per row. value chooses the column; columns takes several columns of the same record, so a country's name, code and currency always agree:
version: "1"
output: { language: spa, format: csv, quantity: 4 }
fields:
- { name: cliente, type: text, category: fullName }
- name: pais
type: country
columns: [name, iso2, currency, calling_code]
parent: SA # South America onlycliente,pais_name,pais_iso2,pais_currency,pais_calling_code
Elena Márquez,Islas Malvinas,FK,FKP,500
Andrea Lozano,Guyana,GY,GYD,592
Noelia Castro,Chile,CL,CLP,56
Elena Mendoza,Bolivia,BO,BOB,591columns expands into flat fields named <field>_<column>, and names are localized to output.language. Filter with parent (a continent) or group (G20, EU, MERCOSUR, BRICS, OECD); add unique: true for no repeats.
The whole list
With all: true the field lists every matching record once, and the list size becomes the quantity:
version: "1"
output: { language: fra, format: csv }
fields:
- { name: pays, type: country, columns: [name, iso3], group: EU, all: true, order: code }pays_name,pays_iso3
Autriche,AUT
Belgique,BEL
Bulgarie,BGR
…Only one field per recipe can set all: true. Other fields in the recipe are generated once per listed record, so you can attach synthetic data to every country.
Direct exports
When you need the reference list itself — to seed a lookup table or to paste into a prompt — skip the recipe. In the app, Catalogs lists every dataset with its size, source and license: pick a language, columns, an optional filter and a format (json, csv, or toon, the most compact for LLM prompts), then download. Exports cost 1 credit per row.
The same through the API, with a key that has the catalog:read scope:
curl -s https://api.ghostbakery.com/api/v1/catalog/country/export \
-H "Authorization: Bearer $GB_KEY" \
-H "Content-Type: application/json" \
-d '{"language":"por","columns":["name","iso2"],"format":"csv"}' \
-o paises.csvPOST /api/v1/catalog/{type}/estimate with the same body returns the row count and cost first. limit caps the rows, and sample: true with a seed returns a reproducible random subset.
Things to know
- Reference data is maintained live. The same recipe can produce different output after an update, for example when a country's population figure changes.
- A language is offered only when its data is complete. The catalog page lists the output languages and each dataset's coverage.
- Sources and licenses are listed on the catalog page and in the terms.