Countries
Last Updated July 25, 2025
ReferenceWhat 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
Field | Type | Description |
---|---|---|
id | bigint | Unique identifier for the country |
name | string | Full name of the country |
code2 | string | Two-letter ISO 3166-1 alpha-2 country code |
code3 | string | Three-letter ISO 3166-1 alpha-3 country code |
iso_3166 | string | ISO 3166 standard code |
phone_code | string | International dialing code |
region | string | Geographic region (e.g., Europe, Asia) |
region_code | string | Numeric code for the region |
sub_region | string | Geographic sub-region (e.g., Western Europe) |
sub_region_code | string | Numeric code for the sub-region |
intermediate_region | string | Intermediate geographic classification |
intermediate_region_code | string | Code for intermediate region |
created_at | timestamp | When the country was added to the system |
updated_at | timestamp | When the country record was last updated |
editions | Edition[] | Book editions published in this country |
Country Code Standards
Standard | Example | Description |
---|---|---|
ISO 3166-1 alpha-2 | US, GB, FR | Two-letter country codes |
ISO 3166-1 alpha-3 | USA, GBR, FRA | Three-letter country codes |
Major Publishing Countries
Country | Code2 | Code3 | Publishing Notes |
---|---|---|---|
United States | US | USA | Major English-language publishing market |
United Kingdom | GB | GBR | Historical publishing center, English literature |
Germany | DE | DEU | Large European publishing market |
France | FR | FRA | French literature and philosophy |
Japan | JP | JPN | Manga, 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:
query AllCountries { countries( order_by: {name: asc} ) { id name code2 code3 }}
Find Country by Code
Look up a country using its ISO code:
query CountryByCode { countries( where: {code2: {_eq: "US"}} ) { id name code2 code3 created_at }}
Search Countries by Name
Find countries by partial name match:
query SearchCountries { countries( where: {name: {_eq: "United States"}} ) { id name code2 code3 }}
Get European Countries
Find European countries:
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:
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:
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:
query RecentCountries { countries( order_by: {created_at: desc} limit: 10 ) { id name code2 code3 created_at updated_at }}
Best Practices for Working with Countries
- Use Standard Codes: Prefer ISO codes over country names for programmatic use
- Consider Historical Changes: Some countries may have changed names or codes over time
- Regional Variations: Be aware of regional publishing differences within countries
- Fallback Handling: Always have fallback logic for unknown country codes
- Publishing Context: Remember this represents publication country, not author nationality