Instagram API endpoint
Returns media details for an Instagram URL shortcode. Use media.code from the reels response or shortcode from a public post URL; numeric media IDs are rejected.
/instagram/post/{id}/{post_id}Path parameters:
id: required. Instagram user ID retained for route compatibility. The upstream lookup uses post_id; ownership is not verified.post_id: required. URL shortcode, such as DNBxHTZRigP from
https://www.instagram.com/p/DNBxHTZRigP/. Use media.code from a reels
response. Numeric media.id/pk values and full URLs return 400 before
an upstream request.Notable response behavior:
404: no publicly retrievable post found for the supplied shortcode.503: the upstream request failed or access was denied.| Field | Filled in, of 1 checked | Values in the sample |
|---|---|---|
| url | 1 | scontent-iad3-1.cdninstagram.com |
| width | 1 | |
| height | 1 |
| Parameter | Type | Required | Default | Description | Example |
|---|---|---|---|---|---|
| id (path) | string | Yes | Instagram user ID retained for route compatibility; ownership is not verified | 1067259270 | |
| post_id (path) | string | Yes | Instagram URL shortcode (media.code), not a numeric media ID | DNBxHTZRigP | |
| x-api-key (header) | string | Yes | API key required |
curl -X GET "https://api.crawlora.net/api/v1/instagram/post/1067259270/DNBxHTZRigP" \ -H "x-api-key: $CRAWLORA_API_KEY"
{
"code": 200,
"msg": "OK",
"data": {
"code": "DNBxHTZRigP",
"pk": "3693449175561021455",
"id": "3693449175561021455_1067259270",
"taken_at": 1754513605,
"product_type": "clips",
"media_type": 2
}
}Request schema
No body schema
Response schema
#/definitions/instagram.postResponseDoc
| Field | Type | Required | Enum | Bounds | Example | Description |
|---|---|---|---|---|---|---|
| code | integer | No | 200 | |||
| data | instagram.MediaItem | No | ||||
| data.accessibility_caption | string | No | Image description (alt text) Instagram provides for accessibility. | |||
| data.caption | object | No | Caption of the post. | |||
| data.caption.created_at | integer | No | Time the caption was written, in Unix seconds. | |||
| data.caption.pk | string | No | Instagram ID of the caption. | |||
| data.caption.text | string | No | Caption text of the post. | |||
| data.clips_metadata | object | No | Reel-specific details such as the audio used. | |||
| data.clips_metadata.audio_type | string | No | Kind of audio used by the reel, as Instagram labels it. | |||
| data.clips_metadata.is_shared_to_fb | boolean | No | Whether the reel was also shared to Facebook. | |||
| data.clips_metadata.original_sound_info | object | No | Details of the original sound used in the reel. | |||
| data.clips_metadata.original_sound_info.audio_asset_id | string | No | Instagram ID of the audio asset. | |||
| data.clips_metadata.original_sound_info.ig_artist | object | No | Account credited for the sound. | |||
| data.clips_metadata.original_sound_info.ig_artist.id | string | No | Instagram ID of the account credited for the sound. | |||
| data.clips_metadata.original_sound_info.ig_artist.username | string | No | Username of the account credited for the sound. | |||
| data.clips_metadata.original_sound_info.is_explicit | boolean | No | Whether the sound is marked explicit. | |||
| data.clips_metadata.original_sound_info.original_audio_title | string | No | Title of the original sound. | |||
| data.clips_metadata.original_sound_info.should_mute_audio | boolean | No | Whether Instagram flags the audio to be muted. | |||
| data.code | string | No | ||||
| data.comment_count | integer | No | Number of comments on the post. | |||
| data.display_uri | string | No | URL of the post's display image. | |||
| data.has_audio | boolean | No | Whether the media has an audio track. | |||
| data.id | string | No | Instagram media ID, such as `3693449175561021455_1067259270`. | |||
| data.image_versions2 | object | No | Available versions of the post image, each with its own URL and size. | |||
| data.image_versions2.candidates | array | No | Available versions of the post image, each at its own size and URL. | |||
| data.image_versions2.candidates[].height | integer | No | Height of this image version, in pixels. | |||
| data.image_versions2.candidates[].url | string | No | URL of this image version. | |||
| data.image_versions2.candidates[].width | integer | No | Width of this image version, in pixels. | |||
| data.like_count | integer | No | Number of likes on the post. | |||
| data.link | string | No | Link Instagram returns with the media, when present. | |||
| data.media_type | integer | No | Kind of media: `1` for image, `2` for video and `8` for album. | |||
| data.original_height | integer | No | Height of the original media, in pixels. | |||
| data.original_width | integer | No | Width of the original media, in pixels. | |||
| data.owner | object | No | Account that owns the post. | |||
| data.owner.id | string | No | Instagram ID of the account that owns the post. | |||
| data.owner.is_private | boolean | No | Whether the owning account is private. | |||
| data.owner.pk | string | No | Instagram primary key of the account that owns the post. | |||
| data.owner.profile_pic_url | string | No | URL of the owning account's profile picture. | |||
| data.owner.username | string | No | Username of the account that owns the post. | |||
| data.pk | string | No | Numeric Instagram ID of the post, the first part of `id`. | |||
| data.product_type | string | No | Kind of post, such as `clips` for a Reel or `feed` for a standard post. | |||
| data.taken_at | integer | No | Time the post was published, in Unix seconds. | |||
| data.user | object | No | Account that posted the media. | |||
| data.user.full_name | string | No | Display name of the account that posted the media. | |||
| data.user.id | string | No | Instagram ID of the account that posted the media. | |||
| data.user.is_private | boolean | No | Whether the account is private. | |||
| data.user.is_verified | boolean | No | Whether the account has Instagram's verified badge. | |||
| data.user.pk | string | No | Instagram primary key of the account that posted the media. | |||
| data.user.profile_pic_url | string | No | URL of the account's profile picture. | |||
| data.user.username | string | No | Username of the account that posted the media. | |||
| data.video_versions | array | No | Available renditions of the video, each with its own URL and size. | |||
| data.video_versions[].height | integer | No | Height of this video rendition, in pixels. | |||
| data.video_versions[].type | integer | No | Instagram's numeric code for this video rendition. | |||
| data.video_versions[].url | string | No | URL of this video rendition. | |||
| data.video_versions[].width | integer | No | Width of this video rendition, in pixels. | |||
| data.view_count | integer | No | Number of views on the video. | |||
| msg | string | No | OK |
| Status | Description | Schema |
|---|---|---|
| 400 | Missing or invalid parameters | #/definitions/app.Response |
| 404 | No post found | #/definitions/app.Response |
| 429 | Rate limit exceeded | #/definitions/app.Response |
| 500 | Internal server error | #/definitions/app.Response |
Use environment variables for secrets and keep Crawlora API keys server-side.
curl -X GET "https://api.crawlora.net/api/v1/instagram/post/1067259270/DNBxHTZRigP" \
-H "x-api-key: $CRAWLORA_API_KEY"