Introduction

API Reference

The Frogcast API provides an easy way to integrate your weather forecast data with any external system.

The API is organised around REST semantics, uses JSON to encode objects, and relies on standard HTTP codes to signal operation outcomes. 

The Frogcast API doesn't support bulk updates. You can work on only one object per request.

We release new versions and tailor features. Log in to see docs customized to your version of the API, with your key and data.

If you find any features missing or have any suggestions, please contact us.

Free Usage and Paid Subscription 

Registration is free and access is immediate.
New users are granted a single location, regardless of their geographic area.
Once these free requirements are exhausted, users will be offered a paid subscription and can upgrade their locations.
See our pricing and plans page for more details.

Authentication

Frogcast uses a simple token-based authentication.
All API requirements must be authenticated and made via HTTPS.
  • Your token is automatically generated when you register on the app.frogcast.
  • Once you sign in, you can access it here https://app.frogcast.com/fr/api/ 
  • The token must be added in the header.

Key

Value

Authorization

Token {your token}

Your API token has the same privileges as your user account, so be sure to keep them secret!
Do not share your secret API keys in publicly accessible areas.
API requests without authentication will fail.

Errors

Frogcast uses conventional HTTP response codes to indicate the success or failure of an API request.

In general:
  • Codes in the 2-- range indicate success.
  • Codes in the 4-- range indicate an error that failed given the information provided (e.g., a required parameter was omitted, a charge failed, etc.).
  • Codes in the 5-- range indicate an error with Frogcast's servers.

HTTP Status Summary

StatusCode

Result

Content

200     OK

Success

Everything worked as expected

400     Bad Request 

Error

The request was unacceptable, often due to missing a required parameter.


401     Unauthorized

Error

No valid API key provided

403     Forbidden



Error

The APi doesn't have permissions to perform the request.

500     Internal Server Error

Failed

Something unexpected went wrong during the request.

Please contact us if this continues, and include any error messages received from the failed request

502     Bad Gateway Error

Failed

Something unexpected went wrong during the request, probably due a server timeout. Try again after 30 seconds.

Please contact us if this continues, and include any error messages received from the failed request

Set of requests

All the requirements are presented in this section.
You will find everything you need to create your first request very simply.

Main API url           https://api.frogcast.com/api/v1/

GET

Weather forecasts

Frogcast by request 

Once you’ve taken out a Frogcast by request subscription, you can obtain forecasts by querying the forecast endpoint with the latitude and longitude parameters you require.

API endpoint    https://api.frogcast.com/api/v1/forecast/


import pandas as pd

import requests
headers = {'Authorization':'Token {your token}'}

url = 'https://api.frogcast.com/api/v1/forecast/'

parameters = {'latitude':45.63562,
'longitude': 5.63256,
'time_step':60,
'horizon':2880,
'fields':"ghi"}

api_data = requests.get(url=url,params=parameters,headers=headers).json()

forecast = pd.DataFrame(data=api_data['data'], index=api_data['index'], columns=api_data['columns'])

print(forecast)
                                           

Language

Python

The answer of the server must be 201.
The answer 201 returns a dictionary with forecasts

GET

All fields

To get a detailed list of all variables available on the Frogcast platform.
  • Each variable is identified by it's "id" field. Use that value when you want to request a new variable for a location for example
  • All variables are available with quantiles.
From pMin (p00) to pMax (p100) quantiles. In steps of 10
To call up the quantiles, simply add the suffix "_p.." fields to your query parameters. (eg:t2m_p10,t2m_p20,....)



API endpoint     https://api.frogcast.com/api/v1/allfields/

Requests parameters

There are different parameters to customize your query:
  • The timezone is UTC by default. 

Parameters

Data Type

Description

latitude

Numeric (double)

  • in degrees and decimal degrees (-90° to +90°)
    example : 45.369

longitude

Numeric (double)

  • in degrees and decimal degrees (-180° to +180°)
    example : 8.369

data_format 

String (str)

  • split (default): original format of the api
  • records: fully detailed record with name of field and value for each time step
  • tight: tight version of the data that can be used for data visualization

precision

Integer (int)

  • default = 2

horizon

Integer (int)

  • specified in minutes
  • available values depend on your contract 

fields

String (str)

  • the variables available in the API call depend on your contract.
  • you can specify the list of fields separated by a ',' for example: t2m,ghi

time_step

String (str)

  • default is 60min
  • available values : 1,5,10,15,30,60

date_time_format

String (str)

  • default is in ISO 8601 UTC format, like "2022-01-01T00:00:00Z"
  • you can specify "time_stamp" to get unix time stamp

time_stamp_unit

String (str)

  • to be specified only if the unix timestamp format is requested
  • default is "s" to get unix timestamp in seconds,
  • but you can specify "ms" to get your data in milliseconds

Datasheet

You will find here the detailed specifications of all the variables proposed by Frogcats : 
  • Main API url      https://api.frogcast.com/api/v1/allfields/
  • Quantiles are avaibale for all the variables (from p_00 to p_100). Expect for wind_direction

Category

Short Name

Long Name

Description

Unity

Frogcast Tutorials

Learn how to use Frogcast interface