This reference page explains how you should make request calls to our APIs so they work.
Knowing the url structure of our api endpoints will help you when forming your requests. In this section, we start with the first step of telling you about the structure of the endpoint. If we look at the example bellow we can define all the distinct parts of the url endpoint. In this example, we have used the demo api key and secret pair. If you login in, you will see all examples with your own api key and api secret.
http://livescore-api.com/api-client- is path to the root of our api endpoints.
/scores- is the module that we are using in the examples. Following the MVC model we have models which contain controllers, and the they are the one that provide all the functionality.
/live- is the controller in the module that we are evoking. A single model can have many controllers.
.json- this is the format of the response that we would like to get. We support JSON, CSV, and XML as response formats. You can read more about them on our api response reference page.
?) is get parameters here you provide your api key, api secret, or CSV delimiter.
In this example, we have used the demo api key and secret pair.
If you login in, you will see all examples with your own api key and api secret. demo_key is the api key in this example and demo_secret is the api secret. In order to provide them to the API endpoints you have to add them in the URL that you call as
GET variables after the question mark (
?). The example url is structured in the correct way. The order in which you provide them does not make any difference in the way way handle your requests.
This sections explains how to tell us what format of response you desire. To read about the structure of the our formats or the different types available you can visit our special api response reference page. In general, you provide the response format that you would like by providing the file extension of the format. For example, for JSON you will feed us with
json. The format is provided after the name of the controller that should handle your request followed by a dot. In the example above, the controller is
live followed by a
. followed by the
jsonformat request. To turn this into XML format we replace
xml resulting in
live.xml. The process is similar with CSV response formats
All of our livescore api endpoints are server using the HTTP protocol and only with the HTTP method
GET. Every other request with different HTTP method will result an error specifying that this method is not supported. You can find more on our standard errors in our specially dedicated reference page.