# Instagram API API

> Instagram API API on Apizie: 24 endpoints (Search for a location by geographic coordinate., Get information about a location., Get a list of recent media objects from a given location., Search for media in a given area., …) returned as clean JSON through one API key. Send your own provider key in the x-upstream-key header. Call it over REST at https://zieapi.vercel.app/v1/social-media:instagram/{endpoint} or from Claude, ChatGPT and Cursor through the Apizie MCP server. Free plan: 1,000 requests a month.

- Project key: `social-media:instagram`
- Category: Social Media
- Status: byok
- Source: https://instagram.com/developer/support
- Page: https://zieapi.vercel.app/api/social-media/instagram
- OpenAPI: https://zieapi.vercel.app/api/social-media/instagram/openapi.json

Description of Instagram RESTful API. Current limitations: * Instagram service does not support [cross origin headers](https://developer.mozilla.org/en-US/docs/Web/HTTP/Access_control_CORS) for security reasons,…

## Endpoints

### Search for a location by geographic coordinate.
`GET https://zieapi.vercel.app/v1/social-media:instagram/get-locations-search` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| distance | integer | no | Default is 1000m (distance=1000), max distance is 5000. |
| facebook_places_id | string | no | Returns a location mapped off of a Facebook places id. If used, a Foursquare id and `lat`, `lng` are not required. |
| foursquare_id | string | no | 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… |
| lat | number | no | Latitude of the center search coordinate. If used, `lng` is required. |
| lng | number | no | Longitude of the center search coordinate. If used, `lat` is required. |
| foursquare_v2_id | string | no | Returns a location mapped off of a foursquare v2 api location id. If used, you are not required to use `lat` and `lng`. |

### Get information about a location.
`GET https://zieapi.vercel.app/v1/social-media:instagram/get-locations-location-id` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| location-id | string | yes | The location ID. |

### Get a list of recent media objects from a given location.
`GET https://zieapi.vercel.app/v1/social-media:instagram/get-locations-location-id-media-recent` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| location-id | string | yes | The location ID. |
| min_timestamp | integer | no | Return media after this UNIX timestamp. |
| max_timestamp | integer | no | Return media before this UNIX timestamp. |
| min_id | string | no | Return media before this `min_id`. |
| max_id | string | no | Return media after this `max_id`. |

### Search for media in a given area.
`GET https://zieapi.vercel.app/v1/social-media:instagram/get-media-search` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| lat | number | yes | Latitude of the center search coordinate. If used, `lng` is required. |
| lng | number | yes | Longitude of the center search coordinate. If used, `lat` is required. |
| min_timestamp | integer | no | A unix timestamp. All media returned will be taken later than this timestamp. |
| max_timestamp | integer | no | A unix timestamp. All media returned will be taken earlier than this timestamp. |
| distance | integer | no | Default is 1km (distance=1000), max distance is 5km. |

### Get information about a media object.
`GET https://zieapi.vercel.app/v1/social-media:instagram/get-media-shortcode-shortcode` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| shortcode | string | yes | The short code of the media resource. |

### Get information about a media object.
`GET https://zieapi.vercel.app/v1/social-media:instagram/get-media-media-id` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| media-id | string | yes | The ID of the media resource. |

### Get a list of recent comments on a media object.
`GET https://zieapi.vercel.app/v1/social-media:instagram/get-media-media-id-comments` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| media-id | string | yes | The ID of the media resource. |

### Create a comment on a media object.
`POST https://zieapi.vercel.app/v1/social-media:instagram/post-media-media-id-comments` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| media-id | string | yes | The ID of the media resource. |
| text | string | yes | Text to post as a comment on the media object as specified in `media-id`. |

### Remove a comment.
`POST https://zieapi.vercel.app/v1/social-media:instagram/delete-media-media-id-comments-comment-id` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| media-id | string | yes | The ID of the media resource. |
| comment-id | string | yes | The ID of the comment entry. |

### Get a list of users who have liked this media.
`GET https://zieapi.vercel.app/v1/social-media:instagram/get-media-media-id-likes` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| media-id | string | yes | The ID of the media resource. |

### Set a like on this media by the current user.
`POST https://zieapi.vercel.app/v1/social-media:instagram/post-media-media-id-likes` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| media-id | string | yes | The ID of the media resource. |

### Remove a like on this media by the current user.
`POST https://zieapi.vercel.app/v1/social-media:instagram/delete-media-media-id-likes` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| media-id | string | yes | The ID of the media resource. |

### Search for tags by name.
`GET https://zieapi.vercel.app/v1/social-media:instagram/get-tags-search` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| q | string | yes | A valid tag name without a leading \#. (eg. snowy, nofilter) |

### Get information about a tag object.
`GET https://zieapi.vercel.app/v1/social-media:instagram/get-tags-tag-name` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| tag-name | string | yes | The tag name. |

### Get a list of recently tagged media.
`GET https://zieapi.vercel.app/v1/social-media:instagram/get-tags-tag-name-media-recent` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| tag-name | string | yes | The tag name. |
| count | integer | no | Count of tagged media to return. |
| min_tag_id | string | no | Return media before this `min_tag_id`. |
| max_tag_id | string | no | Return media after this `max_tag_id`. |

### Search for a user by name.
`GET https://zieapi.vercel.app/v1/social-media:instagram/get-users-search` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| q | string | yes | A query string. |
| count | integer | no | Number of users to return. |

### See the list of media liked by the authenticated user.
`GET https://zieapi.vercel.app/v1/social-media:instagram/get-users-self-media-liked` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| count | integer | no | Count of media to return. |
| max_like_id | string | no | Return media liked before this id. |

### List the users who have requested this user's permission to follow.
`GET https://zieapi.vercel.app/v1/social-media:instagram/get-users-self-requested-by` (byok)

### Get basic information about a user.
`GET https://zieapi.vercel.app/v1/social-media:instagram/get-users-user-id` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| user-id | string | yes | The ID of a user to get information about, or **self** to retrieve information about authenticated user. |

### Get the list of users this user is followed by.
`GET https://zieapi.vercel.app/v1/social-media:instagram/get-users-user-id-followed-by` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| user-id | string | yes | The ID of a user, or **self** to retrieve information about authenticated user. |

### Get the list of users this user follows.
`GET https://zieapi.vercel.app/v1/social-media:instagram/get-users-user-id-follows` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| user-id | string | yes | The ID of a user, or **self** to retrieve information about authenticated user. |

### Get the most recent media published by a user.
`GET https://zieapi.vercel.app/v1/social-media:instagram/get-users-user-id-media-recent` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| user-id | string | yes | The ID of a user to get recent media of, or **self** to retrieve media of authenticated user. |
| count | integer | no | Count of media to return. |
| max_timestamp | integer | no | Return media before this UNIX timestamp. |
| min_timestamp | integer | no | Return media after this UNIX timestamp. |
| min_id | string | no | Return media later than this `min_id`. |
| max_id | string | no | Return media earlier than this `max_id`. |

### Get information about a relationship to another user.
`GET https://zieapi.vercel.app/v1/social-media:instagram/get-users-user-id-relationship` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| user-id | string | yes | The ID of a user to get information about. |

### Modify the relationship between the current user and the target user.
`POST https://zieapi.vercel.app/v1/social-media:instagram/post-users-user-id-relationship` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| user-id | string | yes | The ID of the target user. |
| action | string | yes | Type of action to apply for relationship with the user. |

## Example
```
curl "https://zieapi.vercel.app/v1/social-media:instagram/get-locations-search" \
  -H "x-api-key: $APIZIE_KEY" \
  -H "x-upstream-key: $PROVIDER_KEY"
```

## FAQ

### How do I call the Instagram API API?
Create a free Apizie key, then send GET https://zieapi.vercel.app/v1/social-media:instagram/get-locations-search with the header x-api-key. Every endpoint returns { project, data, timestamp }.

### Is the Instagram API API free on Apizie?
Yes. The Free plan includes 1,000 requests a month at 100 requests a minute, no credit card. Instagram API itself also needs your own key from instagram.com.

### Can AI agents use the Instagram API API?
Yes. Add the Apizie MCP server (https://zieapi.vercel.app/mcp) to Claude, ChatGPT, Cursor or VS Code, then ask in plain language. The agent calls run_scraper with project key social-media:instagram.

### What is the status of the Instagram API API?
Needs your own provider key (bring your own key)
