{"files":{"SKILL.md":"---\nname: instagram-api\ndescription: \"Instagram API skill. Use when working with Instagram for geographies, locations, media. Covers 27 endpoints.\"\nversion: 1.0.0\ngenerator: lapsh\n---\n\n# Instagram API\nAPI version: 1.0.0\n\n## Auth\nApiKey access_token in query | OAuth2\n\n## Base URL\nhttps://api.instagram.com/v1\n\n## Setup\n1. Set your API key in the appropriate header\n2. GET /locations/search -- search for a location by geographic coordinate.\n3. POST /media/{media-id}/comments -- create first comment\n\n## Endpoints\n27 endpoints across 5 groups. See references/api-spec.lap for full details.\n\n### Geographies\n| Method | Path | Description |\n|--------|------|-------------|\n| GET | /geographies/{geo-id}/media/recent | Get recent media from a custom geo-id. |\n\n### Locations\n| Method | Path | Description |\n|--------|------|-------------|\n| GET | /locations/search | Search for a location by geographic coordinate. |\n| GET | /locations/{location-id} | Get information about a location. |\n| GET | /locations/{location-id}/media/recent | Get a list of recent media objects from a given location. |\n\n### Media\n| Method | Path | Description |\n|--------|------|-------------|\n| GET | /media/popular | Get a list of currently popular media. |\n| GET | /media/search | Search for media in a given area. |\n| GET | /media/shortcode/{shortcode} | Get information about a media object. |\n| GET | /media/{media-id} | Get information about a media object. |\n| GET | /media/{media-id}/comments | Get a list of recent comments on a media object. |\n| POST | /media/{media-id}/comments | Create a comment on a media object. |\n| DELETE | /media/{media-id}/comments/{comment-id} | Remove a comment. |\n| DELETE | /media/{media-id}/likes | Remove a like on this media by the current user. |\n| GET | /media/{media-id}/likes | Get a list of users who have liked this media. |\n| POST | /media/{media-id}/likes | Set a like on this media by the current user. |\n\n### Tags\n| Method | Path | Description |\n|--------|------|-------------|\n| GET | /tags/search | Search for tags by name. |\n| GET | /tags/{tag-name} | Get information about a tag object. |\n| GET | /tags/{tag-name}/media/recent | Get a list of recently tagged media. |\n\n### Users\n| Method | Path | Description |\n|--------|------|-------------|\n| GET | /users/search | Search for a user by name. |\n| GET | /users/self/feed | See the authenticated user's feed. |\n| GET | /users/self/media/liked | See the list of media liked by the authenticated user. |\n| GET | /users/self/requested-by | List the users who have requested this user's permission to follow. |\n| GET | /users/{user-id} | Get basic information about a user. |\n| GET | /users/{user-id}/followed-by | Get the list of users this user is followed by. |\n| GET | /users/{user-id}/follows | Get the list of users this user follows. |\n| GET | /users/{user-id}/media/recent | Get the most recent media published by a user. |\n| GET | /users/{user-id}/relationship | Get information about a relationship to another user. |\n| POST | /users/{user-id}/relationship | Modify the relationship between the current user and the target user. |\n\n## Common Questions\nMatch user requests to endpoints in references/api-spec.lap. Key patterns:\n- \"List all recent?\" -> GET /geographies/{geo-id}/media/recent\n- \"List all search?\" -> GET /locations/search\n- \"Get location details?\" -> GET /locations/{location-id}\n- \"List all popular?\" -> GET /media/popular\n- \"Get shortcode details?\" -> GET /media/shortcode/{shortcode}\n- \"Get media details?\" -> GET /media/{media-id}\n- \"List all comments?\" -> GET /media/{media-id}/comments\n- \"Create a comment?\" -> POST /media/{media-id}/comments\n- \"Delete a comment?\" -> DELETE /media/{media-id}/comments/{comment-id}\n- \"List all likes?\" -> GET /media/{media-id}/likes\n- \"Create a like?\" -> POST /media/{media-id}/likes\n- \"Search search?\" -> GET /tags/search\n- \"Get tag details?\" -> GET /tags/{tag-name}\n- \"List all feed?\" -> GET /users/self/feed\n- \"List all liked?\" -> GET /users/self/media/liked\n- \"List all requested-by?\" -> GET /users/self/requested-by\n- \"Get user details?\" -> GET /users/{user-id}\n- \"List all followed-by?\" -> GET /users/{user-id}/followed-by\n- \"List all follows?\" -> GET /users/{user-id}/follows\n- \"List all relationship?\" -> GET /users/{user-id}/relationship\n- \"Create a relationship?\" -> POST /users/{user-id}/relationship\n- \"How to authenticate?\" -> See Auth section above\n\n## Response Tips\n- Check response schemas in references/api-spec.lap for field details\n- Create/update endpoints return the modified resource on success\n- Error responses include status codes and descriptions in the spec\n\n## References\n- Full spec: See references/api-spec.lap for complete endpoint details, parameter tables, and response schemas\n\n> Generated from the official API spec by [LAP](https://lap.sh)\n","references/api-spec.lap":"@lap v0.3\n# Machine-readable API spec. Each @endpoint block is one API call.\n@api Instagram API\n@base https://api.instagram.com/v1\n@version 1.0.0\n@auth ApiKey access_token in query | OAuth2\n@endpoints 27\n@hint download_for_search\n@toc geographies(1), locations(3), media(10), tags(3), users(10)\n\n@group geographies\n@endpoint GET /geographies/{geo-id}/media/recent\n@desc Get recent media from a custom geo-id.\n@required {geo-id: any # The geography ID.}\n@optional {count: any # Max number of media to return., min_id: any # Return media before this `min_id`.}\n@returns(200) List of recent media entries from a geography subscription.\n\n@endgroup\n\n@group locations\n@endpoint GET /locations/search\n@desc Search for a location by geographic coordinate.\n@optional {distance: any # Default is 1000m (distance=1000), max distance is 5000., facebook_places_id: any # Returns a location mapped off of a Facebook places id. If used, a Foursquare id and `lat`, `lng` are not required., foursquare_id: any # 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: any # Latitude of the center search coordinate. If used, `lng` is required., lng: any # Longitude of the center search coordinate. If used, `lat` is required., foursquare_v2_id: any # Returns a location mapped off of a foursquare v2 api location id. If used, you are not required to use `lat` and `lng`.}\n@returns(200) List of found locations.\n\n@endpoint GET /locations/{location-id}\n@desc Get information about a location.\n@required {location-id: any # The location ID.}\n@returns(200) Location information response.\n\n@endpoint GET /locations/{location-id}/media/recent\n@desc Get a list of recent media objects from a given location.\n@required {location-id: any # The location ID.}\n@optional {min_timestamp: any # Return media after this UNIX timestamp., max_timestamp: any # Return media before this UNIX timestamp., min_id: any # Return media before this `min_id`., max_id: any # Return media after this `max_id`.}\n@returns(200) List of media entries from this location.\n\n@endgroup\n\n@group media\n@endpoint GET /media/popular\n@desc Get a list of currently popular media.\n@returns(200) Found media resources (without likes information).\n\n@endpoint GET /media/search\n@desc Search for media in a given area.\n@required {lat: any # Latitude of the center search coordinate. If used, `lng` is required., lng: any # Longitude of the center search coordinate. If used, `lat` is required.}\n@optional {min_timestamp: any # A unix timestamp. All media returned will be taken later than this timestamp., max_timestamp: any # A unix timestamp. All media returned will be taken earlier than this timestamp., distance: any # Default is 1km (distance=1000), max distance is 5km.}\n@returns(200) Found media resources (without likes information) in a given area.\n\n@endpoint GET /media/shortcode/{shortcode}\n@desc Get information about a media object.\n@required {shortcode: any # The short code of the media resource.}\n@returns(200) Media resource information.\n\n@endpoint GET /media/{media-id}\n@desc Get information about a media object.\n@required {media-id: any # The ID of the media resource.}\n@returns(200) Media resource information.\n\n@endpoint GET /media/{media-id}/comments\n@desc Get a list of recent comments on a media object.\n@required {media-id: any # The ID of the media resource.}\n@returns(200) List of comments of the media resource.\n\n@endpoint POST /media/{media-id}/comments\n@desc Create a comment on a media object.\n@required {media-id: any # The ID of the media resource., text: any # Text to post as a comment on the media object as specified in `media-id`.}\n@returns(200) Result of posting a comment.\n\n@endpoint DELETE /media/{media-id}/comments/{comment-id}\n@desc Remove a comment.\n@required {media-id: any # The ID of the media resource., comment-id: any # The ID of the comment entry.}\n@returns(200) Result of deleting a comment.\n\n@endpoint DELETE /media/{media-id}/likes\n@desc Remove a like on this media by the current user.\n@required {media-id: any # The ID of the media resource.}\n@returns(200) Result of removing a like.\n\n@endpoint GET /media/{media-id}/likes\n@desc Get a list of users who have liked this media.\n@required {media-id: any # The ID of the media resource.}\n@returns(200) List of users who liked the media resource.\n\n@endpoint POST /media/{media-id}/likes\n@desc Set a like on this media by the current user.\n@required {media-id: any # The ID of the media resource.}\n@returns(200) Result of setting a like.\n\n@endgroup\n\n@group tags\n@endpoint GET /tags/search\n@desc Search for tags by name.\n@required {q: any # A valid tag name without a leading \\#. (eg. snowy, nofilter)}\n@returns(200) List of found tags and their statistics.\n\n@endpoint GET /tags/{tag-name}\n@desc Get information about a tag object.\n@required {tag-name: any # The tag name.}\n@returns(200) Tag information response.\n\n@endpoint GET /tags/{tag-name}/media/recent\n@desc Get a list of recently tagged media.\n@required {tag-name: any # The tag name.}\n@optional {count: any # Count of tagged media to return., min_tag_id: any # Return media before this `min_tag_id`., max_tag_id: any # Return media after this `max_tag_id`.}\n@returns(200) List of media entries with this tag.\n\n@endgroup\n\n@group users\n@endpoint GET /users/search\n@desc Search for a user by name.\n@required {q: any # A query string.}\n@optional {count: any # Number of users to return.}\n@returns(200) List of found users.\n\n@endpoint GET /users/self/feed\n@desc See the authenticated user's feed.\n@optional {count: any # Count of media to return., min_id: any # Return media later than this `min_id`., max_id: any # Return media earlier than this `max_id`.}\n@returns(200) Users feed entries.\n\n@endpoint GET /users/self/media/liked\n@desc See the list of media liked by the authenticated user.\n@optional {count: any # Count of media to return., max_like_id: any # Return media liked before this id.}\n@returns(200) Users media entries.\n\n@endpoint GET /users/self/requested-by\n@desc List the users who have requested this user's permission to follow.\n@returns(200) List of users who have requested this user's permission to follow.\n\n@endpoint GET /users/{user-id}\n@desc Get basic information about a user.\n@required {user-id: any # The ID of a user to get information about, or **self** to retrieve information about authenticated user.}\n@returns(200) User basic information.\n@errors {404: Not Found, user with such ID does not exist.}\n\n@endpoint GET /users/{user-id}/followed-by\n@desc Get the list of users this user is followed by.\n@required {user-id: any # The ID of a user, or **self** to retrieve information about authenticated user.}\n@returns(200) List of users this user is followed by.\n\n@endpoint GET /users/{user-id}/follows\n@desc Get the list of users this user follows.\n@required {user-id: any # The ID of a user, or **self** to retrieve information about authenticated user.}\n@returns(200) List of users this user follows.\n\n@endpoint GET /users/{user-id}/media/recent\n@desc Get the most recent media published by a user.\n@required {user-id: any # The ID of a user to get recent media of, or **self** to retrieve media of authenticated user.}\n@optional {count: any # Count of media to return., max_timestamp: any # Return media before this UNIX timestamp., min_timestamp: any # Return media after this UNIX timestamp., min_id: any # Return media later than this `min_id`., max_id: any # Return media earlier than this `max_id`.}\n@returns(200) Users media entries.\n\n@endpoint GET /users/{user-id}/relationship\n@desc Get information about a relationship to another user.\n@required {user-id: any # The ID of a user to get information about.}\n@returns(200) Relationship information.\n\n@endpoint POST /users/{user-id}/relationship\n@desc Modify the relationship between the current user and the target user.\n@required {user-id: any # The ID of the target user., action: any # Type of action to apply for relationship with the user.}\n@returns(200) Relationship information.\n\n@endgroup\n\n@end\n"}}