Instagram API
Instagram Search
Search Instagram for users, hashtags, and places.
POST
$0.01/call/v1/instagram/searchUsage
const res = await fetch('https://api.yepapi.com/v1/instagram/search', {
method: 'POST',
headers: {
'x-api-key': 'YOUR_API_KEY',
'Content-Type': 'application/json',
},
body: JSON.stringify({ query: 'travel photography' }),
});
const { data } = await res.json();
console.log(data);curl -X POST https://api.yepapi.com/v1/instagram/search \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"query": "travel photography"}'Request Body
| Parameter | Type | Required | Description | Default |
|---|---|---|---|---|
query | string | Yes | Search query | — |
Response
{
"ok": true,
"data": {
"users": [
{
"username": "travelphotography",
"full_name": "Travel Photography",
"profile_pic_url": "https://scontent.cdninstagram.com/...",
"is_verified": true,
"follower_count": 5200000,
"is_private": false
}
],
"hashtags": [
{
"name": "travelphotography",
"media_count": 189000000
}
],
"places": [
{
"title": "Travel Photography Studio",
"location": {
"lat": 40.7128,
"lng": -74.006
}
}
]
}
}Response Fields
| Field | Type | Description |
|---|---|---|
ok | boolean | Whether the request succeeded |
data.users | object[] | Array of matching user accounts |
data.users[].username | string | Instagram username |
data.users[].full_name | string | User's display name |
data.users[].profile_pic_url | string | Profile picture URL |
data.users[].is_verified | boolean | Whether the user is verified |
data.users[].follower_count | number | Number of followers |
data.users[].is_private | boolean | Whether the account is private |
data.hashtags | object[] | Array of matching hashtags |
data.hashtags[].name | string | Hashtag name (without #) |
data.hashtags[].media_count | number | Number of posts using this hashtag |
data.places | object[] | Array of matching places |