To get started with the API you require a Betfair account, an Application Key (App Key) and a valid session token.
You can open a Betfair account via https://register.betfair.com/account/registration
What is an Application Key?
An Application Key is required to make requests to the Exchange API and must be included in a 'X-Application' HTTP header for all API requests.
Betfair use the Application Key to identify all requests that are made to the Exchange API.
In order to use the Betting & Accounts API, you need to have an Application Key. The Application Key identifies your API client.
Two App Keys are assigned to a single Betfair account, one Delayed App Key (for dev & testing) and one Live
You must pass the Application Key with every HTTP request. You do this by setting the HTTP header with the value of the key assigned by Betfair.
How do I create an Application Key?
You can create an Application Key by using the createDeveloperAppKeys service via the Accounts API Demo Tool.
Please follow the instructions below:
- Click on the Accounts API Demo Tool link & ensure the the Endpoint "PROD"/"UK" is selected.
- Select the createDeveloperAppKeys operation from the list of Operations on the top left hand side of the visualiser.
- Login to www.betfair.com via a separate browser tab and refresh the page to automatically input the Session Token field into the Session Token(ssoid) field.
- Enter your Application Name (this must be unique) in the 'Request' column. The Application Name can be any name of your choice, but like your Betfair username, must be unique.
- Press Execute at the bottom of the 'Request' column.
Two Application Keys will then be created and displayed in the Developer Apps column of the demo tool, a Delayed App Key (Active) and a Live App Key (Inactive)
- The X-Application header is not required when using the createDeveloperAppKeys or the getDeveloperAppKeys service.
- The Application Name must be unique.
Please see our Getting Started guide for further information of how to start making requests to the API
How do I apply for a Live Application key?
To apply for a Live Application key please take note of the below and provide answers to the following information:
Before applying, please:
- Complete any testing using your Delayed Application key.
- Ensure that your account has been fully verified in line with our KYC policy. Please note: We do not accept licence applications from India, Bangledesh, Sri Lanka or the UAE.
- Check that your account is funded to cover the £299 activation fee.
Please note: A one-off activation fee of £299 applies; this is debited directly from your Betfair account once access is approved.
To apply for a Live Application key please contact Developer Support and provide ALL of the following information:
- Please describe why you need access to the API*
- Have you completed your coding and testing using the Delayed App Key? *
- What sports and markets will you bet into? *
- Of the markets you read, what percentage do you expect to place bets in? *
- What number of bets will you place per market? *
- Your anticipated monthly betting volume? *
- Do you work for or on behalf of a betting operator or any supplier to a betting operator, or have you in the past? If yes, please provide full details. *
- Where did you hear about the Betfair API? *
- Confirm that your App Key and access is for my own private use for the purpose of betting on the Betfair Exchange. This access will not be used in any commercial context