The Pollstar API provides a powerful interface to Pollstar data.
The free version of the API is available to everyone, but it is restricted to fetching the same data that is available on the website for a customer who is not signed in. This means that it can be used to fetch upcoming event lists for artists and venues, as well as detailed information on each event including the full event lineup, venue, date, and 3rd party ticket links. It cannot be used to obtain information regarding past events, box office history, contact information or any other information that requires a paid Pollstar subscription to access.
We will be providing additional levels of access that will allow customers to request more advanced data, such as contact information, box office numbers and so on.
Activating the Free API
To enable API access, you must first have a Pollstar account on the pollstar.com website. Any type of account is fine – you do NOT need to be a paid subscriber in order to access the free version of the API.
Once you have an account, you can simply visit the link below and enable the API (after you agree to the Terms of Service) and that’s it!
Upgrading your API access
Currently, the only version of the API that is available is the free version. We will be announcing additional paid access levels “soon”…. keep an eye on this page for updates!
Using the API
The API uses OAUTH 2.0 to authenticate requests. If you are unfamiliar with this protocol, it’s worth spending a few minutes familiarizing yourself with the basic flow of operations. There are numerous freely available public libraries to assist with creating an OAUTH 2.0 client implementation, and it is highly recommended that you use one of them, rather than trying to roll your own implementation.
Additionally, it is strongly recommended that you download and install PostMan – a free tool to help you develop and work with API’s.
An over- simplified flow of operations is as follows:
Provide your Client Id and Client Secret to the server
Once the API is activated, you should see an API Configuration link in your customer control panel. In here, you will find your client id and client key. In order to obtain a valid token you will need to POST both of these items to the https://data.pollstar.com/api/v3/token endpoint. For more information, refer to the Get Token documentation.
The server will respond with a token
If your request is valid, and your credentials are authorized, then you will receive a response token.
The token has a lifetime of 20 minutes, during which time you can freely use it as many times as necessary. Once it expires, you will need to obtain a new token. This process can be greatly simplified by using a third-party library to manage the tokens and requests for you.
Use the token to obtain data from the other endpoints
Now that you have a valid token, you will need to attach it to the header of your GET requests to the other endpoints, so that the server can authenticate you. You will need to add the following fields to the HTTP GET request header:
- This header field is used to determine the format of the returned data. It must be either application/json or application/xml
- The authorization field is where you attach your token, with the word Bearer at the front of it. A properly formatted token will look something like this:
- Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1DAzZTRlYmFhMz
Once you have constructed your HTTP headers, you can simply GET the data, by submitting a HTTP GET request to an appropriate endpoint, such as this:
And that’s it!