title: How to extract all images in a location using Instagram API?
body: <p>I want to get all images within a location from the <code>Instagram API</code>.</p>
  
  <p>Here is my code in <code>python</code>:</p>
  
  <pre><code>from instagram.client import InstagramAPI
  
  client_id = ********
  client_secret = ******* 
  access_token = *******
  client_ip = *******
  
  q = None
  count = 100
  lat = 51.51608899635712
  lng = 0.09891956707558282
  min_timestamp, max_timestamp = None, None
  distance = 1000
  
  api = InstagramAPI(client_id=client_id, client_secret=client_secret, client_ips=client_ip, access_token=access_token)
  
  media_all_ids = []
  media_ids, next = api.media_search(q, count, lat, lng, min_timestamp, max_timestamp, distance)
  
  for media_id in media_ids:
      media_all_ids.append(media_id.id)
  </code></pre>
  
  <p>The main problem is it gives me this error:</p>
  
  <pre><code>media_ids,next = api.media_search(q, count, lat, lng, min_timestamp, max_timestamp, distance)
  ValueError: too many values to unpack
  </code></pre>
  
  <p>I want to print out their IDs alongside their image link and the time the photo was captured.<br>
  I was wondering if someone knows how to solve this issue?</p>