Methodology
Commercial Products
Commercial User GuideHobbyist and Research Products
Help & Support
Quickstart Guide
Below is a guide to make your first time series API call. If you have recently registered for an Solcast commercial toolkit account please follow the below to make your first API call at one of the Solcast unmetered locations.
Introduction
Welcome to your first API project using Solcast! This guide will walk you through creating an API to retrieve historical radiation and weather data, crucial for solar energy analysis.
Prerequisites
- Basic Knowledge: Understanding of HTTP, JSON, and RESTful APIs.
- Tools Required: Postman (for testing)
- Solcast Toolkit Account: Register for a Toolkit account as you will require an API key to be used with the below.
- API Key: Which you can obtain from the following page
Step 1: Understanding the Solcast API
Solcast provides a powerful API to access historical solar radiation and weather data. The API is RESTful, meaning you’ll interact with it using standard HTTP methods like GET.
For this document, we are going to focus on using Postman to make your first API query.
Step 2: Setting Up Your Environment
- Install/Log into Postman: Portal
Step 3: Creating Your First API Request
- Log Into The Toolkit: Solcast API Toolkit
- Obtain Your API Key: Toolkit API Key
- Within Postman
- Create a new collection, selecting blank collection
- Call the collection: Solcast
- Select add a request
- Name the request “TMY Radiation and Weather”
- Copy and paste the below code into the GET method
- Select the ‘Authorization’ tab below the API URL
- Select Bearer Token
- Copy and paste your API key into the Token section
- Select Send
https://api.solcast.com.au/data/tmy/radiation_and_weather?latitude=-33.856784&longitude=151.215297&format=json
Note: You will need an TMY plan applied to your account in order to make the following request. TMY radiation and weather is included within the Solcast evaluation plan. The following request utilises our unmetered locations, so it will not be deducted from your usage allowance.
Step 4: Testing Your API
- Once you have completed the above, repeat the steps, modifying the parameters to your own specifications.
- Mandatory parameters for a radiation and weather request include:
- latitude
- longitude
- All other parameters for TMY radiation and weather are optional. These are:
- azimuth
- tilt
- array_type
- period
- output_parameters
- format
- time_zone
- terrain_shading
- ghi_weight
- dni_weight
Step 5: Error Handling
- If you receive a 403 Forbidden error message, this likely indicates that an applicable plan has not been applied to your account. Please reach out to support@solcast.com for further assistance.
- Implement error handling in your code to manage issues like invalid API keys or incorrect parameters.
- Implement exponential retry if 429xx errors are encountered.
- For details regarding 4xx errors, please visit Solcast Data Troubleshooting
Step 6: Next Steps
- Deploying the API: Consider deploying your API to a cloud platform.
- View your API Usage and Plan Details: Manage Subscription
- Alternate Deployment: Consider using the Python SDK to deploy your testing.
- View further TMY documentation on our knowledge base or revisit the TMY page on the Solcast website
Conclusion
You’ve successfully created and tested your first API using Solcast! Continue exploring the API documentation for more advanced features.
For more details, visit the Solcast Knowledgebase
Should you encounter any issues or errors, please contact