Instafetch

			
var fetcher = new Instafetch('81e3d3f35c8a4438964001decaa5a31f'); // Get instance of fetch with Client ID
fetcher.fetch({                                                   // Fetch results
  user: 259220806,                                                // User ID
  tag: '9gag',                                                    // Tag name
  limit: 88,                                                      // How many to fetch
  callback: displayInstaBlocks,                                   // pass in your callback...
  params: '9gagBlock'                                             // ...with a parameter
});
			
		

Click here to download the library!

In this example, I am getting 88 pieces of media from the user '9gag', and filtering it by the '9gag' tag.

Images are displayed using a function found in example.js, you can also see the raw data by checking the console (usually by pressing F12). In the console, you will see two entries - the first one is the object containing all your results, the second is the parameter you passed into your callback function.

This example uses my Client ID (81e3d3f35c8a4438964001decaa5a31f), which you should change to yours when using it. If nothing is returned, it means my quota of 5000 per hour is used up, or that it's banned. In that case, please use your own Client ID.