Forecast.Solar

Restful API for Solar plant production and Weather forecast data


Misc

Check location

To make sure to have a valid location, check it with

https://api.forecast.solar/check/:lat/:lon

For example the demo location (center of Germany)

https://api.forecast.solar/check/51.15/10.45

will give this:

{
    "result": {
        "latitude": 51.15,
        "longitude": 10.45,
        "place": "99986 Niederdorla, Unstrut-Hainich-Kreis, Thüringen, DE",
        "timezone": "Europe/Berlin"
    },
    "message": {
        "code": 0,
        "type": "success",
        "text": "",
        "info": [],
        "ratelimit": {
            "period": 3600,
            "limit": 12,
            "remaining": 11
        }
    }
}

Any invalid location will result in a HTTP status 400 and error code 600.

{
    "result": null,
    "message": {
        "code": 600,
        "type": "error",
        "text": "No valid location at ...",
        "info": [],
        "ratelimit": {
            "period": 3600,
            "limit": 12,
            "remaining": 10
        }
    }
}