Manual scraping for Instagram data is dead. It’s brittle, IP-intensive, and breaks every time a div class changes. If you are building influencer discovery tools, brand monitoring dashboards, or social listening apps, you need structured JSON, not raw HTML.
This guide covers how to programmatically search for Instagram users and hashtags using SteadyAPI.
Obtain API key
Prerequisites
To make requests, you need an API Key. You must include this key in the header of every request:
Authorization: Bearer {YOUR_AUTH_KEY}
1. Searching for Instagram Users
Whether you are vetting influencers or analyzing competitor accounts, the User Search endpoint provides profile metadata, verification status, and internal IDs needed for deeper lookups (like fetching followers or highlights).
Endpoint: GET /v1/instagram/users/search
Docs: SteadyAPI Docs: Instagram Users Search
Python Implementation
import requests
url = "https://api.steadyapi.com/v1/instagram/users/search"
payload = {
"search": "mrbeast" # The username or term to search
}
headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Accept": "application/json"
}
response = requests.get(url, headers=headers, params=payload)
if response.status_code == 200:
data = response.json()
for user in data.get('body', []):
print(f"User: {user['username']} | Verified: {user['is_verified']} | ID: {user['id']}")
else:
print(f"Error: {response.status_code}")
Example JSON Response
The API returns a list of users matching the query. Key fields include is_verified, is_private, and the id (pk), which is essential for other endpoints.
{
"meta": {
"version": "v1.0",
"status": 200,
"search": "mrbeast",
"total": 55
},
"body": [
{
"id": 2278169415,
"username": "mrbeast",
"full_name": "MrBeast",
"profile_pic": "https://scontent-dfw5-1.cdninstagram.com/v/t51.2885-19/...",
"is_verified": true,
"is_private": false,
"latest_reel_media": 0,
"profile_url": "https://www.instagram.com/mrbeast/"
},
{
"id": 56844315148,
"username": "mrbeastcasting",
"full_name": "MrBeast Casting",
"is_verified": true,
"is_private": false
}
]
}
Key Fields
-
id
The numeric account identifier (pk) required for deeper Instagram lookups -
username
The public handle of the user account -
full_name
The display name of the profile -
is_verified
Boolean flag confirming whether the account is officially verified -
is_private
Boolean flag indicating whether the account content is restricted -
profile_url
The direct Instagram profile link
Use Cases
Influencer Vetting: Filter results by is_verified: true to filter out fan accounts.
Account ID Resolution: Convert a username string into a numeric ID (pk) to use with endpoints like /v1/instagram/followers.
Brand Safety: Check if a target account is private before attempting to pull media.
2. Searching for Hashtags
Hashtag search is critical for trend analysis. This endpoint doesn't just return the tag name; it provides the media count, allowing you to gauge the popularity and volume of a specific topic immediately.
Endpoint: GET /v1/instagram/hashtags/search
Docs: SteadyAPI Docs: Instagram Hashtags Search
Python Implementation
import requests
url = "https://api.steadyapi.com/v1/instagram/hashtags/search"
payload = {
"search": "investing"
}
headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Accept": "application/json"
}
response = requests.get(url, headers=headers, params=payload)
if response.status_code == 200:
data = response.json()
for tag in data.get('body', []):
print(f"#{tag['name']} - Posts: {tag['formatted_media_count']}")
else:
print(f"Error: {response.status_code}")
Example JSON Response
The response provides the exact internal ID for the tag and the total volume of posts associated with it.
{
"meta": {
"version": "v1.0",
"status": 200,
"search": "investing"
},
"body": [
{
"id": 17843685037055240,
"name": "investingtips",
"media_count": 1826347,
"formatted_media_count": "1.8M",
"search_result_subtitle": "1.8M posts",
"profile_pic_url": "",
"use_default_avatar": true
},
{
"id": 17843762590055240,
"name": "investing",
"media_count": 14500000,
"formatted_media_count": "14.5M",
"search_result_subtitle": "14.5M posts",
"use_default_avatar": true
}
]
}
Key Fields
-
id
The unique internal hashtag identifier -
name
The hashtag string used on Instagram -
media_count
The raw total number of posts using the hashtag -
formatted_media_count
Human-readable post count (e.g., 14.5M) -
search_result_subtitle
Display-friendly summary of the hashtag volume
Use Cases
Trend Validation: Determine if a campaign tag is gaining traction by monitoring media_count.
Autocomplete: Build a user-facing hashtag autocomplete feature for your social media scheduling tool.
Niche Discovery: Find related tags (e.g., searching investing reveals investingtips) to expand reach.
Next Steps
Once you have identified the target Users or Hashtags, you can leverage the data for deeper analysis using these related endpoints:
Get User Details: Use the username found in search to get bio and follower counts via /v1/instagram/profile.
Get Feed Data: Use the user's username to download their recent content via /v1/instagram/posts.
General Search: If you want to search specifically for Posts/Media rather than accounts or tags, use the /v1/instagram/search endpoint.
For full implementation details, view the SteadyAPI Collection.
Learn more or explore other endpoints:
SteadyAPI Stock and Options Data API