Response formats

Data endpoints can return JSON, CSV, or HTML. JSON is recommended for integrations. Choose a format with the format query parameter, the Accept header, or a file extension on the path.

Selecting a format

On GET requests you can choose the response format in three ways:

  1. Accept header — e.g.Accept: application/json
  2. format query parameter — e.g.format=json
  3. File extension on the path — e.g./data/forecast/radiation_and_weather.json

On POST,PUT, andPATCH requests, send request parameters in the JSON body and select the response format with the Accept header or a format query parameter on the URL.

Common formats

HTML
Accept text/html
Query format=html (or omit format)

Default when no format is specified. Useful for browser exploration.

JSON
Accept application/json
Query format=json

Standard JSON response. Recommended for integrations.

CSV
Accept text/csv
Query format=csv

Comma-separated values plain text. Available on supported data endpoints.

Format examples

Requesting different response formats

GET — format query (JSON)
curl "https://api.solcast.com.au/data/forecast/radiation_and_weather?latitude=-33.8567&longitude=151.2152&format=json" \
  -H "Authorization: Bearer $API_KEY"
GET — Accept header
curl "https://api.solcast.com.au/data/forecast/radiation_and_weather?latitude=-33.8567&longitude=151.2152" \
  -H "Authorization: Bearer $API_KEY" \
  -H "Accept: application/json"
GET — file extension
curl "https://api.solcast.com.au/data/forecast/radiation_and_weather.csv?latitude=-33.8567&longitude=151.2152" \
  -H "Authorization: Bearer $API_KEY"
POST — format via query string
curl -X POST "https://api.solcast.com.au/resources/pv_power_site?format=json" \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"resource_id":"your-resource-id","name":"My Site","latitude":-33.8567,"longitude":151.2152}'