# Instagram Post Text Extractor (`rainminer/instagram-post-text-extractor`) Actor

Extract in-image text from public Instagram posts and carousels—overlays, captions, quotes, stickers, hashtags, and @mentions—with per-image results, type, position, language, and confidence. Each carousel slide processed separately. No login. Built for OCR, brand monitoring, and content intel.

- **URL**: https://apify.com/rainminer/instagram-post-text-extractor.md
- **Developed by:** [rainminer](https://apify.com/rainminer) (community)
- **Categories:** Social media, AI, Agents
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $47.00 / 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 a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use 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

The **Instagram Post Text Extractor** is an Apify Actor that reads public Instagram posts and returns every piece of text visible inside the images as structured data. Businesses burn text, quotes, prices, offers, and announcements directly onto their post images and carousels — this Actor unlocks that content for search, analysis, and database ingestion without manual review.

Every image in a post is processed individually — including each slide of a multi-image carousel — by AI vision, and the results are returned as a structured dataset of text segments per image, each with its type, position, language, and confidence rating.

---

### Key Features

- **Full in-image text extraction**: Captures text overlays, burned-in captions, quotes, Instagram stickers, watermarks, hashtags, and @mentions.
- **Carousel-aware**: Processes every image in a multi-image carousel separately and reports which image each text segment came from.
- **Type classification**: Distinguishes overlay, caption, quote, sticker, watermark, hashtag, mention, and other text types.
- **Multilingual**: Detects the ISO 639-1 language code for each segment from the text itself.
- **Position detection**: Classifies text placement as top, center, or bottom of the image.
- **Confidence rating**: High/medium/low rating based on text clarity in the image.
- **No login required**: Works with any public Instagram post.

---

### Why Extract Text from Posts?

Instagram posts and carousels are a primary publishing surface for businesses, creators, and brands. Menu specials, product drops, event announcements, hiring notices, quote cards, and pricing updates are routinely shared only as text baked into images — never structured or indexed. This Actor makes that content machine-readable for:

- **Content intelligence and brand monitoring** tracking what competitors publish in posts.
- **Food and hospitality** capturing daily specials and seasonal menus shared as image posts.
- **Event aggregators** extracting event names, dates, and lineup text from promotional carousels.
- **Retail and e-commerce** indexing product drops, discount codes, and launch dates.
- **Market research** tracking pricing, offers, and messaging trends across accounts.
- **Accessibility tools** converting visual post text to readable formats.

---

### Who Is It For?

- **Marketing and analytics teams** monitoring brand or competitor post content at scale.
- **Product and data teams** building structured datasets from Instagram image content.
- **Developers** integrating post text extraction into discovery or monitoring pipelines.
- **Researchers** studying visual communication trends in social media imagery.

---

### Input Schema

```json
{
  "urls": [
    "https://www.instagram.com/p/DaVyCIrETvD/",
    "https://www.instagram.com/p/Dagut_GRUzu/"
  ],
  "maxItems": 10
}
````

**`urls` is required. All other fields are optional.**

| Field      | Type             | Default | Description                                             |
| ---------- | ---------------- | ------- | ------------------------------------------------------- |
| `urls`     | Array of strings | —       | Public Instagram post URLs (`/p/...`), single or carousel |
| `maxItems` | Integer          | `10`    | Maximum number of posts to process in a single run      |

***

### Output Schema

Each dataset item represents one post, with a per-slide breakdown of the text found:

```json
{
  "url": "https://www.instagram.com/p/DaVyCIrETvD/",
  "shortcode": "DaVyCIrETvD",
  "slideCount": 2,
  "slides": [
    {
      "slide": 1,
      "textSegments": [
        {
          "text": "SUMMER SALE — 30% OFF",
          "type": "overlay",
          "position": "center",
          "language": "en",
          "confidence": "high"
        }
      ]
    },
    {
      "slide": 2,
      "textSegments": []
    }
  ],
  "scrapedAt": "2026-07-08T08:15:42.000Z"
}
```

| Field                                | Description                                                                             |
| ------------------------------------ | --------------------------------------------------------------------------------------- |
| `url`                                | Normalized canonical URL of the post                                                    |
| `shortcode`                          | Instagram shortcode (e.g. `DaVyCIrETvD`)                                                 |
| `slideCount`                         | Number of carousel slides processed for this post                                       |
| `slides`                             | Array of per-slide results (one entry per carousel image)                               |
| `slides[].slide`                     | Slide number within the post (1 = first slide)                                          |
| `slides[].textSegments`              | Array of all text elements found on that slide                                          |
| `slides[].textSegments[].text`       | The visible text content as it appears in the image                                     |
| `slides[].textSegments[].type`       | `overlay` | `caption` | `quote` | `sticker` | `watermark` | `hashtag` | `mention` | `other` |
| `slides[].textSegments[].position`   | `top` | `center` | `bottom` — vertical position, `null` if unclear                    |
| `slides[].textSegments[].language`   | ISO 639-1 language code detected from the text, e.g. `"en"` — `null` if indeterminate   |
| `slides[].textSegments[].confidence` | `high` | `medium` | `low` — extraction confidence based on text clarity               |
| `scrapedAt`                          | ISO timestamp of when this post was processed                                           |

***

### How It Works

1. **Validate inputs** — each URL is checked against accepted Instagram post URL patterns and normalized to a canonical form.
2. **Fetch images** — every image in the post is retrieved, including all slides of a carousel, without requiring a browser or login session.
3. **AI text extraction** — each image is analyzed by AI vision to extract all visible text.
4. **Structured output** — each text segment is classified by type, position, language, and confidence.
5. **Push to dataset** — one dataset row is pushed per post containing a per-image breakdown of its text.

***

### Notes and Limitations

- **Public posts only**: Private accounts and posts that require login to view are not supported.
- **Image availability**: Deleted or expired posts will fail to download and are skipped with a warning.
- **OCR accuracy**: Stylized fonts, small text, or low-contrast text may yield lower confidence extractions.
- **Rate limiting**: Instagram may rate-limit requests at high volume. Reduce concurrency or add delays between runs if you encounter failures.
- **Images only**: Video slides within a carousel are not analyzed — use the Instagram Reel Text Extractor for video content.

***

### Image Credit

Image credit: [instagram.com](https://www.instagram.com/)

# Actor input Schema

## `urls` (type: `array`):

Public Instagram post URLs to process. Accepts single-image posts and multi-image carousels (instagram.com/p/...).

## `maxItems` (type: `integer`):

Maximum number of posts to process in a single run.

## `proxyConfiguration` (type: `object`):

Apify Proxy is used to fetch Instagram post images. Failed downloads are retried with a different proxy automatically.

## Actor input object example

```json
{
  "urls": [
    "https://www.instagram.com/p/DaVyCIrETvD/",
    "https://www.instagram.com/p/Dagut_GRUzu/"
  ],
  "maxItems": 10,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

## `overview` (type: `string`):

No description

# 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 = {
    "urls": [
        "https://www.instagram.com/p/DaVyCIrETvD/",
        "https://www.instagram.com/p/Dagut_GRUzu/"
    ],
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("rainminer/instagram-post-text-extractor").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 = {
    "urls": [
        "https://www.instagram.com/p/DaVyCIrETvD/",
        "https://www.instagram.com/p/Dagut_GRUzu/",
    ],
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("rainminer/instagram-post-text-extractor").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 '{
  "urls": [
    "https://www.instagram.com/p/DaVyCIrETvD/",
    "https://www.instagram.com/p/Dagut_GRUzu/"
  ],
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call rainminer/instagram-post-text-extractor --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Instagram Post Text Extractor",
        "description": "Extract in-image text from public Instagram posts and carousels—overlays, captions, quotes, stickers, hashtags, and @mentions—with per-image results, type, position, language, and confidence. Each carousel slide processed separately. No login. Built for OCR, brand monitoring, and content intel.",
        "version": "1.0",
        "x-build-id": "yepp1pR9gYo1TqJX2"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/rainminer~instagram-post-text-extractor/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-rainminer-instagram-post-text-extractor",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/rainminer~instagram-post-text-extractor/runs": {
            "post": {
                "operationId": "runs-sync-rainminer-instagram-post-text-extractor",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/rainminer~instagram-post-text-extractor/run-sync": {
            "post": {
                "operationId": "run-sync-rainminer-instagram-post-text-extractor",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "required": [
                    "urls"
                ],
                "properties": {
                    "urls": {
                        "title": "Instagram post URLs",
                        "type": "array",
                        "description": "Public Instagram post URLs to process. Accepts single-image posts and multi-image carousels (instagram.com/p/...).",
                        "items": {
                            "type": "string"
                        }
                    },
                    "maxItems": {
                        "title": "Max posts",
                        "minimum": 1,
                        "maximum": 100,
                        "type": "integer",
                        "description": "Maximum number of posts to process in a single run.",
                        "default": 10
                    },
                    "proxyConfiguration": {
                        "title": "Proxy configuration",
                        "type": "object",
                        "description": "Apify Proxy is used to fetch Instagram post images. Failed downloads are retried with a different proxy automatically."
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
