Skip to content

Commit ae385a9

Browse files
committed
Transfer API to RapidAPI
1 parent e78df8b commit ae385a9

File tree

19 files changed

+761
-870
lines changed

19 files changed

+761
-870
lines changed

src/.vuepress/config.js

Lines changed: 11 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -398,10 +398,6 @@ module.exports = {
398398
title: 'Overview',
399399
path: 'stations/'
400400
},
401-
{
402-
title: 'Finding Stations',
403-
path: 'stations/search'
404-
},
405401
{
406402
title: 'Nearby Stations',
407403
path: 'stations/nearby'
@@ -418,9 +414,13 @@ module.exports = {
418414
title: 'Daily Data',
419415
path: 'stations/daily'
420416
},
417+
{
418+
title: 'Monthly Data',
419+
path: 'stations/monthly'
420+
},
421421
{
422422
title: 'Climate Normals',
423-
path: 'stations/climate'
423+
path: 'stations/normals'
424424
}
425425
]
426426
},
@@ -441,28 +441,18 @@ module.exports = {
441441
path: 'point/daily'
442442
},
443443
{
444-
title: 'Climate Normals',
445-
path: 'point/climate'
446-
}
447-
]
448-
},
449-
{
450-
title: 'Wrapper',
451-
collapsable: false,
452-
children: [
453-
{
454-
title: 'JavaScript',
455-
path: 'wrapper/javascript'
444+
title: 'Monthly Data',
445+
path: 'point/monthly'
456446
},
457447
{
458-
title: 'PHP',
459-
path: 'https://gitlab.com/dweipert.de/meteostat'
448+
title: 'Climate Normals',
449+
path: 'point/normals'
460450
}
461451
]
462452
},
463453
{
464-
title: 'Get A Key',
465-
path: 'https://auth.meteostat.net/'
454+
title: 'Playground',
455+
path: 'https://rapidapi.com/meteostat/api/meteostat/'
466456
}
467457
]
468458
}

src/api/README.md

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,41 +2,42 @@
22

33
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.
44

5-
::: tip Donation
6-
Help Meteostat provide free weather and climate data by making a [donation](/contributing.html#donations).
7-
:::
5+
Meteostat uses [RapidAPI](https://rapidapi.com/meteostat/api/meteostat/), an API marketplace which makes it easy for developers to use thousands of APIs through a common platform.
86

9-
The API is available via this URL:
7+
This is the base URL for all endpoints:
108

119
```
12-
https://api.meteostat.net
10+
https://meteostat.p.rapidapi.com
1311
```
1412

15-
Access to the API requires users to send their API 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. For instance, the `source` string which holds the names of the organizations which provided the raw data. The `data` property is either an object or an array that contains the actual data output.
13+
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.
1614

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

19-
## API Key
17+
## Sign Up
2018

21-
Please submit this [**form**](https://auth.meteostat.net/) to apply for an API key.
19+
Please sign up on [RapidAPI](https://rapidapi.com/signup) to get an API key. Before you can call the Meteostat JSON API, you'll need to subscribe to one of [our plans](https://rapidapi.com/meteostat/api/meteostat/pricing). But don't worry - you'll get 500 monthly calls for free.
2220

2321
## Quick Start
2422

2523
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:
2624

2725
```sh
28-
curl --header "x-api-key: {key}" "https://api.meteostat.net/v2/stations/meta?id=10637"
26+
curl --request GET \
27+
--url 'https://meteostat.p.rapidapi.com/stations/meta?id=10637' \
28+
--header 'x-rapidapi-host: meteostat.p.rapidapi.com' \
29+
--header 'x-rapidapi-key: {key}'
2930
```
3031

3132
You should see meta information for the weather station _Frankfurt Airport_ in JSON format.
3233

33-
## Quota
34+
## Plans & Quota
3435

35-
Free access to the Meteostat API is limited to 2,000 requests per day and no more than two requests per second. Once this limit is reached, all of your requests will result in HTTP 429, too many requests, until your quota is cleared.
36+
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](https://rapidapi.com/meteostat/api/meteostat/pricing).
3637

3738
## Authentication
3839

39-
When retrieving data from Meteostat API endpoints make sure to send the `x-api-key` header along with every request. You cannot use the `key` URL parameter to authenticate API calls as in version 1.
40+
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.
4041

4142
## Status Codes
4243

@@ -45,8 +46,8 @@ All Meteostat API endpoints return one of the following status codes. You can ut
4546
| **Code** | **Description** |
4647
|:---------|:-------------------------------------------------------------|
4748
| 200 | _Success_: Alls is fine |
48-
| 400 | _Bad Request_: Please check the request parameters |
49-
| 401 | _Unauthorized_: Make sure to send a valid `x-api-key` header |
49+
| 400 | _Bad Request_: Please check the query parameters |
50+
| 401 | _Unauthorized_: Make sure to send a valid RapidAPI key |
5051
| 403 | _Forbidden_: You're not allowed to access this endpoint |
5152
| 404 | _Not Found_: This endpoint doesn't exist |
5253
| 429 | _Too Many Requests_: You've exceeded the quota |

src/api/point/README.md

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -8,26 +8,10 @@ While weather stations provide data that was measured at a specific location, po
88

99
## Remarks
1010

11-
Point data is currently considered an **experimental feature**. The way data is being interpolated is still subject to changes. Moreover, point data **only returns data if there is at least one nearby weather station** that reported observations in the desired period. The model output is by no means a substitute for actual observations.
12-
13-
We encourage API users to give the new feature a try. Please get in touch with Meteostat for feedback and suggestions.
11+
Point data **only returns data if there is at least one nearby weather station** that reported observations in the desired period. The model's quality is varying based on the number and proximity of nearby weather stations.
1412

1513
## Data Model
1614

1715
Point data provides more complete time series, as observations of multiple stations are joined together. The data output is being interpolated based on the geographical distance between the different weather stations and the reference point of the query. Additionally, Meteostat adjusts measurements based on environmental circumstances and differences in altitude.
1816

19-
Meteostat projects the existing observations which are provided by weather stations around the world to the location specified in the request. Long-term climate averages are based on the incredible [WorldClim](https://worldclim.org/) project. For more precise model output, please provide the elevation of your location using the `alt` parameter.
20-
21-
## Endpoints
22-
23-
Meteostat provides three different endpoints for point data:
24-
25-
* [Hourly Data](hourly.md)
26-
* [Daily Data](daily.md)
27-
* [Climate Normals](climate.md)
28-
29-
## Vision
30-
31-
The use cases for historical weather data are diverse. While actual observations of professional weather stations are crucial for science and research, model data provides a better coverage across the globe. Point data is an addition to the thousands of weather stations which are available through Meteostat.
32-
33-
With a growing community of developers and contributors who are using and building Meteostat, we will be able to provide even better model output in the future. We are visioning a machine learning based approach for point data which allows our model to improve over time.
17+
Meteostat projects the existing observations which are provided by weather stations around the world to the location specified in the request. For more precise model output, please provide the elevation of your location using the `alt` parameter.

src/api/point/climate.md

Lines changed: 0 additions & 181 deletions
This file was deleted.

0 commit comments

Comments
 (0)