querystringobligatoire
Search keyword
https://api.sandbase.ai/v1/api/instagram/v3/general-searchReturns search results across media grids based on a keyword query. Supports pagination tokens and optional metadata flags.
Votre sortie apparaîtra ici
Complétez les entrées, puis cliquez sur Exécuter.
Returns a grid of Instagram content that matches a keyword. The only required input is query. The response holds paged sections of clips and a token set for loading the next page.
openai.has_more before the next call.curl -X POST "https://api.sandbase.ai/v1/api/instagram/v3/general-search" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"query": "openai"}'
The result is returned in outputs[0].data.
| Name | Type | Required | Description |
|---|---|---|---|
query | string | Yes | Search keyword |
enable_metadata | boolean | No | Enable metadata |
next_max_id | string | No | Pagination ID, omit for first request, get from previous response data.next_max_id |
rank_token | string | No | Rank token, omit for first request, get from previous response data.rank_token |
Real response for the request above, trimmed: lists keep their first item and long strings are cut.
{
"clear_client_cache": false,
"has_more": true,
"media_grid": {
"auto_load_more_enabled": true,
"autoplay_type": "single",
"grid_post_click_experience": "contextual",
"has_more": true,
"has_more_reels": true,
"next_max_id": "10692e605b574eab901683f8fa706045",
"rank_token": "12a27009…",
"reels_max_id": "r:d92259cd69fa4283b518166f7c93d539",
"reels_page_index": 3,
"refinements": {},
"sections": [
{
"explore_item_info": {
"aspect_ratio": 1.5,
"autoplay": true,
"num_columns": 3,
"total_num_columns": 3
},
"feed_type": "clips",
"layout_content": {
"fill_items": [
{
"media": {
"boost_unavailable_identifier": null,
"boost_unavailable_reason": null,
"boost_unavailable_reason_v2": null,
"can_see_insights_as_brand": false,
"can_viewer_reshare": true,
"can_viewer_save": true,
"caption": {
"bit_flags": 0,
"content_type": "comment",
"created_at": 1786283390,
"created_at_utc": 1786283390,
"did_report_as_spam": false,
"has_translation": true,
"is_covered": false,
"is_ranked_comment": false
},
"caption_add_on": {
"poll": {
"color": "black",
"expires_at": 1786542599,
"finished": true,
"id": "polling_sticker_vibrant",
"is_multi_option_poll": false,
"is_shared_result": false,
"poll_id": 18176712871423680,
"poll_type": "comment_poll"
}
}
}
}
],
"one_by_two_item": {
"clips": {
"badge_label": null,
"chaining_info": null,
"content_source": null,
"design": "bottom_with_icon_horizontal",
"id": "clips-e314f03e-350e-424d-b59b-095c2a34f505",
"items": [
{
"media": {
"are_remixes_crosspostable": true,
"boost_unavailable_identifier": null,
"boost_unavailable_reason": null,
"boost_unavailable_reason_v2": null,
"can_see_insights_as_brand": false,
"can_viewer_reshare": true,
"can_viewer_save": true,
"caption": {
"bit_flags": 0,
"content_type": "comment",
"created_at": 1791726819,
"created_at_utc": 1791726819,
"did_report_as_spam": false,
"is_covered": false,
"is_ranked_comment": false,
"media_id": 4005616888212600576
}
}
}
],
"label": "",
"max_id": "r:d92259cd69fa4283b518166f7c93d539"
}
}
},
"layout_type": "one_by_two_right"
}
],
"topic_status": -1
},
"next_max_id": "10692e605b574eab901683f8fa706045",
"rank_token": "12a27009…",
"reels_max_id": "r:d92259cd69fa4283b518166f7c93d539",
"status": "ok"
}
| Field | Meaning |
|---|---|
has_more / media_grid.has_more | Whether more results exist after this page. media_grid.has_more_reels does the same for the reels part of the grid. |
next_max_id | Pagination ID for the next page. Pass it as next_max_id in the next request. The same value also appears at media_grid.next_max_id. |
rank_token | Token that keeps the ranking consistent across pages. Pass it as rank_token in the next request. |
reels_max_id | Cursor for the reels part of the grid. It starts with r:. The media_grid.reels_page_index field shows the current reels page number. |
media_grid.sections[].feed_type | Content type of the section. Here the value is clips. |
media_grid.sections[].layout_type | How the section is laid out in the grid, for example one_by_two_right or one_by_two_left. |
media_grid.sections[].layout_content.fill_items[].media | A media item in the section. It holds flags such as can_viewer_save and can_viewer_reshare, and often a caption object. |
media_grid.sections[].layout_content.fill_items[].media.caption.created_at / created_at_utc | Unix timestamp in seconds for when the caption was created. |
media_grid.sections[].layout_content.fill_items[].media.caption.media_id | ID of the media the caption belongs to. Some items omit it. |
media_grid.sections[].layout_content.one_by_two_item.clips.items[].media | The featured clip shown in the large tile of the section. It has the same structure as items in fill_items. |
query. Omit rank_token and next_max_id.next_max_id and rank_token from the previous response, together with the same query.media_grid. Both copies match.$0.008 per successful call. Failed calls are not charged. It is included in the daily free quota of each organization.
Commencer à construire
Point de terminaison de l'API de la plateforme avec authentification unifiée et suivi de l'utilisation.
curl -X POST "https://api.sandbase.ai/v1/api/instagram/v3/general-search" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"query": "openai",
"enable_metadata": false
}'Définissez votre clé API SandBase dans l'environnement de votre serveur. Les requêtes utilisent l'authentification Bearer.
export SANDBASE_API_KEY="YOUR_API_KEY"Conservez votre clé côté serveur. Ne l'exposez pas dans le code du navigateur.
querystringobligatoireSearch keyword
enable_metadatabooleanEnable metadata
Par défaut : true
next_max_idstringPagination ID, omit for first request, get from previous response `data.next_max_id`
rank_tokenstringRank token, omit for first request, get from previous response `data.rank_token`
Exemple de réponse enregistré pour cette API ; aucune requête en direct n'est effectuée lors de l'affichage.
Aucune réponse enregistrée n'a été publiée. Exécutez l'API dans Playground pour inspecter sa réponse.
Explorer plus
| API | Prix | Réponse |
|---|---|---|
Instagram General Search (V3)Cette API Instagram | $0.008 par appel | JSON |
Instagram | $0.008 par appel | JSON |
Instagram | $0.008 par appel | JSON |
Instagram | $0.008 par appel | JSON |
Instagram | $0.002 par appel | JSON |
Instagram | $0.008 par appel | JSON |
Guides :Instagram API cost: official limits and per-call pricesBest Instagram API in 2026: Pricing Compared
Questions
Envoyez une requête POST à https://api.sandbase.ai/v1/api/instagram/v3/general-search avec votre clé API SandBase dans l’en-tête Authorization (Bearer) et les paramètres dans un corps JSON. Vous pouvez aussi l’essayer dans le Playground sur cette page sans écrire de code.
$0.008 par appel, facturé depuis votre solde SandBase. Vous ne payez que les appels que vous effectuez ; aucun abonnement.
Obligatoire : query (string). Facultatif : enable_metadata (boolean), next_max_id (string) et rank_token (string). Le tableau des paramètres et le Playground sur cette page listent tous les champs.
Une réponse JSON renvoyée dans la même requête HTTP (synchrone). Le README sur cette page inclut un exemple de réponse.
Non. Instagram General Search (V3) fonctionne via SandBase, donc une seule clé API SandBase couvre ce point de terminaison ainsi que toutes les autres API et tous les modèles du catalogue. Vous n’avez pas besoin de demander un accès API Instagram séparément.