Skip to content

Countries

Last Updated   July 25, 2025

Reference

What is a Country?

A Country in Hardcover represents the country of publication for books and editions. This information helps users discover literature from specific regions, understand publishing markets, and explore global literary traditions. Countries use standardized codes for consistency and integration.

Fields

FieldTypeDescription
idbigintUnique identifier for the country
namestringFull name of the country
code2stringTwo-letter ISO 3166-1 alpha-2 country code
code3stringThree-letter ISO 3166-1 alpha-3 country code
iso_3166stringISO 3166 standard code
phone_codestringInternational dialing code
regionstringGeographic region (e.g., Europe, Asia)
region_codestringNumeric code for the region
sub_regionstringGeographic sub-region (e.g., Western Europe)
sub_region_codestringNumeric code for the sub-region
intermediate_regionstringIntermediate geographic classification
intermediate_region_codestringCode for intermediate region
created_attimestampWhen the country was added to the system
updated_attimestampWhen the country record was last updated
editionsEdition[]Book editions published in this country

Country Code Standards

StandardExampleDescription
ISO 3166-1 alpha-2US, GB, FRTwo-letter country codes
ISO 3166-1 alpha-3USA, GBR, FRAThree-letter country codes

Major Publishing Countries

CountryCode2Code3Publishing Notes
United StatesUSUSAMajor English-language publishing market
United KingdomGBGBRHistorical publishing center, English literature
GermanyDEDEULarge European publishing market
FranceFRFRAFrench literature and philosophy
JapanJPJPNManga, light novels, Japanese literature

Related Schemas

  • Editions - Book editions with country of publication
  • Publishers - Publishers based in different countries
  • Authors - Authors from various countries

Example Queries

Get All Countries

Retrieve all available countries:

All Countries Query
query AllCountries {
countries(
order_by: {name: asc}
) {
id
name
code2
code3
}
}

Find Country by Code

Look up a country using its ISO code:

Country by Code Query
query CountryByCode {
countries(
where: {code2: {_eq: "US"}}
) {
id
name
code2
code3
created_at
}
}

Search Countries by Name

Find countries by partial name match:

Search Countries Query
query SearchCountries {
countries(
where: {name: {_eq: "United States"}}
) {
id
name
code2
code3
}
}

Get European Countries

Find European countries:

European Countries Query
query EuropeanCountries {
countries(
where: {
code2: {_in: ["GB", "FR", "DE", "IT", "ES", "NL", "SE", "NO", "DK", "CH"]}
}
order_by: {name: asc}
) {
id
name
code2
code3
region
sub_region
}
}

Get Countries with Editions

Find countries that have published editions:

Countries with Editions Query
query CountriesWithEditions {
countries(
order_by: {name: asc}
limit: 20
) {
id
name
code2
code3
editions(limit: 3) {
id
title
release_year
}
}
}

Get Publishing Countries

Find countries that have published editions:

Publishing Countries Query
query PublishingCountries {
countries(
order_by: {name: asc}
limit: 10
) {
id
name
code2
code3
editions(limit: 5) {
id
title
release_year
}
}
}

Get Recent Country Additions

Find recently added countries:

Recent Countries Query
query RecentCountries {
countries(
order_by: {created_at: desc}
limit: 10
) {
id
name
code2
code3
created_at
updated_at
}
}

Best Practices for Working with Countries

  1. Use Standard Codes: Prefer ISO codes over country names for programmatic use
  2. Consider Historical Changes: Some countries may have changed names or codes over time
  3. Regional Variations: Be aware of regional publishing differences within countries
  4. Fallback Handling: Always have fallback logic for unknown country codes
  5. Publishing Context: Remember this represents publication country, not author nationality