Before starting to use API service, you need to do some simple configuration and preparation.
Make sure you have created a Project and Web API KEY, otherwise refer to Project and KEY.
Generally, a complete API request URL consists of scheme, host, port, path and query parameters. (Of course, it may be called differently in different programs, we only refer to RFC 3986)
https://api.qweather.com/v7/weather/now?location=xxx&key=xxx \___/ \______________/\______________/\__________________/ scheme host (port) path query parameters
- scheme: https
- host: api.qweather.com
- port: 443
- path: /v7/weather/7d?
- query parameters: location=xxx&key=xxx
API host may vary depends on subscription and data, please refer to the instructions in the development guide.
Note: You must use the API host:
devapi.qweather.comfor Free subscriptions. The exception is GeoAPI, which use
geoapi.qweather.comregardless of Free or Standard subscriptions.
Building an API URL is not difficult for most developers, but we still strongly recommend that you read the Best Practices- Optimize requests for troubleshooting and experience.
QWeather’s Web API uses Gzip for compression by default, which will greatly reduce network traffic and speed up requests. See Best Practices - Gzip.
Please copy and paste the following link into your browser and see what the response is. Replace the
key with your own.
- For Standard subscription, please copy the following link
- For Free subscription, please copy the following link