API DocsinstagramContentGet post oEmbed info
Get post oEmbed info
What this API is for
- Get Instagram post oEmbed embed info
- Returns HTML code for embedding and post metadata
- Suitable for embedding Instagram posts on third-party websites
GET
/openapi/api/v1/instagram/v3/get_post_oembedPrice:Price unavailable · Actual charges depend on free quota and account discounts
Authentication
All API requests require a Bearer project token in the Authorization header
Authorization header
Authorization: Bearer YOUR_API_TOKENRequest parameters
- url: Full Instagram post URL (e.g., https://www.instagram.com/p/xxx/ or https://www.instagram.com/reel/xxx/)
- hidecaption: Whether to hide caption (default false)
- maxwidth: Max embed width in pixels (default 540)
| Name | Location / type | Required | Notes | Example |
|---|---|---|---|---|
| url | query / string | Yes |
| https://www.instagram.com/reel/DUlObENDmJD |
| hidecaption | query / boolean | No |
| |
| maxwidth | query / integer | No |
|
Request examples
curl -X GET "https://api.trmesh.com/openapi/api/v1/instagram/v3/get_post_oembed" \ -H "Authorization: Bearer sdc_your_project_token" \ -H "Accept: application/json"
Response fields
- data.version: oEmbed version
- data.title: Post title
- data.author_name: Author name
- data.author_url: Author profile URL
- data.author_id: Author ID
- data.media_id: Media ID
- data.provider_name: Provider name (Instagram)
- data.provider_url: Provider URL
- data.type: Type (rich)
- data.width: Width
- data.html: HTML embed code
- data.thumbnail_url: Thumbnail URL
- data.thumbnail_width: Thumbnail width
- data.thumbnail_height: Thumbnail height
| Field | Type | Notes | Example |
|---|---|---|---|
| data.version | unknown |
| |
| data.title | unknown |
| |
| data.author_name | unknown |
| |
| data.author_url | unknown |
| |
| data.author_id | unknown |
| |
| data.media_id | unknown |
| |
| data.provider_name | unknown |
| |
| data.provider_url | unknown |
| |
| data.type | unknown |
| |
| data.width | unknown |
| |
| data.html | unknown |
| |
| data.thumbnail_url | unknown |
| |
| data.thumbnail_width | unknown |
| |
| data.thumbnail_height | unknown |
|
Common response envelope
Common fields for response status, request identifiers and data
| Field | Type | Notes | Example |
|---|---|---|---|
| code | integer |
| |
| request_id | string | null |
| |
| message | string |
| |
| message_zh | string |
| |
| support | string |
| |
| time | string |
| |
| time_stamp | integer |
| |
| time_zone | string |
| |
| docs | string | null |
| |
| cache_message | string | null |
| |
| cache_message_zh | string | null |
| |
| cache_url | string | null |
| |
| router | string |
| |
| params | unknown |
| |
| data | unknown | null |
|
Errors and limits
The docs cover not only success responses, but also auth failures, rate limits, and data-service errors
| Code | Meaning | Notes |
|---|---|---|
| 200 | Success | The request completed and returned the standard response envelope. |
| 401 | Unauthorized | The token is missing, invalid, or no longer active. |
| 429 | Rate limited | The request exceeded token, user, or plan-level throughput limits. |
| 502 | Service unavailable | The gateway could not obtain a healthy result. Retry in a moment. |
Next steps
New to the API? Read the guide or explore examples