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:
- Accept header — e.g.
Accept: application/json - format query parameter — e.g.
format=json - 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/htmlQuery
format=html (or omit format)Default when no format is specified. Useful for browser exploration.
JSON
Accept
application/jsonQuery
format=jsonStandard JSON response. Recommended for integrations.
CSV
Accept
text/csvQuery
format=csvComma-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}'