# Instagram hashtag scraper

**Use case:** 

Collect the top posts for any Instagram hashtag, with captions, likes, comment counts, dates, images and the accounts that posted them. Change the hashtag to track a topic, a trend or an event.

## Input

```json
{
  "resultsType": "posts",
  "directUrls": [
    "https://www.instagram.com/humansofny/"
  ],
  "resultsLimit": 30,
  "search": "#travel",
  "searchType": "hashtag",
  "searchLimit": 1,
  "skipPinnedPosts": false,
  "isNewestComments": false,
  "includeNestedComments": false,
  "addParentData": false,
  "includeTopPosts": false,
  "addProfileStatistics": false,
  "enrichPosts": true,
  "extractContacts": true,
  "addRelatedProfiles": true,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  },
  "maxConcurrency": 8,
  "docIds": {
    "post": "27130156389949648"
  },
  "probe": false
}
```

## Output

```json
{
  "displayUrl": {
    "label": "Image",
    "format": "string"
  },
  "url": {
    "label": "Post",
    "format": "string"
  },
  "type": {
    "label": "Type",
    "format": "string"
  },
  "ownerUsername": {
    "label": "Owner",
    "format": "string"
  },
  "caption": {
    "label": "Caption",
    "format": "string"
  },
  "likesCount": {
    "label": "Likes",
    "format": "integer"
  },
  "commentsCount": {
    "label": "Comments",
    "format": "integer"
  },
  "videoPlayCount": {
    "label": "Plays",
    "format": "integer"
  },
  "timestamp": {
    "label": "Posted",
    "format": "string"
  },
  "isPinned": {
    "label": "Pinned",
    "format": "boolean"
  },
  "hashtags": {
    "label": "Hashtags",
    "format": "array"
  }
}
```

## How it works

### 1. Sign up on Apify or log in

The Fast Instagram Scraper Actor is ready to run with the inputs already set for "Instagram hashtag scraper". [Sign up or log in](https://console.apify.com/create-task-from-example/z6IqSNZiwVaVWHyUJ) and you'll land in Apify Console with a copy of this exact task.

### 2. Start the "Instagram hashtag scraper" task

The Fast Instagram Scraper Actor will start running based on the input automatically. You can also change all the input fields, like content to scrape, instagram urls, usernames or hashtags, and more, to match your specific use case.

### 3. Receive the "Instagram hashtag scraper" output

Monitor the progress in real time. You will be notified as soon as your dataset is complete and ready for review. Each result includes data such as image, post, type, and more.

### 4. Integrate into your workflow

The final output is delivered in JSON, CSV, or Excel format, ready to be plugged into your workflow. You can also [run the "Instagram hashtag scraper" task via API](https://apify.com/solutionssmart/fast-instagram-scraper.md).

## FAQ

### What data can I collect with the Instagram hashtag scraper?

The Instagram hashtag scraper collects public posts including captions, likes, comment counts, dates, images, and the accounts that posted them for a specific hashtag.

### What is the search input for this task?

The search input for this task currently targets the hashtag #travel with a limit of 1 search.

### What do the output fields 'likesCount' and 'commentsCount' mean?

The 'likesCount' field indicates the total likes on a post or comment, while 'commentsCount' indicates how many comments a post has received.

### Can this task be run automatically on a schedule?

The Instagram hashtag scraper can be scheduled to run automatically using the Apify Console.

### Is a login required to use this task?

The Instagram hashtag scraper does not require a login to collect data.

### What format will the output data be in?

The output data from the Instagram hashtag scraper will include fields such as post URL, image URLs, owner username, and engagement metrics.

## About this Actor

This example demonstrates how to use [Fast Instagram Scraper](https://apify.com/solutionssmart/fast-instagram-scraper.md) with a specific input configuration. Visit the [Actor detail page](https://apify.com/solutionssmart/fast-instagram-scraper.md) to learn more, explore other use cases, and run it yourself.


## How to integrate an Actor?

This Task's input is already configured above. Use it as-is rather than inventing a new one.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For full API examples (JavaScript, Python, CLI, MCP, OpenAPI), see this Task's Actor page: https://apify.com/solutionssmart/fast-instagram-scraper.md

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).
