title: Instagram API: Get the oldest images first based on tagname
body: <p>I recently developed an app using the Instagram API, But I faced some problems with it. (I got struck)</p>
  
  <p>This app is not calling the api and getting images in the real-time. Instead, it calls the api once a week and store images in the database based on a specific hashtag. I see that their api is designed in a way to call it in real time and pull images, because it has this "recent" in its url, and it only provides 20 results. So every time a user reaches the end, it will load the next 20, until u reach the end.</p>
  
  <p>However, in my case, When I pull the images every week, at one point, I will reach to the oldest image, and from that point I will be stopped, because Im going from Newest to the oldest. So I want to get data as from oldest to newest.( Actually I want to get the opposite of what's offered by instagram.) They have not provided any option to sort them in their docs.</p>
  
  <p>Im thinking of a solution for this, but I can't wrap my head around it. So I will be much thankful if you guys can direct me in the right path.</p>
  
  <p>I searched Google, viewed old questions in SO, but I didn't find the answer.</p>
  
  <p>Edit : Im planning to fetch data starting from the Oldest one like this. (Since I know the min_tag_id, because I ran this once completely).</p>
  
  <p><a href="https://api.instagram.com/v1/tags/my_tag/media/recent?&amp;client_id=xxxxxxxxxxxxxxx&amp;min_tag_id=1408983759354183" rel="nofollow noreferrer">https://api.instagram.com/v1/tags/my_tag/media/recent?&amp;client_id=xxxxxxxxxxxxxxx&amp;min_tag_id=1408983759354183</a></p>
  
  <p>where min_tag_id is of the oldest image. So everytime I will be calling to the min_tag_id. Is it a good solution?</p>