RapidAPI logo

Instagram

FREE
By dimashirokov
Updated 4 months ago
Social
8.6/10
Popularity Score
275ms
Latency
-
Success Rate

Instagram API Documentation

Pull Instagram user information and enable actions.

View API Details
POSTgetAccessToken
POSTgetCommentsForMedia
POSTgetCurrentUser
POSTgetCurrentUsersRecentMedia
POSTgetLocationInformation
POSTgetMediaInRadius
POSTgetMediaInformation
POSTgetRecentMediaFromLocation
POSTgetTagInformation
POSTgetTagRecentMedia
POSTgetUserInformation
POSTgetUsersRecentMedia
POSTsearchLocationsByArea
POSTsearchLocationsByFacebookId
POSTsearchTags
POSTgetAccessToken

Generate access token for user.

Header Parameters
X-RapidAPI-HostSTRING
REQUIRED
X-RapidAPI-KeySTRING
REQUIRED
Required Parameters
clientIdCREDENTIALS
REQUIREDThe clientId obtained from Instagram.
clientSecretCREDENTIALS
REQUIREDThe clientSecret obtained from Instagram.
redirectUriSTRING
REQUIREDThe redirectUri set in your application
codeSTRING
REQUIREDThe code received from the user
Code Snippet
unirest.post("https://InstagramdimashirokovV1.p.rapidapi.com/getAccessToken")
.header("X-RapidAPI-Host", "InstagramdimashirokovV1.p.rapidapi.com")
.header("X-RapidAPI-Key", "SIGN-UP-FOR-KEY")
.header("Content-Type", "application/x-www-form-urlencoded")
.end(function (result) {
  console.log(result.status, result.headers, result.body);
});
Sample Response
General
Request URL: https://InstagramdimashirokovV1.p.rapidapi.com/getAccessToken
Request Method: POST
Response Headers
Response Body
Log inSign up

Install SDK for NodeJS

Installing

To utilize unirest for node.js install the the npm module:

$ npm install unirest

After installing the npm package you can now start simplifying requests like so:

var unirest = require('unirest');

Creating Request

unirest.post("https://InstagramdimashirokovV1.p.rapidapi.com/getAccessToken")
.header("X-RapidAPI-Host", "InstagramdimashirokovV1.p.rapidapi.com")
.header("X-RapidAPI-Key", "SIGN-UP-FOR-KEY")
.header("Content-Type", "application/x-www-form-urlencoded")
.end(function (result) {
  console.log(result.status, result.headers, result.body);
});
OAuth2 Authentication
Client ID
Client Secret
OAuth2 Authentication