# JSON API

The Meteostat JSON API provides simple access to a large archive of historical weather and climate data. The records are queried by weather station or geo location and can be filtered by specifying a date range and other optional parameters.

Meteostat uses RapidAPI (opens new window), an API marketplace which makes it easy for developers to use thousands of APIs through a common platform.

This is the base URL for all endpoints:

https://meteostat.p.rapidapi.com

Access to the API requires users to send their RapidAPI key along with every request. All API endpoints return a JSON object that contains two properties: meta and data. The meta object provides general information about the data output and debugging information. The data property is either an object or an array that contains the actual data output.

All API endpoints are accessible using HTTP Get requests. For debugging, please utilize the HTTP status code of the response.

# Sign Up

Please sign up on RapidAPI (opens new window) to get an API key. Before you can call the Meteostat JSON API, you'll need to subscribe to one of our plans (opens new window). But don't worry - you'll get 500 monthly calls for free.

# Quick Start

Once you have your API key, head over to your terminal, replace the {key} parameter with your personal API key and execute the following command:

curl --request GET \
	--url 'https://meteostat.p.rapidapi.com/stations/meta?id=10637' \
	--header 'x-rapidapi-host: meteostat.p.rapidapi.com' \
	--header 'x-rapidapi-key: {key}'

You should see meta information for the weather station Frankfurt Airport in JSON format.

# Plans & Quota

Meteostat uses a freemium model for its API. We offer a free plan with a hard limit of 500 requests per month. If you need a higher quota, please choose any of our paid plans (opens new window).

# Authentication

When retrieving data from Meteostat API endpoints make sure to send the X-RapidAPI-Key header along with every request. RapidAPI also supports passing the API Key via query parameter. You can do this by including the rapidapi-key parameter in your request.

# Status Codes

All Meteostat API endpoints return one of the following status codes. You can utilize them for debugging.

Code Description
200 Success: Alls is fine
400 Bad Request: Please check the query parameters
401 Unauthorized: Make sure to send a valid RapidAPI key
403 Forbidden: You're not allowed to access this endpoint
404 Not Found: This endpoint doesn't exist
429 Too Many Requests: You've exceeded the quota
503 Service Temporarily Unavailable: The API is currently down
Last Updated: 6/23/2021, 12:30:43 PM