Instagram Search Scraper - Keywords & Hashtags avatar

Instagram Search Scraper - Keywords & Hashtags

Pricing

from $1.00 / 1,000 results

Go to Apify Store
Instagram Search Scraper - Keywords & Hashtags

Instagram Search Scraper - Keywords & Hashtags

Scrape Instagram posts and reels by keyword or hashtag. Add one or more search terms and get post links, captions, hashtags, usernames, photos, videos, likes and comments. Export to JSON, CSV or Excel. Good for trend research, content ideas and brand monitoring.

Pricing

from $1.00 / 1,000 results

Rating

0.0

(0)

Developer

Dataspryva

Dataspryva

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

10 days ago

Last modified

Features

Limited permissions

Share

Type in a topic, a phrase or a hashtag and get back the public Instagram posts that show up for it. Every post comes with its link, caption, hashtags and mentions, photos and videos, likes and comments, tagged accounts and details about the account that posted it. Run several keywords in one go and each result is labelled with the keyword that found it. It suits marketers, social media managers, agencies and researchers who want to see what Instagram surfaces for a subject without scrolling through the app.

What this actor does

  • Searches by keyword or hashtag: single words (travel), multi-word phrases (sunset photography) and hashtags (#nature) all work, and you can list as many as your plan allows in one run.
  • Labels every post with its keyword: the input_keyword field tells you which search produced which post, so one dataset can hold a whole topic list.
  • Returns full post details, not just links: caption, hashtags, mentions, media files, likes, comments, tagged users, collaborators and location.
  • Shows who posted it: a nested author block with name, verified badge and profile link.
  • Clear status for every post: posts that are deleted, private or age-restricted come back with a clear status instead of silently vanishing.

Output per post

Each result is one Instagram post that appeared for a keyword.

  • input_keyword – the keyword or hashtag that produced this post
  • post_url – link to the post on Instagram
  • shortcode – the short code in the post link
  • post_id – Instagram's numeric ID for the post
  • username – the account that published the post
  • author_meta – details about the author: id, username, full_name, is_verified, profile_pic_url, profile_url
  • caption – the caption text
  • hashtags – hashtags found in the caption
  • mentions – accounts @mentioned in the caption
  • pub_date – when the post was published (ISO 8601)
  • media_type – Photo, Video, Reel, Carousel or IGTV
  • media_count – number of photos/videos in the post (more than 1 for carousels)
  • thumbnail_url – link to the cover or display image
  • media_items – one entry per photo or video with its index, type, url, width and height; videos also carry duration and has_audio
  • accessibility_caption – Instagram's image description text, when there is one (otherwise an empty string)
  • like_count – number of likes (empty when the author hides likes)
  • comment_count – number of comments
  • likes_hidden – true if the author hides the like count
  • comments_disabled – true if comments are turned off
  • tagged_users – accounts tagged in the post
  • collaborators – co-authors of the post
  • caption_is_edited – true if the caption was changed after posting
  • location – the tagged place (name, ID, coordinates), or empty when none is tagged
  • music – the audio attached to a Reel (artist, title, audio ID and similar), or empty when there is none
  • status – success for a collected post, otherwise the reason there is none (see "Status values")
  • scraped_at – when the post was collected (UTC)

Status values

A post that was found and collected is success. Anything else is a record with a status that names the cause; the reason, which keyword or post it was and what you can do about it, is written in the run log.

For a post:

  • post_not_found – the post is deleted or unavailable.
  • post_age_restricted – the post sits behind an age restriction on the account.
  • post_is_private – the post belongs to a private account.
  • error / blocked – the post could not be loaded after several attempts.
  • invalid_url – the link found for the post did not look like a valid Instagram post link.

For a keyword that gave no posts:

  • no_results – Instagram's search returned no posts for the keyword.
  • cookies_unusable – Instagram did not accept the cookies used for the search, so the keyword could not be searched.
  • blocked – Instagram kept refusing the search requests; run it again later.
  • error – the search could not be completed; run it again later.

A record of a post that could not be collected holds only post_url, input_keyword and status. A record of a keyword that gave no posts holds only input_keyword and status.

The run log shows one block per keyword, with the posts found for it listed underneath, and ends with a Done: summary. While the run is going, the status message shows a live count such as Searched 2/5 keywords.

Input

FieldTypeDefaultDescription
keywordsarray–Required. Keywords, phrases or hashtags to search. Each entry can be up to 100 characters; duplicates are skipped.
maxPostsinteger100Maximum number of posts to collect per keyword (1 to 10000).
cookiesstring–Optional. Your Instagram cookies as a JSON array. Leave empty to use a managed session (see Authentication).

Example: one broad topic

{
"keywords": ["travel"],
"maxPosts": 100
}

Example: compare several topics in one run

{
"keywords": ["sunset photography", "streetfood", "#nature"],
"maxPosts": 50
}

Example: watch a campaign hashtag

{
"keywords": ["#nikeairmax", "#justdoit"],
"maxPosts": 300
}

Example: large crawl with your own cookies

{
"keywords": ["architecture"],
"maxPosts": 10000,
"cookies": "<your cookies JSON>"
}

Authentication

Instagram's keyword search only works for signed-in visitors, so this actor needs Instagram session cookies for the search step. You can either:

  1. Add your own cookies: open Instagram while logged in, export your instagram.com cookies as JSON with any cookie-export extension, then drop the JSON into the cookies field before you start the run.
  2. Leave the cookies field blank: the actor will automatically use a managed pool of shared Instagram sessions. This is the recommended option for most users.

Collecting the details of each post, the second step after posts are found, does not need cookies. If your cookies expire mid-run, export them again from your browser and restart the actor.

Free plan

The free Apify plan runs the same search as a paid plan: every keyword you list and every page of results, up to your maxPosts value (large crawls are subject to your plan limits).

Example output

{
"input_keyword": "travel",
"post_url": "https://www.instagram.com/p/ABC123/",
"shortcode": "ABC123",
"post_id": "3711296250294340356",
"username": "john_travels",
"author_meta": {
"id": "123456789",
"username": "john_travels",
"full_name": "John Smith",
"is_verified": false,
"profile_pic_url": "https://scontent.cdninstagram.com/v/example.jpg",
"profile_url": "https://www.instagram.com/john_travels/"
},
"caption": "Exploring the streets of Lisbon #travel #portugal",
"hashtags": ["travel", "portugal"],
"mentions": [],
"pub_date": "2024-11-15T14:23:10",
"media_type": "Photo",
"media_count": 1,
"thumbnail_url": "https://scontent.cdninstagram.com/v/example-thumb.jpg",
"media_items": [
{
"index": 0,
"type": "Photo",
"url": "https://scontent.cdninstagram.com/v/example-full.jpg",
"width": 1080,
"height": 1350
}
],
"accessibility_caption": "",
"like_count": 1842,
"comment_count": 34,
"likes_hidden": false,
"comments_disabled": false,
"tagged_users": [],
"collaborators": [],
"caption_is_edited": false,
"location": null,
"music": null,
"status": "success",
"scraped_at": "2026-07-03T10:00:00"
}

Use cases

  • Social media managers – see which posts and creators come up for the hashtags your brand competes on.
  • Agency strategists – collect the posts behind a trend before pitching a campaign idea to a client.
  • Influencer marketers – see which accounts post popular content in a niche and compare their reach at a glance.
  • Brand and PR teams – search your product name or campaign hashtag to see how creators are talking about it.
  • Academic and market researchers – build a topic-based sample of captions, hashtags and engagement for analysis.

Responsible use

Search results are made of what real people chose to post, and a public caption, username or follower count can still identify someone. Before you collect it, make sure you have a lawful basis (for example under the GDPR) for gathering and storing it, keep only what your project needs, and respect the people behind the posts, including requests to delete their data. Do not use the results to profile, track or target minors, and do not use them to pick out or infer special categories of personal data such as health, religion, political views or sexual orientation.

FAQ

Do I need an Instagram account?

No. If you leave the cookies field empty, the actor uses a managed session for the search. You can paste your own cookies instead if you prefer to search from your own account.

Does it work with hashtags?

Yes. Enter a word with or without the leading # (for example #nature) or a multi-word phrase. Each entry is searched as you typed it, so try both forms if you want to compare what comes back.

Can it return posts from private accounts?

No. Only posts that Instagram shows publicly in its search can be collected. If a post turns out to be private, it appears with the post_is_private status and no other details.

How many posts can I get per keyword?

Up to 10,000, set with maxPosts. If a keyword runs out of new posts before it reaches that number, the actor moves on to the next keyword. Large crawls are subject to your plan limits.

Why are some like counts empty?

Some authors hide the like count on their posts. In that case likes_hidden is true and like_count has no value. Fields such as location and music are also empty when the post has none.

Posts that could not be collected in full (deleted, private, age-restricted or failed to load) are still listed so you can see what happened to them, and a keyword that gave no posts is listed with its own status. Filter on status equal to success if you only want complete posts.

How fresh is the data?

Everything is read live during the run, so likes, comments and captions reflect Instagram at the moment of collection. The scraped_at field records when that was.

Do I need to set up a proxy?

No. The actor handles its connection to Instagram automatically. Just fill in your keywords and run it.

Is this affiliated with Instagram or Meta?

No. It is an independent tool and is not affiliated with, endorsed by or sponsored by Instagram or Meta Platforms, Inc.