Skip to main content

Instagram Tool

Scrape Instagram profiles and posts with a simple, unified interface. Works with individual user profiles and hashtags.

Quick Start

import { InstagramTool } from '@bubblelab/bubble-core';
import { CredentialType } from '@bubblelab/shared-schemas';
const result = await new InstagramTool({
operation: 'scrapeProfile',
credentials: {
[CredentialType.APIFY_CRED]: process.env.APIFY_CRED as string,
},
}).action();

Operation Details

execute

operation 'scrapeProfile' | 'scrapeHashtag' required
Operation to perform: scrapeProfile for user profiles, scrapeHashtag for hashtag posts
profiles string[]
Instagram usernames or profile URLs to scrape (for scrapeProfile operation). Examples: ["@username", "https://www.instagram.com/username/"]
hashtags string[]
Hashtags to scrape (for scrapeHashtag operation). Examples: ["ai", "tech"] or ["https://www.instagram.com/explore/tags/ai"]
limit number
Maximum number of posts to fetch (default: 20 for profiles, 50 for hashtags)
credentials Record<CredentialType,string>
Required credentials (auto-injected)