This reference page explains how you should make request calls to our soccer API URLs so they work.
Knowing the URL structure of our soccer 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 below 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 calling. A single model can have many controllers.
.json- this is the format of the response that we would like to get. We support JSON and XML as response formats. You can read more about them on our api response reference page.
?) are HTTP GET query parameters. For example, this is how you provide your api key, api secret
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 we 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 soccer 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
All of our live-score api endpoints are using the HTTP protocol and only with the HTTP method
GET. Every other request with different HTTP method will result in an error specifying that this method is not supported. You can find more on our standard errors in our specially dedicated reference page.