Skip to main content
POST
/
forecast
Get weather forecast for multiple locations with custom settings
curl --request POST \
  --url http://pinpoint.devops.arabiaweather.com/forecast \
  --header 'Content-Type: application/json' \
  --data '
{
  "parameters": [
    "<string>"
  ],
  "daily_parameters": [
    "<string>"
  ],
  "locations": [
    {
      "id": "<string>",
      "lat": 123,
      "lng": 123
    }
  ],
  "cache": true,
  "start": "now",
  "interval": 24,
  "daily": true,
  "segments": "false",
  "hourly": true,
  "overrides": true,
  "nowcast": false,
  "step": 1,
  "timezone": "<string>",
  "model": "default",
  "hijri": false,
  "info": false
}
'
{
  "locations": [
    {
      "id": "<string>",
      "info": {
        "name": {
          "en": "<string>",
          "ar": "<string>"
        },
        "lat": 123,
        "lng": 123,
        "timezone": "<string>",
        "elevation": 123,
        "countryCode": "<string>",
        "regionId": "<string>"
      },
      "hourly": [
        {
          "time": 123,
          "period_of_day": "morning",
          "is_day": true,
          "local_time": "2023-11-07T05:31:56Z",
          "data": {}
        }
      ],
      "daily": [
        {
          "date": "2023-12-25",
          "day_time": {},
          "night_time": {},
          "hijri": {}
        }
      ],
      "segments": [
        {}
      ]
    }
  ]
}

Body

application/json
parameters
string[]

List of weather parameters to include

daily_parameters
string[]

List of daily-only weather parameters to include

locations
object[]

List of locations to get forecasts for

cache
boolean
default:true

Whether to use the current cache if available (default: true). Setting cache=false will invalidate the cache and return fresh data.

start
string
default:now

Start time for the forecast

interval
integer
default:24

Forecast interval in hours

daily
boolean
default:true

Whether to include daily forecast overview

segments
enum<string>
default:false

Segmented overview mode

Available options:
true,
false,
day,
3hrs,
6hrs
hourly
boolean
default:true

Whether to include hourly forecasts

overrides
boolean
default:true

Whether to apply overrides to the forecast data

nowcast
boolean
default:false

Whether to include nowcast data

step
integer
default:1

Time step in hours

timezone
string

Timezone to use for the forecast

model
string
default:default

Weather model to use

hijri
boolean
default:false

Whether to include Hijri date information

info
boolean
default:false

Whether to include location information

Response

Weather forecast data

locations
object[]