Need a brief explanation for the api integration using python scripts and libraries.
We are developing a custom dashboard to club our revenue sources against our marketing channels for the same we need to scrape earning data (Domain/Country) wise.
Got some python code
import requests
import json
api_key = '<your-api-key>'
# set up the API endpoint and parameters
endpoint = 'https://api.ezoic.com/earnings/data'
params = {
'start_date': '2022-01-01',
'end_date': '2022-01-31',
'time_zone': 'UTC',
}
# make the API request
response = requests.get(endpoint, params=params, headers={'apikey': api_key})
# parse the JSON response
data = json.loads(response.content)
# print the earnings data
print(data['earnings'])
Getting response 200 using the api key, but when i try to parse the json response, an error occurs which says UNKNOWN API CALL
Can anyone help me with this