Locales
Supported Marketplaces
Section titled “Supported Marketplaces”audible-api-ts supports all 10 Audible marketplaces:
| Locale | Country | Amazon Domain | Audible Domain |
|---|---|---|---|
fr | France | amazon.fr | audible.fr |
com | United States | amazon.com | audible.com |
co.uk | United Kingdom | amazon.co.uk | audible.co.uk |
de | Germany | amazon.de | audible.de |
it | Italy | amazon.it | audible.it |
es | Spain | amazon.es | audible.es |
ca | Canada | amazon.ca | audible.ca |
com.au | Australia | amazon.com.au | audible.com.au |
in | India | amazon.in | audible.in |
co.jp | Japan | amazon.co.jp | audible.co.jp |
Pass the locale when generating the login URL:
import { login } from 'audible-api-ts'
// French marketplaceconst fr = await login('fr')
// US marketplaceconst us = await login('com')
// Japanese marketplaceconst jp = await login('co.jp')The locale is stored in the credentials and automatically used for all subsequent API calls.
Locale Configuration
Section titled “Locale Configuration”You can access the full locale configuration:
import { AUDIBLE_LOCALES } from 'audible-api-ts'
const frConfig = AUDIBLE_LOCALES['fr']// { domain: 'fr', marketplaceId: 'A2728XDNODOQ8T', countryCode: 'fr' }Each locale config contains:
| Field | Description |
|---|---|
domain | The Amazon/Audible domain suffix |
marketplaceId | Amazon’s internal marketplace identifier |
countryCode | Two-letter country code used in auth URLs |
Type Safety
Section titled “Type Safety”The AudibleLocale type is a string union — TypeScript will catch invalid locales at compile time:
import type { AudibleLocale } from 'audible-api-ts'
const locale: AudibleLocale = 'fr' // OKconst invalid: AudibleLocale = 'xyz' // Type error!