API Numbeo


Routes appelées

PREFIX: https://www.numbeo.com/api

GET {PREFIX}/country_prices

Paramètre de la requête

interface CountryPricesRequestQueryParams {
  api_key: string
  country?: string // ISO3166 code ou comme stocké dans la BDD Numbeo
  currency?: string
}

Réponse type

GET {PREFIX}/country_prices?api_key=API_KEY&country=Kuwait

{
  "monthLastUpdate":4,
  "contributors":45,
  "name":"Kuwait",
  "prices":[
    {
      "average_price":6.061485913570016,
      "item_name":"Meal, Inexpensive Restaurant, Restaurants",
      "highest_price":13,
      "item_id":1,
      "lowest_price":3.36080278998022,
      "data_points": 40
    },
    {
      "average_price":1.3874939824286925,
      "item_name":"Oranges (1kg), Markets",
      "highest_price":1.5,
      "item_id":111,
      "lowest_price":1.25,
      "data_points": 40
    },
    {
      "average_price":1.3975,
      "item_name":"Potato (1kg), Markets",
      "highest_price":1.79,
      "item_id":112,
      "lowest_price":0.8,
      "data_points": 22
    },
    {
      "average_price":2.0949999999999998,
      "item_name":"Lettuce (1 head), Markets",
      "highest_price":3.5,
      "item_id":113,
      "lowest_price":0.89,
      "data_points": 25
    },
    {
      "average_price":3.71844212292207,
      "item_name":"Cappuccino (regular), Restaurants",
      "highest_price":7,
      "item_id":114,
      "lowest_price":1.97376849168828,
      "data_points": 40
    }
  ],
  "yearLastUpdate":2012,
  "currency":"USD"
}

GET {PREFIX}/city_prices

Paramètre de la requête

interface CityPricesRequestQueryParams {
  api_key: string
  // Nom de l'endroit pour lequel le résultat est demandé, de préférence suivi d'une virgule et du nom du pays,
  // ou des coordonnées de latitude et de longitude de la ville.

  // Exemples : 'Londres, Royaume-Uni', 'New York, NY, États-Unis' et '51.509865, -0.118092'.
  // Les noms internationalisés ou ambigus sont généralement acceptables car les noms sont résolus avec notre service de géolocalisation interne vers des identifiants de villes internes.
 
  query?: string
  city?: string // comme stocké dans la BDD Numbeo
  country?: string // ISO3166 code ou comme stocké dans la BDD Numbeo
  currency?: string
  // Si réglé sur false, pour les villes avec une faible couverture de données, le moteur n'essaiera pas d'estimer les valeurs à partir des villes voisines (par défaut : true).
  use_estimated: boolean 
}

Réponse type

GET {PREFIX}/city_prices/city_prices?api_key=your_api_key&query=London,%20United%20Kingdom

{
  "name":"London, United Kingdom",
  "currency":"GBP",
  "contributors12months":943,
  "monthLastUpdate":4,
  "contributors":564,
  "yearLastUpdate":2022,
  "prices":[
    {
      "data_points":82,
      "item_id":1,
      "lowest_price":10,
      "average_price":15,
      "highest_price":30,
      "item_name":"Meal, Inexpensive Restaurant, Restaurants"
    },
    {
      "data_points":69,
      "item_id":5,
      "lowest_price":4,
      "average_price":5,
      "highest_price":7,
      "item_name":"Imported Beer (0.33 liter bottle), Restaurants"
    },
    {
      "data_points":71,
      "item_id":11,
      "lowest_price":1.2344128765489017,
      "average_price":2.2980851064307743,
      "highest_price":3.600000000144,
      "item_name":"Eggs (regular) (12), Markets"
    }
  ],
  "city_id":6512
}

GET {PREFIX}/indices

Paramètre de la requête

interface IndicesRequestQueryParams {
  api_key: string
  // Nom de l'endroit pour lequel le résultat est demandé, de préférence suivi d'une virgule et du nom du pays,
  // ou des coordonnées de latitude et de longitude de la ville.

  // Exemples : 'Londres, Royaume-Uni', 'New York, NY, États-Unis' et '51.509865, -0.118092'.
  // Les noms internationalisés ou ambigus sont généralement acceptables car les noms sont résolus avec notre service de géolocalisation interne vers des identifiants de villes internes.

  query?: string
  city?: string // comme stocké dans la BDD Numbeo
  country?: string
  city_id?: string // comme stocké dans la BDD Numbeo
}

Réponse type

GET {PREFIX}/indices?api_key=your_api_key&query=London,%20United%20Kingdom

{
   "crime_index":53.34230941855818,
   "cpi_and_rent_index":72.07527649109899,
   "purchasing_power_incl_rent_index":80.67989242778127,
   "property_price_to_income_ratio":16.705588892782238,
   "contributors_healthcare":359,
   "safety_index":46.65769058144182,
   "traffic_co2_index":1869.8414096916301,
   "traffic_inefficiency_index":189.4021258120608,
   "contributors_traffic":241,
   "rent_index":65.21959376191104,
   "health_care_index":70.75969570552323,
   "groceries_index":58.43652054116736,
   "contributors_property":98,
   "pollution_index":58.27208464176413,
   "traffic_time_index":43.95594713656387,
   "restaurant_price_index":76.89401514383184,
   "contributors_cost_of_living":564,
   "climate_index":88.25433798690545,
   "cpi_index":78.33661180190455,
   "quality_of_life_index":127.95751313724718,
   "contributors_pollution":370,
   "contributors_crime":1027,
   "traffic_index":155.89160368069412,
   "name":"London, United Kingdom",
   "city_id":6512
}

GET {PREFIX}/country_indices

Paramètre de la requête

interface CountryIndicesRequestQueryParams {
  api_key: string
  country?: string
}

Réponse type

GET {PREFIX}/country_indices?api_key=your_api_key&country=Kuwait

{
   "health_care_index":66.75925925925927,
   "crime_index":38.84500915750915,
   "traffic_time_index":17,
   "purchasing_power_incl_rent_index":104.48707062276117,
   "cpi_index":77.32543080858119,
   "pollution_index":69.3103448275862,
   "traffic_index":93.60606499265447,
   "quality_of_life_index":141.4787210994602,
   "cpi_and_rent_index":58.15013366824719,
   "groceries_index":71.8735218572076,
   "safety_index":61.154990842490825,
   "name":"Kuwait",
   "rent_index":37.49969632054832,
   "traffic_co2_index":4256,
   "restaurant_price_index":75.45173244741275,
   "traffic_inefficiency_index":52.48906353257302,
   "property_price_to_income_ratio":6.989395647748136
}

GET {PREFIX}/cities

Paramètre de la requête

interface CountryIndicesRequestQueryParams {
  api_key: string
  country?: string
}

GET {PREFIX}/cities?api_key=your_api_key

Réponse type

{
   "cities":[
      {
         "country":"Brazil",
         "city":"Sao Paulo",
         "latitude":-23.5503279,
         "city_id":7392,
         "longitude":-46.6339647
      },
      {
         "country":"United Kingdom",
         "city":"London",
         "latitude":51.5072759,
         "city_id":6512,
         "longitude":-0.1276597
      },
      {
         "country":"Australia",
         "city":"Sydney",
         "latitude":-33.8674869,
         "city_id":3581,
         "longitude":151.2069902
      }
   ]
}