INSTAGRAM API
Popular Search
Retrieve popular search from Instagram with a single API request.
GET
/api/data/v1/instagram/search/popular1credit base cost
Request parameters
Up to 1 creditThe Popular topic to search for.
The opaque cursor returned by the previous response. Use it with the same query to fetch the next page of posts.
Live requests use your prepaid balance. Cached responses cost zero where supported.
curl --request GET \
--url 'https://fetchgoblin.com/api/data/v1/instagram/search/popular?query=basketball' \
--header 'x-api-key: YOUR_FETCHGOBLIN_API_KEY'Response
Example{
"success": true,
"query": "basketball",
"title": "Basketball",
"total_media_count": 8800000,
"description": {
"plain_text": "James Naismith invented basketball in December 1891 in Springfield, Massachusetts as an indoor winter activity.",
"source_uris": [
"https://en.wikipedia.org/wiki/Outline_of_basketball"
],
"linked_terms": []
},
"suggested_terms": [
"the tallest basketball player"
],
"posts": [
{
"id": "POLARIS_3892957342260916992",
"shortcode": "DYGkBO3NfMA",
"url": "https://www.instagram.com/reel/DYGkBO3NfMA/",
"type": "reel",
"caption": "😂😂 #meta #pov #hooper #basketball",
"display_url": "https://instagram.example.com/basketball-cover.jpg",
"video_url": "https://instagram.example.com/basketball-video.mp4",
"play_count": 11993988,
"owner": {
"id": "17841409679275910",
"username": "lukaceo",
"is_verified": false,
"profile_pic_url": "https://instagram.example.com/lukaceo-profile.jpg"
}
}
],
"cursor": "opaque-cursor-from-response",
"has_more": true,
"credits_charged": 1,
"credits_remaining": 1000,
"request_id": "00000000-0000-4000-8000-000000000000"
}Example data from the API specification. Run a request to retrieve current data.
Response shape
This schema describes the documented data shape. Some platform fields may be absent or null. The response also includes your FetchGoblin request ID and current credit balance.
View JSON Schema +
{
"type": "object",
"properties": {
"success": {
"type": "boolean"
},
"query": {
"type": "string"
},
"title": {
"type": "string"
},
"total_media_count": {
"type": "integer"
},
"description": {
"type": "object",
"properties": {
"plain_text": {
"type": "string"
},
"source_uris": {
"type": "array",
"items": {
"type": "string"
}
},
"linked_terms": {
"type": "array"
}
}
},
"suggested_terms": {
"type": "array",
"items": {
"type": "string"
}
},
"posts": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"shortcode": {
"type": "string"
},
"url": {
"type": "string"
},
"type": {
"type": "string"
},
"caption": {
"type": "string"
},
"display_url": {
"type": "string"
},
"video_url": {
"type": "string"
},
"play_count": {
"type": "integer"
},
"owner": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"username": {
"type": "string"
},
"is_verified": {
"type": "boolean"
},
"profile_pic_url": {
"type": "string"
}
}
}
}
}
},
"cursor": {
"type": "string"
},
"has_more": {
"type": "boolean"
},
"credits_charged": {
"type": "integer",
"minimum": 0,
"description": "FetchGoblin credits charged for this request."
},
"credits_remaining": {
"type": "integer",
"description": "Your FetchGoblin credit balance after this request."
},
"request_id": {
"type": "string",
"format": "uuid",
"description": "FetchGoblin request identifier."
}
}
}