The Instagram API provides programmatic access to Instagram content and social graph, allowing retrieval of recent media, locations, tags, and user information, as well as searching by geographic coordinates, tags, or usernames. It also supports creating and deleting comments, adding or removing likes, and managing follow relationships between users.
count(query, limit) — Max number of media to return.
min_id(query) — Return media before this `min_id`.
GET
/locations/search
Search for a location by geographic coordinate.
distance(query) — Default is 1000m (distance=1000), max distance is 5000.
facebook_places_id(query) — Returns a location mapped off of a Facebook places id. If used, a Foursquare id and `lat`, `lng` are not required.
foursquare_id(query) — Returns a location mapped off of a foursquare v1 api location id. If used, you are not required to use `lat` and `lng`. Note that this method is deprecated; you should use the new foursquare IDs with V2 of their API.
lat(query) — Latitude of the center search coordinate. If used, `lng` is required.
lng(query) — Longitude of the center search coordinate. If used, `lat` is required.
foursquare_v2_id(query) — Returns a location mapped off of a foursquare v2 api location id. If used, you are not required to use `lat` and `lng`.
GET
/locations/{location-id}
Get information about a location.
location-id(path, required) — The location ID.
GET
/locations/{location-id}/media/recent
Get a list of recent media objects from a given location.
location-id(path, required) — The location ID.
min_timestamp(query) — Return media after this UNIX timestamp.
max_timestamp(query) — Return media before this UNIX timestamp.
min_id(query) — Return media before this `min_id`.
max_id(query) — Return media after this `max_id`.
GET
/media/popular
Get a list of currently popular media.
GET
/media/search
Search for media in a given area.
lat(query, required) — Latitude of the center search coordinate. If used, `lng` is required.
lng(query, required) — Longitude of the center search coordinate. If used, `lat` is required.
min_timestamp(query) — A unix timestamp. All media returned will be taken later than this timestamp.
max_timestamp(query) — A unix timestamp. All media returned will be taken earlier than this timestamp.
distance(query) — Default is 1km (distance=1000), max distance is 5km.
GET
/media/shortcode/{shortcode}
Get information about a media object.
shortcode(path, required) — The short code of the media resource.
GET
/media/{media-id}
Get information about a media object.
media-id(path, required) — The ID of the media resource.
GET
/media/{media-id}/comments
Get a list of recent comments on a media object.
media-id(path, required) — The ID of the media resource.
POST
/media/{media-id}/comments
Create a comment on a media object.
media-id(path, required) — The ID of the media resource.
text(query, required) — Text to post as a comment on the media object as specified in `media-id`.
DELETE
/media/{media-id}/comments/{comment-id}
Remove a comment.
media-id(path, required) — The ID of the media resource.
comment-id(path, required) — The ID of the comment entry.
DELETE
/media/{media-id}/likes
Remove a like on this media by the current user.
media-id(path, required) — The ID of the media resource.
GET
/media/{media-id}/likes
Get a list of users who have liked this media.
media-id(path, required) — The ID of the media resource.
POST
/media/{media-id}/likes
Set a like on this media by the current user.
media-id(path, required) — The ID of the media resource.
GET
/tags/search
Search for tags by name.
q(query, required) — A valid tag name without a leading \#. (eg. snowy, nofilter)
GET
/tags/{tag-name}
Get information about a tag object.
tag-name(path, required) — The tag name.
GET
/tags/{tag-name}/media/recent
Get a list of recently tagged media.
tag-name(path, required) — The tag name.
count(query, limit) — Count of tagged media to return.
min_tag_id(query) — Return media before this `min_tag_id`.
max_tag_id(query) — Return media after this `max_tag_id`.
GET
/users/search
Search for a user by name.
q(query, required) — A query string.
count(query, limit) — Number of users to return.
GET
/users/self/feed
See the authenticated user's feed.
count(query, limit) — Count of media to return.
min_id(query) — Return media later than this `min_id`.
max_id(query) — Return media earlier than this `max_id`.
GET
/users/self/media/liked
See the list of media liked by the authenticated user.
count(query, limit) — Count of media to return.
max_like_id(query) — Return media liked before this id.
GET
/users/self/requested-by
List the users who have requested this user's permission to follow.
GET
/users/{user-id}
Get basic information about a user.
user-id(path, required) — The ID of a user to get information about, or **self** to retrieve information about authenticated user.
GET
/users/{user-id}/followed-by
Get the list of users this user is followed by.
user-id(path, required) — The ID of a user, or **self** to retrieve information about authenticated user.
GET
/users/{user-id}/follows
Get the list of users this user follows.
user-id(path, required) — The ID of a user, or **self** to retrieve information about authenticated user.
GET
/users/{user-id}/media/recent
Get the most recent media published by a user.
user-id(path, required) — The ID of a user to get recent media of, or **self** to retrieve media of authenticated user.
count(query, limit) — Count of media to return.
max_timestamp(query) — Return media before this UNIX timestamp.
min_timestamp(query) — Return media after this UNIX timestamp.
min_id(query) — Return media later than this `min_id`.
max_id(query) — Return media earlier than this `max_id`.
GET
/users/{user-id}/relationship
Get information about a relationship to another user.
user-id(path, required) — The ID of a user to get information about.
POST
/users/{user-id}/relationship
Modify the relationship between the current user and the target user.
user-id(path, required) — The ID of the target user.
action(query, required) — Type of action to apply for relationship with the user.
27 endpoints auto-detected
Authentication
This API requires authentication: OAuth.
curl -X GET \
"https://www.instagram.com/developer//geographies/{geo-id}/media/recent"