Last active
October 6, 2021 13:17
-
-
Save RizqiEka/b06a8ac1044ab6b7fd89b5201853f531 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Define URL | |
url = params['endpoint_base'] + params['instagram_account_id'] + '/insights' | |
# Define Endpoint Parameters | |
endpointParams = dict() | |
endpointParams['metric'] = 'audience_city,audience_country,audience_gender_age' | |
endpointParams['period'] = 'lifetime' | |
endpointParams['access_token'] = params['access_token'] | |
# Requests Data | |
data = requests.get(url, endpointParams ) | |
audience_insight = json.loads(data.content) | |
audience_insight |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment