Skip to content

Instantly share code, notes, and snippets.

@mki
Last active November 14, 2016 10:09
Show Gist options
  • Save mki/128ed0e057a02700519bb07af8a88d1b to your computer and use it in GitHub Desktop.
Save mki/128ed0e057a02700519bb07af8a88d1b to your computer and use it in GitHub Desktop.
import requests
r = requests.get('https://api.instagram.com/v1/users/search?q=mkispb&count=1&access_token=...')
user_id = None
for user in r.json()['data']:
if user['username'] == 'mkispb':
user_id = user['id']
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment