Please wait...

Weather

By: Qymera


Qymera’s Weather API updates with real-time and accurate weather information for over 200,000 cities based on data from various weather stations



Overview

  • Users can access real-time weather information for over 200,000 cities
  • Data frequently updates to give users accurate climate data as it changes. The information is gathered by global satellites and from more than 40,000 weather stations.
  • All data on our Weather API is available in JSON, XML, and HTML formats.
Using the API

We built the API to be as self-documenting as possible, but if you find yourself overwhelmed, we organized this site into four major areas.

  • Getting started introduces you to the operations offered by the API.
  • API calls gives you a hands-on experience of those operations with an interactive console.

Getting Started

The current version of the API lives at https://gateway.qymera.tech/qymera/sb/weather/v1/.

  • https://gateway.qymera.tech/qymera/sb/weather/v1/city?name=Makati
  • https://gateway.qymera.tech/qymera/sb/weather/v1/city?name=Makati&country_code=PH
  • https://gateway.qymera.tech/qymera/sb/weather/v1/zip?code=1800
  • https://gateway.qymera.tech/qymera/sb/weather/v1/zip?code=1800&country_code=PH
  • https://gateway.qymera.tech/qymera/sb/weather/v1/coordinates?longitude=135&latitude=39
Endpoints
Endpoint What it does
/city You can call by city name or city name and country code. API responds with a list of results that match a searching word.
/zip Using zip code of location to get the current weather data. Please note if country is not specified then the search works for USA as a default.
/coordinates latitude and longitude coordinates of the location of your interest for the parameters

API Calls

Headers
Key Value Description
accept application/json
x-ibm-client-id Use the given application credential id
x-ibm-client-secret Use the given application credential secret
/city
Implementation Notes

Get data by city name and country code.

Parameters:
Parameter Data Type Necessity Location Description
name string required query City Name
country_code string optional query City Country Code
Sample Request:
curl --request GET \
  --url 'https://gateway.qymera.tech/qymera/sb/weather/v1/city?name=REPLACE_THIS_VALUE&country_code=REPLACE_THIS_VALUE' \
  --header 'accept: application/json' \
  --header 'x-ibm-client-id: REPLACE_THIS_VALUE' \
  --header 'x-ibm-client-secret: REPLACE_THIS_VALUE'
Request:

GET

https://gateway.qymera.tech/qymera/sb/weather/v1/city?name=Makati

GET

https://gateway.qymera.tech/qymera/sb/weather/v1/city?name=Makati&country_code=PH

Response:

200

{
    "message": "Success.",
    "data": {
        "coord": {
            "lon": 121.02,
            "lat": 14.56
        },
        "weather": [
            {
                "id": 803,
                "main": "Clouds",
                "description": "broken clouds",
                "icon": "04d"
            }
        ],
        "base": "stations",
        "main": {
            "temp": 303.15,
            "pressure": 1014,
            "humidity": 70,
            "temp_min": 302.59,
            "temp_max": 303.71
        },
        "visibility": 9000,
        "wind": {
            "speed": 3.6,
            "deg": 80
        },
        "clouds": {
            "all": 75
        },
        "dt": 1569295399,
        "sys": {
            "type": 1,
            "id": 8160,
            "message": 0.0074,
            "country": "PH",
            "sunrise": 1569275101,
            "sunset": 1569318685
        },
        "timezone": 28800,
        "id": 1692193,
        "name": "Makati",
        "cod": 200
    }
}

404

{
    "code": -14,
    "message": "Something went wrong to weather service.",
    "data": {
        "cod": "404",
        "message": "city not found"
    }
}
/zip
Implementation Notes

Get data by location zip code and country code, but country_code is not required.

Parameters
Parameter Data Type Necessity Location Description
code string required query Location Zip Code
country_code string optional query Zip Country Code
Sample Request:
curl --request GET \
  --url 'https://gateway.qymera.tech/qymera/sb/weather/v1/zip?code=REPLACE_THIS_VALUE' \
  --header 'accept: application/json' \
  --header 'x-ibm-client-id: REPLACE_THIS_VALUE' \
  --header 'x-ibm-client-secret: REPLACE_THIS_VALUE'
Request :

GET

https://gateway.qymera.tech/qymera/sb/weather/v1/zip?code=1800

GET

https://gateway.qymera.tech/qymera/sb/weather/v1/zip?code=1800&country_code=PH

Response :
{
    "message": "Success.",
    "data": {
        "coord": {
            "lon": 122.03,
            "lat": 12.56
        },
        "weather": [
            {
                "id": 500,
                "main": "Rain",
                "description": "light rain",
                "icon": "10d"
            }
        ],
        "base": "stations",
        "main": {
            "temp": 300.868,
            "pressure": 1012.87,
            "humidity": 81,
            "temp_min": 300.868,
            "temp_max": 300.868,
            "sea_level": 1012.87,
            "grnd_level": 1006.97
        },
        "wind": {
            "speed": 5.22,
            "deg": 32.384
        },
        "rain": {
            "3h": 0.875
        },
        "clouds": {
            "all": 30
        },
        "dt": 1569384380,
        "sys": {
            "message": 0.0055,
            "country": "PH",
            "sunrise": 1569361257,
            "sunset": 1569404801
        },
        "timezone": 28800,
        "id": 0,
        "name": "Marikina Central Post Office",
        "cod": 200
    }
}

404

{
    "code": -14,
    "message": "Something went wrong to weather service.",
    "data": {
        "cod": "404",
        "message": "city not found"
    }
}
/coordinates
Implementation Notes

Get data by geographical coordinates

Parameters :
Parameter Data Type Necessity Location Description
longitude float / string required query Longitude
latitude float / string required query Latitude
Sample Request:
curl --request GET \
  --url 'https://gateway.qymera.tech/qymera/sb/weather/v1/coordinates?longitude=REPLACE_THIS_VALUE&latitude=REPLACE_THIS_VALUE' \
  --header 'accept: application/json' \
  --header 'x-ibm-client-id: REPLACE_THIS_VALUE' \
  --header 'x-ibm-client-secret: REPLACE_THIS_VALUE'
Request :

GET

https://gateway.qymera.tech/qymera/sb/weather/v1/coordinates?longitude=135&latitude=39

Response :
{
    "message": "Success.",
    "data": {
        "coord": {
            "lon": 135,
            "lat": 39
        },
        "weather": [
            {
                "id": 800,
                "main": "Clear",
                "description": "clear sky",
                "icon": "01d"
            }
        ],
        "base": "stations",
        "main": {
            "temp": 293.468,
            "pressure": 1023.42,
            "humidity": 46,
            "temp_min": 293.468,
            "temp_max": 293.468,
            "sea_level": 1023.42,
            "grnd_level": 1023.52
        },
        "wind": {
            "speed": 3.53,
            "deg": 74.771
        },
        "clouds": {
            "all": 0
        },
        "dt": 1569384469,
        "sys": {
            "message": 0.0069,
            "sunrise": 1569358176,
            "sunset": 1569401658
        },
        "timezone": 32400,
        "id": 0,
        "name": "",
        "cod": 200
    }
}

404

{
    "code": -14,
    "message": "Something went wrong to weather service.",
    "data": {
        "cod": "404",
        "message": "city not found"
    }
}