SportsGen API Help

API Integration Information

The idea of our Application Programming Interface (API) service is to have your sports organisation's draws, results and upcoming game information directly integrated into your sports website. The actual data for the draws and results will be hosted permanently by us so you can rely on it being there for many years to come. Your sports website will fetch the live draws and results data from our site, then the information will be automatically rendered into the page on your website. The advantage is that when the draw or results are updated, the changes are automatically reflected on your own website.

We offer a well priced service to perform this API integration for you. If you are interested, please contact us for a quote. The price will be based on an hourly rate and will depend on the complexity of your website. Alternatively you can contact your web master or a local website development company to implement it for you. Web Developers from other companies are welcome to read the API documentation linked below and contact us with any queries.

The API is only available for users who have purchased a licence at some point. It is not available for the free licence. API access will remain if your licence expires so that past draws and results don't suddenly disappear from your website.

JSONP API Technical Documentation

Currently we offer our API in JSON / JSONP format. JavaScript Object Notation is a very simple, text-based, open standard designed for human-readable data interchange. It is much simpler than XML and has a lower overhead. We offer JSONP to correctly bypass same origin policy restrictions implemented by web browsers. Alternatively Cross-origin resource sharing (CORS) and standard JSON can be used with a normal Ajax request but there isn't any support for it on IE9 browsers or lower. Therefore JSONP is the safest option if you want cross browser compatibility. There are two main ways to access our API:

Option 1 - Using client-side languages like JavaScript with the jQuery library

Competition List Example

Option 2 - Using server-side languages like PHP, C# or other language

Competition List Example

The easiest way to use our API is Option 1 and requesting the JSONP data with a jQuery.ajax request. We provide some basic jQuery code examples in the main documentation links below. Styling and formatting the data on your sports website will be your responsibility. Alternatively if you want to download and process the JSON data server-side you can try investigating the following methods:

PHP Use cURL library to download the data and the json_decode method to deserialize the JSON data.
.NET C# / C++ Use the WebRequest class to download the data and then deserialize the JSON data with the Json.NET library.

Other server-side languages will have their own methods so these are just a few examples. To start testing with some actual data, go to the Publish page for any competition in your organisation. This will have the live web links to download the JSON data for any competition in your organisation. Below are links to the API documentation for integrating a competition list, draw or results into your website:

HTML5 Powered with Connectivity / Realtime, CSS3 / Styling, Performance & Integration, and Semantics