Instagram API
Description of Instagram RESTful API. Current limitations: * Instagram service does not support [cross origin…
Fork copies the collection into your workspace, without the publisher's secrets, so you can add your own key and send requests. Star saves it to your starred APIs (Account › Marketplace) and helps others find it.
Overview
Description of Instagram RESTful API.
Current limitations:
- Instagram service does not support cross origin headers
for security reasons, therefore it is not possible to use Swagger UI and make API calls directly from browser.
- Modification API requests (
POST,DELETE) require additional security scopes
that are available for Apps created on or after Nov 17, 2015 and
started in Sandbox Mode.
- Consider the Instagram limitations for API calls that depends on App Mode.
Warning: For Apps created on or after Nov 17, 2015 API responses
containing media objects no longer return the data field in comments and likes nodes.
Last update: 2015-11-28
Endpoints 27
users
- GETSearch for a user by name.
/users/search?q=string&count=0Search for a user by name. - GETSee the authenticated user's feed.
/users/self/feed?count=0&min_id=string&max_id=stringDeprecated. See the authenticated user's feed. Warning: Deprecated for Apps created on or after Nov 17, 2015 - GETSee the list of media liked by the authenticated user.
/users/self/media/liked?count=0&max_like_id=stringSee the list of media liked by the authenticated user. Private media is returned as long as the authenticated user has permission to view that media. Liked… - GETGet basic information about a user.
/users/:user-idGet basic information about a user. To get information about the owner of the access token, you can use self instead of the user-id. Security scope… - GETGet the most recent media published by a user.
/users/:user-id/media/recent?count=0&max_timestamp=0&min_timestamp=0&min_id=string&max_id=stringGet the most recent media published by a user. To get the most recent media published by the owner of the access token, you can use self instead of the…
relationships
- GETList the users who have requested this user's permission to follow.
/users/self/requested-byList the users who have requested this user's permission to follow. - GETGet the list of users this user is followed by.
/users/:user-id/followed-byGet the list of users this user is followed by. To get users followed by the owner of the access token, you can use self instead of the user-id. - GETGet the list of users this user follows.
/users/:user-id/followsGet the list of users this user follows. To get follows of the owner of the access token, you can use self instead of the user-id. - GETGet information about a relationship to another user.
/users/:user-id/relationshipGet information about a relationship to another user. - POSTModify the relationship between the current user and the target user.
/users/:user-id/relationship?action=followModify the relationship between the current user and the target user.
media
- GETGet a list of currently popular media.
/media/popularDeprecated. Get a list of what media is most popular at the moment. Can return mix of image and video types. Warning: Deprecated for Apps created on or after… - GETSearch for media in a given area.
/media/search?lat=0.0&lng=0.0&min_timestamp=0&max_timestamp=0&distance=0Search for media in a given area. The default time span is set to 5 days. The time span must not exceed 7 days. Defaults time stamps cover the last 5 days.… - GETGet information about a media object.
/media/shortcode/:shortcodeThis endpoint returns the same response as GET /media/{media-id}. A media object's shortcode can be found in its shortlink URL. An example shortlink is… - GETGet information about a media object.
/media/:media-idGet information about a media object. The returned type key will allow you to differentiate between image and video media. Note: if you authenticate with an…
comments
- GETGet a list of recent comments on a media object.
/media/:media-id/commentsGet a list of recent comments on a media object. - POSTCreate a comment on a media object.
/media/:media-id/comments?text=stringCreate a comment on a media object with the following rules: * The total length of the comment cannot exceed 300 characters. * The comment cannot contain more… - DELETERemove a comment.
/media/:media-id/comments/:comment-idRemove a comment either on the authenticated user's media object or authored by the authenticated user.
likes
- GETGet a list of users who have liked this media.
/media/:media-id/likesGet a list of users who have liked this media. - POSTSet a like on this media by the current user.
/media/:media-id/likesSet a like on this media by the currently authenticated user. - DELETERemove a like on this media by the current user.
/media/:media-id/likesRemove a like on this media by the currently authenticated user.
tags
- GETSearch for tags by name.
/tags/search?q=stringSearch for tags by name. - GETGet information about a tag object.
/tags/:tag-nameGet information about a tag object. - GETGet a list of recently tagged media.
/tags/:tag-name/media/recent?count=0&min_tag_id=string&max_tag_id=stringGet a list of recently tagged media. Use the max_tag_id and min_tag_id parameters in the pagination response to paginate through these objects.
locations
- GETSearch for a location by geographic coordinate.
/locations/search?distance=0&facebook_places_id=string&foursquare_id=string&lat=0.0&lng=0.0&foursquare_v2_id=stringSearch for a location by geographic coordinate. - GETGet information about a location.
/locations/:location-idGet information about a location. - GETGet a list of recent media objects from a given location.
/locations/:location-id/media/recent?min_timestamp=0&max_timestamp=0&min_id=string&max_id=stringGet a list of recent media objects from a given location.
geographies
- GETGet recent media from a custom geo-id.
/geographies/:geo-id/media/recent?count=0&min_id=stringDeprecated. Get recent media from a geography subscription that you created. Note: You can only access Geographies that were explicitly created by your OAuth…
API details
- Base URL
https://api.instagram.com/v1- Authentication
- An API key in the access_token query parameter
OAuth 2.0 (implicit flow) with 6 scopes - Operations
- 27 operations on 23 pathsGET 22POST 3DELETE 2
3 marked deprecated - Main resources
- relationships 5users 5media 4comments 3likes 3locations 3tags 3geographies 1
- Response formats
application/json- Description format
- Swagger 2.0, API version
1.0.0 - Links
- Documentation · OpenAPI document · Terms of service · Support
- Listed from
- APIs.guru OpenAPI Directory (CC0-1.0)
Source updated
How to test the Instagram API in Swastik Codes
- Open the APISelect “Fork & run in Swastik Codes” on this page. Sign in or create a free account if asked.
- Fork it into your workspaceChoose a workspace. You get your own copy of the Instagram API collection, without the publisher's secrets.
- Add your credentialsThis API uses an API key in the access_token query parameter. Add yours in the collection's variables or an environment; the requests already reference it.
- Send a requestPick an endpoint, for example “Search for a user by name.” (GET /users/search?q=string&count=0), and press Send. Check the response, add tests and run the whole collection with the runner.
Frequently asked questions
What is the Instagram API?
Description of Instagram RESTful API. Current limitations: * Instagram service does not support [cross origin… It is listed under Social and has 27 endpoints.
Who publishes the Instagram API?
It is listed from Instagram's public API description (an OpenAPI document), not published by Instagram on Swastik Codes. Anyone who controls instagram.com can claim the profile by adding a DNS TXT record.
What is the base URL of the Instagram API?
Requests go to https://api.instagram.com/v1. Endpoint paths are added to this base URL.
How do I authenticate with the Instagram API?
It accepts 2 methods: an API key in the access_token query parameter; OAuth 2.0 (implicit flow) with 6 scopes.
How many endpoints does the Instagram API have?
27 operations on 23 paths (22 GET, 3 POST, 2 DELETE). The largest groups are relationships, users, media, comments.
Is forking the Instagram API free?
Yes. Forking copies the collection into your workspace for free. It has been starred 0 times and forked 0 times.