keywordstringbắt buộc
Hashtag keyword (without #)
https://api.sandbase.ai/v1/api/instagram/v2/hashtag-postsReturns posts associated with a specific hashtag. Supports filtering by top posts, recent posts, or reels along with cursor-based pagination.
Đầu ra của bạn sẽ xuất hiện ở đây
Hoàn tất đầu vào, rồi nhấp Run.
Returns a list of Instagram posts and reels that use a given hashtag. It needs a keyword (the hashtag without the #) and can switch between top posts, recent posts, and reels with feed_type.
play_count in a niche topic.curl -X POST "https://api.sandbase.ai/v1/api/instagram/v2/hashtag-posts" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"keyword": "cat"}'
The result is returned in outputs[0].data.
| Name | Type | Required | Description |
|---|---|---|---|
keyword | string | Yes | Hashtag keyword (without #) |
feed_type | string | No | Feed type "top", "recent", or "reels", default top |
pagination_token | string | No | Pagination token from previous response |
Real response for the request above, trimmed: lists keep their first item and long strings are cut.
{
"data": {
"count": 30,
"items": [
{
"accessibility_caption": null,
"caption_hashtags": [
"#cat"
],
"caption_mentions": [],
"caption_text": "His favorite brother.\n\n#cat #catstagram #catsofinstagram #cats #cats_of_instagra…",
"clips_metadata": {
"achievements_info": {
"num_earned_achievements": null,
"show_achievements": false
},
"additional_audio_info": {
"additional_audio_username": null,
"audio_reattribution_info": {
"should_allow_restore": false
}
},
"asset_recommendation_info": null,
"audio_canonical_id": "18642912691057530",
"audio_ranking_info": {
"best_audio_cluster_id": "27998652563101654"
},
"audio_type": "original_sounds",
"basel_template_info_for_ig_app": {
"is_basel_template": null,
"original_template_media_id": null,
"should_show_reuse_setting_for_owner": false,
"use_template_deeplink": null
},
"branded_content_tag_info": {
"can_add_tag": false
}
},
"coauthor_producers": [],
"code": "DfPiM_Hh78G",
"comment_count": 3,
"comments_disabled": false,
"has_liked": false,
"id": "4021583418252312326",
"image_versions": [
{
"height": 1333,
"is_spatial_image": false,
"url": "https://scontent-lax7-1.cdninstagram.com/v/t51.82787-15/875347989_18642158602021…",
"width": 750
}
]
}
]
},
"pagination_token": "D01SBBAp…"
}
| Field | Meaning |
|---|---|
data.count | Number of items returned in this response. |
data.items[].id / data.items[].code | Post ID and short post code. The code is the part of the post URL after /p/ or /reel/. |
data.items[].caption_text | Full caption text of the post. |
data.items[].caption_hashtags | List of hashtags found in the caption, each with the leading #. |
data.items[].like_count / comment_count / play_count | Engagement counts for the post. play_count is set on reels. |
data.items[].taken_at / data.items[].taken_at_ts | When the post was published, as an ISO 8601 time and as a Unix timestamp in seconds. |
data.items[].media_name / data.items[].product_type | Type of post, such as reel with product type clips. |
data.items[].video_url / data.items[].video_duration | Link to the video file and its length for video posts. The duration value looks like seconds. |
data.items[].thumbnail_url | Link to a preview image of the post. |
data.items[].user.username / user.full_name / user.id | Account that published the post: handle, display name, and numeric ID. |
keyword without the #. For example, use cat for #cat.feed_type accepts top, recent, or reels. The default is top.pagination_token from the previous response in the next request.$0.002 per successful call. Failed calls are not charged. It is included in the daily free quota of each organization.
Bắt đầu xây dựng
Endpoint API của nền tảng với xác thực và theo dõi mức sử dụng thống nhất.
curl -X POST "https://api.sandbase.ai/v1/api/instagram/v2/hashtag-posts" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"keyword": "cat",
"feed_type": "top"
}'Đặt SandBase API key của bạn trong môi trường máy chủ. Các request sử dụng xác thực Bearer.
export SANDBASE_API_KEY="YOUR_API_KEY"Giữ key của bạn trên máy chủ. Không hiển thị trong mã chạy trên trình duyệt.
keywordstringbắt buộcHashtag keyword (without #)
feed_typestringFeed type "top", "recent", or "reels", default top
Mặc định: "top"
pagination_tokenstringPagination token from previous response
Đây là phản hồi ví dụ đã lưu cho API này; không có request thực nào được gửi khi xem mục này.
Chưa có phản hồi đã lưu nào được công bố. Chạy API trong Playground để xem phản hồi.
Khám phá thêm
| API | Giá | Phản hồi |
|---|---|---|
Instagram Hashtag Posts (V2)API này Instagram | $0.002 mỗi lần gọi | JSON |
Instagram | $0.002 mỗi lần gọi | JSON |
Instagram | $0.002 mỗi lần gọi | JSON |
Instagram | $0.002 mỗi lần gọi | JSON |
Instagram | $0.002 mỗi lần gọi | JSON |
Instagram | $0.002 mỗi lần gọi | JSON |
Hướng dẫn:Instagram API cost: official limits and per-call pricesBest Instagram API in 2026: Pricing Compared
Câu hỏi
Gửi yêu cầu POST đến https://api.sandbase.ai/v1/api/instagram/v2/hashtag-posts với khóa API SandBase của bạn trong tiêu đề Authorization (Bearer) và các tham số trong phần thân JSON. Bạn cũng có thể thử trực tiếp trong Playground trên trang này mà không cần viết code.
$0.002 mỗi lần gọi. Mỗi tổ chức được 100 lần gọi miễn phí mỗi ngày UTC, dùng chung cho các API SandBase đủ điều kiện, bao gồm API này; sau đó mỗi lần gọi sẽ được tính theo mức giá này từ số dư SandBase của bạn. Không có gói đăng ký.
Bắt buộc: keyword (string). Tùy chọn: feed_type (string) và pagination_token (string). Bảng Parameters và Playground trên trang này liệt kê mọi trường.
Phản hồi JSON được trả về trong cùng một yêu cầu HTTP (đồng bộ). README trên trang này có ví dụ phản hồi.
Không. Instagram Hashtag Posts (V2) chạy thông qua SandBase, nên chỉ cần một API key SandBase là đủ cho endpoint này và mọi API cùng model khác trong danh mục. Bạn không cần đăng ký riêng để có quyền truy cập API của Instagram.