# Instagram Mentions Scraper (`apify/instagram-tagged-scraper`) Actor

Extract data from tagged posts and mentions on Instagram. Just add one or more Instagram usernames and get post text, hashtags, mentions, comments, images, likes, locations, and metadata. Export scraped data, run the scraper via API, schedule and monitor runs, or integrate with other tools.

- **URL**: https://apify.com/apify/instagram-tagged-scraper.md
- **Developed by:** [Apify](https://apify.com/apify) (Apify)
- **Categories:** Social media
- **Stats:** 9,239 total users, 555 monthly users, 100.0% runs succeeded, 98 bookmarks
- **User rating**: 5.00 out of 5 stars

## Pricing

from $1.50 / 1,000 posts

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

### 🔖 What does Instagram Mentions Scraper do?

This Instagram Mentions Scraper allows you to **scrape mentions and tagged posts from any public Instagram account**. It helps you extract data from tagged posts onto your computer in just a few minutes. Using this simple web scraping tool, you can get:

<table>
<tr>
<td>👍 Number of likes</td>
<td>🔗 Post URL</td>
</tr>
<tr>
<td>🖼️ Post image URL</td>
<td>📐 Image dimensions</td>
</tr>
<tr>
<td>#️⃣ Hashtags</td>
<td>✉️ Text</td>
</tr>
<tr>
<td>💬 Number of comments</td>
<td>💬 First comment</td>
</tr>
<tr>
<td>💬 Latest comments</td>
<td>👍 Number of likes</td>
</tr>
<tr>
<td>⏱️ Timestamp</td>
<td>📍 Location if indicated</td>
</tr>
<tr>
<td>👤 Author username</td>
<td>🎥 Video duration</td>
</tr>
</table> <br>

You can download scraped data in Excel, HTML, XML, CSV, and JSON to use in reports, data visualizations, spreadsheets, and applications.

### ⬇️ Input

There are just two fields to fill out: **an Instagram username (one or multiple) and the number of results** you'd like to receive. Let's scrape the recent tagged posts and mentions from Volodymyr Zelenskiy's Instagram account:

![Scrape Instagram tagged posts and mentions](https://github.com/apify-projects/actor-readme-images/blob/master/Instagram%20Tagged%20Posts%20Scraper.png?raw=true)

### ⬆️ Output example

The scraped Instagram posts will be shown as a dataset which you can find in the **Output or Storage tabs**. Note that the output will first be organized as a table for viewing convenience:

![Scrape Instagram mentions and tagged posts](https://github.com/apify-projects/actor-readme-images/blob/master/Instagram%20Mentions%20Scraper.png?raw=true)

You can preview all the fields and choose in which format to download the data you’ve extracted: JSON, Excel, HTML table, CSV, or XML. Here below is the same dataset in JSON:

```json
[{
  "id": "3205475538117343889",
  "type": "Sidecar",
  "shortCode": "Cx8IwTBsDqR",
  "caption": "Володимир Зеленський відвідав розташування бригад, які виконують бойові завдання в межах об’єднаного угрупування військ «Харків» та оперативно-тактичного угрупування «Лиман».\n\nПрезидент заслухав доповіді комбригів про ситуацію на полі бою, перебіг наступальних та оборонних дій, отримав інформацію про потреби захисників. Нагородив воїнів і бойових медиків, які відзначилися під час захисту України. \n\nТакож @zelenskiy_official оглянув танки Leopard-2 та бойові машини піхоти CV-90, які використовувалися в боях на Куп’янському напрямку.\n\n«Для мене честь бути сьогодні тут, подякувати вам і вашим побратимам за захист нашої держави. Це дуже важлива місія. Я бажаю всім вам лише перемоги», – сказав Президент.",
  "hashtags": [],
  "mentions": [
    "zelenskiy_official"
  ],
  "url": "https://www.instagram.com/p/Cx8IwTBsDqR/",
  "commentsCount": 35,
  "firstComment": "👏👏👏🙌❤️",
  "latestComments": [
    {
      "id": "18007029367997135",
      "text": "👏👏👏🙌❤️",
      "ownerUsername": "kolinko.tamara",
      "ownerProfilePicUrl": "https://scontent-sjc3-1.cdninstagram.com/v/t51.2885-19/368090596_972775277313315_7870059901126724304_n.jpg?stp=dst-jpg_s150x150&_nc_ht=scontent-sjc3-1.cdninstagram.com&_nc_cat=103&_nc_ohc=0qXI19WvBCMAX_5uWan&edm=AP_V10EBAAAA&ccb=7-5&oh=00_AfAC5YyeVIEEM3yB4MkL4PI7ZGZCylOmfk9s_p-pHf4tgw&oe=6523F1DD&_nc_sid=2999b8",
      "timestamp": "2023-10-05T05:19:54.000Z",
      "likesCount": 0
    },
    {
      "id": "18083902915376464",
      "text": "🖤🤍💔",
      "ownerUsername": "______vecrnita",
      "ownerProfilePicUrl": "https://scontent-sjc3-1.cdninstagram.com/v/t51.2885-19/385807487_3578372339118499_1278678778346866495_n.jpg?stp=dst-jpg_s150x150&_nc_ht=scontent-sjc3-1.cdninstagram.com&_nc_cat=107&_nc_ohc=OMSnDqlZYwEAX_HfEWL&edm=AP_V10EBAAAA&ccb=7-5&oh=00_AfCPGJMrHQ8tFyMdTSqZrl8mAZRyxlc49E4fjmgsf6CJ-w&oe=6522CA37&_nc_sid=2999b8",
      "timestamp": "2023-10-04T14:18:15.000Z",
      "repliesCount": 0,
      "replies": [],
      "likesCount": 0
    },
    {
      "id": "17994051434336194",
      "text": "❤️❤️❤️🇺🇦",
      "ownerUsername": "irenetsvikilevich",
      "ownerProfilePicUrl": "https://scontent-sjc3-1.cdninstagram.com/v/t51.2885-19/308013168_764158434814555_2518967502651414277_n.jpg?stp=dst-jpg_s150x150&_nc_ht=scontent-sjc3-1.cdninstagram.com&_nc_cat=107&_nc_ohc=qpxeCW-9xzAAX9e5F0T&edm=AP_V10EBAAAA&ccb=7-5&oh=00_AfCNxldG7agIfcXswne_pXSRlGMqVlZTOIUijHe5OqWcXA&oe=6523227F&_nc_sid=2999b8",
      "timestamp": "2023-10-04T14:13:51.000Z",
      "repliesCount": 0,
      "replies": [],
      "likesCount": 0
    },
    {
      "id": "18279315781158221",
      "text": "💘💝",
      "ownerUsername": "______monimjka",
      "ownerProfilePicUrl": "https://scontent-sjc3-1.cdninstagram.com/v/t51.2885-19/385792463_7104929702858999_8321013960410730356_n.jpg?stp=dst-jpg_s150x150&_nc_ht=scontent-sjc3-1.cdninstagram.com&_nc_cat=111&_nc_ohc=zSqDYVRJl5kAX8urAra&edm=AP_V10EBAAAA&ccb=7-5&oh=00_AfBx-yH8l6YJda3QVaeWcK_yttIoWvWOhmuEMknHrjR0MQ&oe=6523D6C4&_nc_sid=2999b8",
      "timestamp": "2023-10-04T12:32:00.000Z",
      "repliesCount": 0,
      "replies": [],
      "likesCount": 0
    },
    {
      "id": "17964824186502464",
      "text": "💛💚",
      "ownerUsername": "______arlett7a",
      "ownerProfilePicUrl": "https://scontent-ord5-2.cdninstagram.com/v/t51.2885-19/44884218_345707102882519_2446069589734326272_n.jpg?_nc_ht=scontent-ord5-2.cdninstagram.com&_nc_cat=1&_nc_ohc=HAahVpYjX1UAX8IF4r_&edm=AAAAAAABAAAA&ccb=7-5&ig_cache_key=YW5vbnltb3VzX3Byb2ZpbGVfcGlj.2-ccb7-5&oh=00_AfDsoSy5Ee47il7MT7gFjLTqEflaGOMDZ6WbUFfhw2XWdQ&oe=65240ACF&_nc_sid=000000",
      "timestamp": "2023-10-04T06:22:14.000Z",
      "repliesCount": 0,
      "replies": [],
      "likesCount": 0
    },
    {
      "id": "18098554222358865",
      "text": "❤️",
      "ownerUsername": "viktoria_zinchenko__",
      "ownerProfilePicUrl": "https://scontent-sjc3-1.cdninstagram.com/v/t51.2885-19/67787243_729926327433941_2292510442884431872_n.jpg?stp=dst-jpg_s150x150&_nc_ht=scontent-sjc3-1.cdninstagram.com&_nc_cat=105&_nc_ohc=lk5teAVtRjsAX-KzVu_&edm=AP_V10EBAAAA&ccb=7-5&oh=00_AfA6hod3qiYnGjk8A0yMn_FSPW9jISJZMtiPCHINNmOZ4g&oe=65233680&_nc_sid=2999b8",
      "timestamp": "2023-10-03T23:39:48.000Z",
      "repliesCount": 0,
      "replies": [],
      "likesCount": 0
    }
    ...
```

### 🎞 Need something more advanced?

If you need more options and are comfortable with changing settings, you can try our more advanced and popular [Instagram Scraper](https://apify.com/apify/instagram-scraper). You can also let us know if you need a [custom web scraping solution](https://apify.com/custom-solutions).

#### Want to scrape Instagram comments, profiles, or hashtags?

Use our super fast and easy dedicated scrapers if you want to scrape specific Instagram data. There are fewer settings to change and faster results. Just enter one or more Instagram usernames or URLs and click **Start** to scrape Instagram.

<table>
  <tr>
    <td>#️⃣ <a href="https://apify.com/apify/instagram-hashtag-scraper">Instagram Hashtag Scraper</a></td>
    <td>👨‍🎤 <a href="https://apify.com/apify/instagram-profile-scraper">Instagram Profile Scraper</a></td>
  </tr>
  <tr>
    <td>💬 <a href="https://apify.com/apify/instagram-comment-scraper">Instagram Comment Scraper</a></td>
    <td>🎬 <a href="https://apify.com/apify/instagram-reel-scraper">Instagram Reel Scraper</a></td>
  </tr>
  <tr>
    <td>✍️ <a href="https://apify.com/apify/instagram-post-scraper">Instagram Post Scraper</a></td>
    <td>🤳 <a href="https://apify.com/apify/instagram-followers-count-scraper">Instagram Followers Count Scraper</a></td>
  </tr>
<tr>
<td>📊 <a href="https://apify.com/apify/instagram-hashtag-analytics-scraper">Instagram Hashtag Analytics Scraper</a></td>
<td>🔮 <a href="https://apify.com/apify/brand-collaboration-scraper">Instagram Influencer Collaboration Scraper</a></td>
</tr>
<tr>
<td>🛍️ <a href="https://apify.com/apify/facebook-ads-scraper">Instagram Ads Scraper</a></td>
</tr>
</table>

### ❓ FAQ

#### How do I scrape tagged posts from Instagram?

Instagram Mentions Scraper was created to be fast and easy to use. We've made two tutorials that should solve the learning question for you: [a simple guide](https://blog.apify.com/how-to-scrape-instagram-user-tagged-posts-in-5-easy-steps/) and a quick video ▷

https://www.youtube.com/watch?v=aHcyYLr8djA

#### How many results can you scrape with Instagram Mentions Scraper?

Instagram Mentions Scraper scraper is able to return **thousands of results** on average.

You have to keep in mind that scraping Instagram mentions and tagged posts is dynamic and subject to change. There’s no one-size-fits-all-use-cases number. **The maximum number of results may vary depending on the complexity of the input, location, and other factors.**

Therefore, while we regularly run Actor tests to keep the benchmarks in check, the results may also fluctuate without our knowing. The best way to know for sure for your particular use case is to do a test run yourself.

#### How much will scraping Instagram Mentions cost you?

When it comes to scraping, it can be challenging to estimate the resources needed to extract data as use cases may vary significantly. That's why the best course of action is to run a test scrape with a small sample of input data and limited output. You’ll get your price per scrape, which you’ll then multiply by the number of scrapes you intend to do.

→ [Watch this video](https://www.youtube.com/watch?v=-wyz2iscZ30) for a few helpful tips. And don't forget that choosing a higher plan will save you money in the long run.

#### Is it legal to scrape Instagram?

Our [Instagram scrapers](https://apify.com/store?search=instagram) are ethical and do not extract any private user data such as email addresses, gender, or location. They only extract what the user has chosen to share publicly. We therefore believe that our scrapers, when used for ethical purposes by Apify users, are safe.

However, you should be aware that your results could contain personal data. Personal data is protected by the [GDPR](https://en.wikipedia.org/wiki/General_Data_Protection_Regulation) in the European Union and by other regulations around the world. You should not scrape personal data unless you have a legitimate reason to do so. If you're unsure whether your reason is legitimate, consult your lawyers. You can also read our blog post on the [legality of web scraping](https://blog.apify.com/is-web-scraping-legal/).

#### Can I integrate Instagram Mentions Scraper with other apps?

Yes. Instagram Mentions Scraper can be connected with almost any cloud service or web app thanks to <a href="https://apify.com/integrations"  target="_blank"> integrations on the Apify platform</a>. You can integrate with Make, Zapier, Slack, Airbyte, GitHub, Google Sheets, Google Drive, <a href="https://docs.apify.com/integrations"  target="_blank"> and more</a>. Or you can use <a href="https://docs.apify.com/integrations/webhooks"  target="_blank"> webhooks</a> to carry out an action whenever an event occurs, e.g. get a notification whenever Instagram Mentions Scraper successfully finishes a run.

#### Can I use Instagram Mentions Scraper with API?

Yes, you can do so using Apify API. It gives you programmatic access to the Apify platform. The API is organized around RESTful HTTP endpoints that enable you to manage, schedule, and run Apify Actors. The API also lets you access any datasets, monitor Actor performance, fetch results, create and update versions, and more.

To access the API using Node.js, use the `apify-client` NPM package. To access the API using Python, use the `apify-client` PyPI package. Check out the <a href="https://docs.apify.com/api/v2"  target="_blank"> Apify API reference</a> docs for full details or click on the <a href="https://apify.com/apify/instagram-tagged-scraper/api"  target="_blank"> API tab</a> for code examples.

#### How can you use data from Instagram mentions and tagged posts?

So what can you do with all that data you collect by web scraping? Here are just some ideas:

- improve your market research
- help you optimize your marketing and PR
- assist with sentiment analysis
- help you understand audience engagement
- datasets containing thousands or millions of Instagram tagged posts can be used to train your AI models, monitor fake news, or fight hate speech.

#### Your feedback

We’re always working on improving the performance of our Actors. So if you’ve got any technical feedback for Instagram Mentions Scraper or simply found a bug, please create an issue on the Actor’s [Issues tab](https://console.apify.com/actors/zTSjdcGqjg6KEIBlt/issues) in Apify Console.

# Actor input Schema

## `username` (type: `array`):

Just insert a username or URL of the profile you want to get the user tagged user tagged posts from.

## `resultsLimit` (type: `integer`):

Maximum number of user tagged posts you want to scrape per profile. If you set it to 5, you'll get 5 user tagged posts for each profile you've included.

## Actor input object example

```json
{
  "username": [
    "natgeo"
  ],
  "resultsLimit": 20
}
```

# Actor output Schema

## `dataset` (type: `string`):

Dataset containing all scraped posts where the user is tagged

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "username": [
        "natgeo"
    ],
    "resultsLimit": 20
};

// Run the Actor and wait for it to finish
const run = await client.actor("apify/instagram-tagged-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "username": ["natgeo"],
    "resultsLimit": 20,
}

# Run the Actor and wait for it to finish
run = client.actor("apify/instagram-tagged-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "username": [
    "natgeo"
  ],
  "resultsLimit": 20
}' |
apify call apify/instagram-tagged-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=apify/instagram-tagged-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/acts/zTSjdcGqjg6KEIBlt/builds/Vm9JemfGn5MetzL4h/openapi.json
