All scrapers by Muhammad Noman Riaz

Instagram Hashtag Scraper

AutomationDeveloper toolsSocial media

Scrape Instagram posts or reels for any hashtag: caption, author, likes, comment count, images, time and optional latest comments. Requires the cookies of your own Instagram account.

Run Instagram Hashtag Scraper on Apify

What does Instagram Hashtag Scraper do?

Get Instagram posts or reels for any hashtag: caption, hashtags and mentions in the caption, author, likes, comment count, images, location, music info, time posted and, if you want, the latest comments of each post.

Cookies are required. Instagram only shows hashtag results to logged-in users (logged-out visitors are sent to the login page), so you must add the cookies of your own Instagram account. Use a secondary account, not your main one. See [How to get your Instagram cookies](#how-to-get-your-instagram-cookies).

FAQ

Do I need cookies?

Yes. Instagram sends logged-out visitors of hashtag pages to the login page, and its search answers "page not found" without a login. The run stops right away with a message if the cookies field is empty or is missing sessionid, ds_user_id or csrftoken.

Why did my run fail with expired cookies?

The message "Your Instagram cookies expired or were rejected; refresh them" means Instagram answered with a login page, a 401, login_required or checkpoint_required. The session was logged out, expired or needs a security check. Log in to the account in your browser, clear any check Instagram shows, then copy fresh cookies. If you gave several sessions, the rejected one is dropped and the others keep working.

Is my account safe?

Use a secondary account. Instagram can rate-limit or challenge any account that loads many pages quickly, and that is outside this scraper's control. The cookies field is stored encrypted and its values are never logged.

How many comments can I get?

Up to maxComments of the latest comments per post, from the first page Instagram returns for that post. For full comment threads, use the Instagram Comments Scraper on the post URLs.

Get started

Open the Instagram Hashtag Scraper page on Apify, add your input and run it. Results export as JSON, CSV or Excel, or come back through the Apify API and the Apify MCP server for AI agents.