Instagram Proxy API

by amrosebirani



Heroku PRs Welcome JavaScript Style Guide: Good Parts Code Climate Issue Count

This builds over the Instagram's public API to provide more functionality and provides a CORS complaint reverse instagram proxy service. Try Here:

Read Blog Post:

1-Click Deploy


The Problem.

A user's public data on Instagram can be accessed on<user>/media/ but there are are a lot of problems with this service.

  1. The Service is not CORS compliant. i.e. You cannot fetch json directly and the services refuses to send you jsonp data.
  2. It does not support limiting the amount of data being sent. At any moment Instagram will send you 20 images, you cannot control this number.
  3. No pagination support. It get's you the first 20 images and leaves you in the dark to figure out what to do next.

The Solution

As of now, the service is running on I am not aware about limits, it's basically running on free tier. If it hits any limit, I'll have to figure that out. But the intended use is to replace with or

Accessing Data

  • Getting Instagrams's data as is. The following will give you access to the same data instagram provides.<user>/media/ or<user>/media/

  • Limiting the amount of images to be sent.<user>/media/?count=10 or<user>/media/?count=10

  • Using jsonp<user>/media/?callback=foo or<user>/media/?callback=foo

  • Using pagination: Each response has url links to the next and previous page, you can use that to traverse through the results.


You just need to replace with or and everything should just work as is.


NO AUTH REQUIRED, that's the best part, you can access all of instagram's public data without authentication or registering an app. Private data returns nothing. However private data maybe accessible using instagram's api if the user is logged in.

# The following returns data *only* if the user is logged in.<private_user>/media/

# The following will always return nothing for private users.<private_user>/media/

Running on local

Clone the repo and change to the cloned directory. Run:

$ npm install
$ npm run dev

To run prod instance, run:

$ npm run prod


The idea came into being after reading some discussion here.

Issues & Pull Requests

All contributers are welcome, feel free to report issues and send PRs


Source Code: GPLv3

Service hosted on or or any heroku instance used in running these services, will be free only for personal use (i.e. personal blogs/personal websites/personal portfolios). If any other entity intends to use this service for any other purpose, please send an email to to discuss more about this (Please include your domain, expected traffic and purpose). Failing to do so will lead to blacklisting from this service.

Update Jul 06, 2017: Over 300,000 requests served in last 30 days :)

The logs have gone wild, the sheer number of requests are amazing for this service is running on the free heroku tier. In the last 30 days we have serviced more than 300,000 requests to this API. Check this graph out:


At first I was surprized with this number and was inclined towards thinking that someone was trying to scrape instagram using this API. Turns out I was wrong, a really popular asian website is using this service on their website. I am in talks with them to move this traffic to a dedicated separate instance of this service.

Update July 11, 2017: Served 440,000+ requests in last 30 days. Heroku suspended my account.

OMFG, this shit just got out of hand:


Update July 12, 2017: Moved all services to ('a' removed). Blacklist added.