First Step
First Step
Roanuz Cricket API, a product of Roanuz Sports, brings to you a collection of API endpoints that provides you with the data required to power best-in-class sports applications. The endpoints are HTTP REST-based, and work just like other traditional REST-based API endpoints. This makes the integration of the endpoints to the applications a seamless and easy experience for your developers.
Step 1: Create a new project
Project Key, API Key are available on Project Console.
Now that you have successfully created your project, you are ready to start accessing data from API endpoints. Before accessing the endpoint URLs, get Authenticated.
Step 2: Create Token
An access token is required to fetch data from the other API Endpoints. An API Key is required to create a new access token. Get API Key from Project Console. Learn more about authentication here.
Sample Request
TERMINAL
pip install requests
pip install requests
get_auth.py
import requests
project_key = 'YOUR_PROJ_KEY'
api_key = 'YOUR_API_KEY'
url = "https://api.sports.roanuz.com/v5/core/{}/auth/".format(project_key)
payload = {
'api_key': api_key
}
response = requests.post(url, json=payload)
print(response.json())
import requests
project_key = 'YOUR_PROJ_KEY'
api_key = 'YOUR_API_KEY'
url = "https://api.sports.roanuz.com/v5/core/{}/auth/".format(project_key)
payload = {
'api_key': api_key
}
response = requests.post(url, json=payload)
print(response.json())
Step 3: Access API Endpoints
Once you have authenticated successfully, you can start accessing data using Endpoints such as the
Featured Matches API Endpoint. The Featured Matches API provides a manually curated list of matches that are expected to create huge demand. Pass the access token on header key “rs-token”.
Sample Request
TERMINAL
pip install requests
pip install requests
get_featured_matches.py
import requests
project_key = 'YOUR_PROJ_KEY'
token = 'YOUR_ACCESS_TOKEN'
url = "https://api.sports.roanuz.com/v5/cricket/{}/featured-matches/".format(project_key)
headers = {
'rs-token': token
}
response = requests.get(url, headers=headers)
print(response.json())
import requests
project_key = 'YOUR_PROJ_KEY'
token = 'YOUR_ACCESS_TOKEN'
url = "https://api.sports.roanuz.com/v5/cricket/{}/featured-matches/".format(project_key)
headers = {
'rs-token': token
}
response = requests.get(url, headers=headers)
print(response.json())
Step 4: Explore Docs
You can explore our Data Structure and Resource Keys Page to understand more