# Instagram E-commerce Brands with Shopify Stores Leads Scraper (`leafy-dev-jr/instagram-shopify-leads-scraper`) Actor

Find Instagram ecommerce brands in any niche, verify which ones use Shopify, and export qualified outreach leads in minutes.

- **URL**: https://apify.com/leafy-dev-jr/instagram-shopify-leads-scraper.md
- **Developed by:** [Leafy](https://apify.com/leafy-dev-jr) (community)
- **Categories:** Lead generation, Automation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 1 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.00 / 1,000 results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

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/docs.md):

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

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python/docs.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/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

## Instagram Shopify Leads Scraper

**Type a niche like "skincare" and get a ready-to-pitch lead list: online brands with a verified Shopify store, matched Instagram profile, public email and phone, engagement stats, and a 0–100 lead score explaining exactly why each one made the cut.**

Add a whole list of niches in one run (`skincare`, `clean beauty`, `haircare`, ...). Each is searched separately, then merged and de-duplicated so every brand is scored only once.

Built for agencies, Shopify app developers, email marketers, and B2B sales teams.

> ## Actively maintained: recent improvements
>
> - **Lower run cost.** Residential proxy traffic (the expensive kind) is now used only where Instagram and search engines actually require it. Ordinary store pages, product feeds, and contact pages route through cheap datacenter IPs automatically, no setup needed.
> - **Spending cap notice.** If a run hits its "Maximum cost per run" limit, it now stops cleanly and says so in plain language, instead of silently returning fewer leads than expected.
> - **Cleaner lead list.** Platform badges like the "Powered by Shopify" footer link no longer get mistaken for a store's own Instagram account, and off-topic stores that just happen to mention your keyword once are filtered out before they reach your dataset.

---

### Why it beats a plain Instagram scraper

A plain Instagram scraper hands you profiles and leaves you to open every bio link by hand to see who actually runs a store. This one does the qualifying for you:

- **Verifies Shopify for real.** Not a URL guess: CDN assets, checkout tokens, storefront APIs, and more, cross-checked. Every row lists the exact signals and a confidence score.
- **Finds brands your keyword would miss.** Add a few seed usernames and discovery follows Instagram's own "similar accounts" suggestions, catching brands that never use your exact keyword in their bio.
- **Scores and explains every lead.** A 0–100 score with plain-English reasons (`Confirmed Shopify store`, `Public business email available`, ...), so you know why to pitch, not just who.

---

### What you get

One row per business, streamed into the dataset while the run is going:

- **Store**: website URL, platform (`Shopify`, `WooCommerce`, ...), Shopify confidence with the exact detection signals, product count, currency, and installed apps (Klaviyo, Judge.me, Gorgias, and 15+ more)
- **Contacts**: public email (with an `emailVerified` deliverability check), phone, contact page
- **Instagram**: profile, follower count, latest post date, engagement rate, recent hashtags
- **Lead score**: transparent 0–100 score with plain-language reasons, tiered High / Medium / Low

By default every lead is a **verified Shopify store with a matched Instagram account**. Prefer volume over strictness? One dropdown loosens it, all the way to keeping every business found. Each row reports both sides either way, so you can slice the list any way you need.

---

### How to use

1. Enter **search terms** (e.g. `skincare`, `handmade jewelry`), optionally with locations. Also add 2–3 **Instagram usernames** of brands you like, highly recommended, the Actor uses them to find similar brands. Hashtags or profile URLs work too.
2. Pick **how many leads to collect** and **which businesses to keep** (default: Shopify stores that have Instagram).
3. Run. Export from the dataset when done, or while it runs.

---

### How it works

1. Searches two ways at once: finds Shopify storefronts on the open web first (footprints like "powered by Shopify"), and finds Instagram profiles from your search terms, hashtags, or seed usernames.
2. Every storefront candidate is verified as Shopify using multiple independent signals, never a URL pattern alone.
3. Each store's real Instagram account is located from its site (platform badge links like the Shopify footer are ignored), and each Instagram profile's bio link is resolved back to its store, including Linktree, Beacons, and other link-in-bio pages.
4. Recent posts are analyzed for activity and engagement; the site is checked for public contact info.
5. Every business is scored 0–100 with plain-language reasons and streamed into the dataset the moment it's ready.

---

### Input

Only one discovery source is required: search terms, hashtags, usernames, or profile URLs. Everything else has working defaults.

```json
{
    "searchTerms": ["skincare", "organic skincare"],
    "locations": ["United Kingdom"],
    "usernames": ["examplebrand"],
    "hashtags": ["skincarebrand"],
    "startUrls": [{ "url": "https://www.instagram.com/examplebrand/" }],
    "maxResults": 5,
    "leadType": "shopify-instagram",
    "onlyActiveProfiles": false,
    "requireEmail": false,
    "skipPreviousLeads": false,
    "resetLeadsHistory": false,
    "excludedUsernames": ["mycompetitor"],
    "excludedDomains": ["alreadyacustomer.com"],
    "proxyConfiguration": { "useApifyProxy": true, "apifyProxyGroups": ["RESIDENTIAL"] }
}
````

| Field | Type | Default | What it does |
|---|---|---|---|
| `searchTerms` | array | none | Niche keywords to discover businesses from. |
| `locations` | array | none | Countries or cities combined with each search term. |
| `usernames` / `startUrls` | array | none | Instagram accounts to process directly, and the best lever for lead quality: 2–3 seeds unlock similar-account discovery. |
| `hashtags` | array | none | Instagram hashtags, with or without `#`. |
| `maxResults` | integer | 10 | Stop after saving this many leads. |
| `leadType` | select | `shopify-instagram` | What a business must have to count as a lead. Stricter = fewer, better leads; looser = more rows to sift yourself. |
| `onlyActiveProfiles` | boolean | false | Require a post within the last 30 days. |
| `requireEmail` | boolean | false | Require a public email. |
| `skipPreviousLeads` | boolean | false | Only return leads never exported by a previous run. Great for weekly prospecting. |
| `resetLeadsHistory` | boolean | false | Forget all previously exported leads before this run. |
| `excludedUsernames` / `excludedDomains` | array | none | Accounts and domains to skip. |
| `includeIncompleteLeads` | boolean | false | Advanced. Also save rows missing a website, contacts, or full profile data. |
| `discoveryMode` | select | `auto` | Advanced. `auto`, `shopify-first`, `instagram-first`, or `both`. |
| `googleApiKey` + `googleCseId` | string | none | Advanced. Your own free Google Custom Search key for deeper, more stable discovery. |
| `instagramSessionCookies` | string | none | Advanced. Optional throwaway-account cookie for better Instagram coverage. |
| `proxyConfiguration` | object | residential | Keep the default. Residential is used only where Instagram and search engines need it; store pages use cheap datacenter IPs automatically. |

***

### Output

One dataset row per business. The dataset's default table view shows the 15 columns that matter most for triage (score, tier, Shopify, store URL, email, phone, followers, engagement, ...); every field below is still in the full record. Fields that could not be determined are `null`, never guessed:

```json
{
    "searchTerm": "skincare",
    "locationQuery": "United Kingdom",
    "discoveryMethod": "shopify-first",
    "instagramUrl": "https://www.instagram.com/examplebrand/",
    "username": "examplebrand",
    "fullName": "Example Brand",
    "biography": "Independent skincare products.",
    "category": "Health/beauty",
    "isBusinessAccount": true,
    "isProfessionalAccount": true,
    "isVerified": false,
    "followersCount": 18400,
    "followingCount": 420,
    "postsCount": 386,
    "profileImageUrl": "https://.../examplebrand-profile.jpg",
    "latestPostDate": "2026-07-15T10:30:00.000Z",
    "postsLast30Days": 9,
    "averageLikes": 510,
    "averageComments": 28,
    "averageEngagementRate": 2.92,
    "isActive": true,
    "contentTypes": ["image", "carousel"],
    "recentCaptions": ["New drop is here..."],
    "recentHashtags": ["#skincare", "#glowup"],
    "originalBioUrl": "https://linktr.ee/examplebrand",
    "bioLinkService": "Linktree",
    "resolvedStoreUrl": "https://examplebrand.com/",
    "websiteDomain": "examplebrand.com",
    "websitePlatform": "Shopify",
    "isShopify": true,
    "shopifyConfidence": 0.98,
    "shopifySignals": ["cdn.shopify.com asset detected", "Shopify JavaScript object detected (window.Shopify / Shopify.theme)"],
    "hasOnlineStore": true,
    "websiteReachable": true,
    "websiteUsesHttps": true,
    "productCount": 28,
    "detectedApps": ["Klaviyo", "Judge.me"],
    "storeCurrency": "GBP",
    "emailVerified": true,
    "publicEmail": "hello@examplebrand.com",
    "publicPhone": null,
    "contactPageUrl": "https://examplebrand.com/pages/contact",
    "websiteTitle": "Example Brand | Independent Skincare",
    "websiteDescription": "Clean, independent skincare made in small batches.",
    "websiteBusinessName": "Example Brand Ltd",
    "websiteSocialLinks": ["https://www.instagram.com/examplebrand/"],
    "locationHints": ["United Kingdom"],
    "scrapedAt": "2026-07-19T08:30:00.000Z",
    "error": null,
    "leadScore": 88,
    "leadTier": "High",
    "leadReasons": ["Confirmed Shopify store", "Public business email available", "Instagram profile posted within the last seven days"]
}
```

A machine-readable run summary is also stored in the key-value store under `RUN-SUMMARY`:

```json
{
    "profilesDiscovered": 150,
    "profilesProcessed": 132,
    "profilesSkipped": 4,
    "websitesInspected": 104,
    "shopifyStoresFound": 67,
    "leadsSaved": 100,
    "leadsWithEmail": 48,
    "highQualityLeads": 39,
    "duplicatesRemoved": 11,
    "failedRequests": 7,
    "storeCandidatesChecked": 210,
    "storeCandidatesRejected": 118,
    "storeCandidatesOffTopic": 25,
    "storesWithoutInstagram": 12,
    "incompleteLeadsSkipped": 6,
    "discoveryMode": "auto",
    "chargeLimitReached": false,
    "filteredOut": {
        "followers": 0, "notShopify": 21, "noInstagram": 12, "inactive": 0,
        "noEmail": 0, "belowMinScore": 0, "excluded": 0, "location": 0, "previouslyExported": 0
    }
}
```

***

### Lead score

| Category | Max | Awarded for |
|---|---|---|
| Commerce fit | 35 | Confirmed Shopify +30 (store on another platform +15), reachable site +5 |
| Contactability | 25 | Email +15, phone +5, contact page +5 |
| Instagram activity | 25 | Posted within 7 days +15 (30 days +8), engagement up to +10 |
| Business quality | 15 | Business account +5, complete bio and website +5, followers in range +5 |

Tiers: High 75–100, Medium 45–74, Low 0–44. Every row includes the reasons behind its score.

***

### FAQ

**Do I need to touch the proxy settings?**
No. Residential is the default and works out of the box. To keep cost down, only Instagram and search-engine requests actually use it; ordinary store pages route through cheap datacenter IPs automatically.

**Why did I get fewer leads than requested?**
Usually the strict default (Shopify and Instagram both required) genuinely ran out of matching businesses for that niche. Loosen "Which businesses to keep", add more search terms, or add seed usernames. The end-of-run log and the `RUN-SUMMARY` record always explain which case happened, and if a spending cap was hit first, the status message says so directly instead of leaving you guessing.

**What's the difference between the four "Which businesses to keep" options?**
"Shopify stores that have Instagram" (default) is the strictest: fewest but best leads, every row is a verified store you can also reach by DM. "Has Instagram" adds businesses on other platforms or with no store yet. "Verified Shopify store" adds stores with no Instagram link and runs the faster store-first discovery. "All businesses" keeps everything found. Every row reports both sides regardless, so you can filter the dataset yourself afterwards.

**Do I need the Google API key?**
No. Discovery works without it using multiple free search engines. Adding your own free Google Custom Search key (100 queries/day) gives a deeper, more stable extra source, useful for larger or more competitive niches. Setup steps are below.

**Do I need Instagram session cookies?**
No, never required. It's an optional way to improve hashtag discovery coverage and reduce login walls if the log shows a lot of blocked requests. Use a throwaway account, never your personal one.

**What happens if a run hits its spending cap?**
It stops cleanly. The status and the `RUN-SUMMARY` (`chargeLimitReached: true`) say so, instead of the run silently returning fewer leads than expected. Raise "Maximum cost per run" to collect more in one go.

**A repeat run returned nothing. Is it broken?**
No. "Only new leads" is on and everything found was already exported by a previous run, which is exactly what it's meant to do for weekly prospecting. Turn it off, or enable "Reset lead memory" to start over.

**Why aren't the results 100% literal matches to my keyword?**
That's by design. Discovery also expands to Instagram's own "similar accounts" suggestions and niche hashtags actually used by the brands it finds, surfacing businesses that never use your exact keyword in their bio. Add 2–3 seed usernames to steer this even further toward brands you already like.

**Is this allowed?**
Only publicly visible information is collected: no private profiles, stories, DMs, or follower lists. You are responsible for using the data in line with Instagram's terms and applicable anti-spam and privacy laws (GDPR, CCPA, CAN-SPAM) in your outreach.

***

### Get a free Google Custom Search key (optional, 2 minutes)

Adds a deeper, more stable discovery source on top of the built-in search engines. Free, 100 queries/day.

1. Go to **[console.cloud.google.com](https://console.cloud.google.com)** and create a project.
2. **APIs & Services > Library > "Custom Search API" > Enable.**
3. **Credentials > Create credentials > API key.** Copy it into `googleApiKey`.
4. Create a search engine that searches the entire web at **[programmablesearchengine.google.com](https://programmablesearchengine.google.com)**, then copy its Search engine ID into `googleCseId`.

***

### Use cases

- Shopify app developers building targeted outbound lists of stores that could use their app
- Agencies and freelancers pitching Instagram-native brands on design, ads, or email marketing
- Email marketers building segmented prospect lists with verified public emails
- B2B sales teams researching a niche before outreach
- Market research: gauge how many active Shopify brands exist in a niche and how they engage on Instagram

***

### Limitations

- Instagram limits public data: activity metrics come from the up to 12 recent posts it exposes, and some profiles return limited data when the API is blocked (noted in the row's `error` field); the Actor falls back to the HTML profile page in that case.
- Search engines occasionally block automated queries. The Actor already retries across four engines and multiple pages, but a very obscure niche can still return fewer candidates than a common one.
- Shopify is confirmed by real technical signals (CDN assets, checkout tokens, storefront APIs), never a URL pattern alone, but a store that deliberately hides all of them can be missed.
- `productCount` is capped at 30 per store to keep runs fast and affordable; a value of 30 means 30 or more products.
- Store-first leads without an Instagram link have empty Instagram columns; profiles without a website have empty store columns, never guessed.

***

### Feedback

Bug reports, feature requests, and use-case tips are welcome. Email the developer at <leafydevjr@gmail.com>.

# Actor input Schema

## `searchTerms` (type: `array`):

Niche keywords used to discover Instagram business profiles, e.g. <b>skincare</b>, <b>streetwear</b>, <b>handmade jewelry</b>. Discovery automatically expands beyond literal name matches: it also tries commerce variants of each term, profiles Instagram suggests as related, and hashtags the discovered brands actually use. For best results, also add a few seed usernames below.

## `locations` (type: `array`):

Countries or cities combined with your search terms, e.g. <b>United Kingdom</b>, <b>London</b>, <b>Philippines</b>. Leave empty for worldwide discovery.

## `hashtags` (type: `array`):

Instagram hashtags to discover profiles from, with or without the leading #, e.g. <b>skincarebrand</b>.

## `usernames` (type: `array`):

<b>Highly recommended for the best results.</b> Add 2-3 Instagram usernames of brands you already like in this niche (with or without the leading @) and the Actor uses them as seeds to find similar accounts via Instagram's own suggestions, on top of anything search terms find. This consistently surfaces better, less obvious matches than keywords alone, and works even without search terms.

## `startUrls` (type: `array`):

Direct links to Instagram profiles, e.g. <b>https://www.instagram.com/examplebrand/</b>.

## `maxResults` (type: `integer`):

The run stops as soon as this many leads have been saved to the dataset. Discovery keeps searching (more result pages, related profiles, hashtags) until this target is reached or sources are exhausted. Start small to preview results, then scale up.

## `leadType` (type: `string`):

What a business must have to become a lead. The default keeps only verified Shopify stores with a matched Instagram account. Looser options return more leads; every row always reports both sides (<code>isShopify</code>, <code>instagramUrl</code>), so you can also keep everything and filter the dataset afterwards.

## `onlyActiveProfiles` (type: `boolean`):

Only keep leads whose Instagram profile posted within the last 30 days.

## `requireEmail` (type: `boolean`):

Only keep leads that expose a public business email address.

## `skipPreviousLeads` (type: `boolean`):

Skip businesses already exported by any previous run of this Actor on your account. Perfect for weekly prospecting runs that should only return fresh leads.

## `resetLeadsHistory` (type: `boolean`):

Forget every previously exported business before this run starts. Use this to rebuild a full list from scratch after using "Only new leads".

## `excludedUsernames` (type: `array`):

Instagram usernames to skip (e.g. your own accounts or existing customers).

## `excludedDomains` (type: `array`):

Website domains to skip, e.g. <b>examplebrand.com</b>.

## `discoveryMode` (type: `string`):

How search terms discover leads. <b>Auto</b> runs both pipelines. Shopify-first finds storefronts on the web and verifies them before touching Instagram (sidesteps Instagram rate limits; strongly favors small independent brands); Instagram-first finds profiles and then checks their websites.

## `googleApiKey` (type: `string`):

Optional Google Custom Search API key for deeper, more stable discovery (100 free queries per day per key). Create one at <a href='https://developers.google.com/custom-search/v1/introduction' target='_blank'>developers.google.com</a>. Requires the search engine ID below.

## `googleCseId` (type: `string`):

The Programmable Search Engine ID (cx) paired with your API key. Create a search engine that searches the entire web at <a href='https://programmablesearchengine.google.com' target='_blank'>programmablesearchengine.google.com</a>.

## `instagramSessionCookies` (type: `string`):

Optional <code>Cookie</code> header value from a logged-in Instagram browser session (e.g. <code>sessionid=...; csrftoken=...</code>). NOT required. It only improves hashtag discovery coverage and reduces login walls. Use a throwaway account, never your personal one.

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

Instagram blocks its profile API for most datacenter IPs (HTTP 401), so <b>residential</b> proxies are the default and strongly recommended. Switching to datacenter proxies is cheaper but the Actor will fall back to limited HTML profile data.

## Actor input object example

```json
{
  "searchTerms": [
    "skincare"
  ],
  "usernames": [
    "glowrecipe",
    "cocokind"
  ],
  "maxResults": 5,
  "leadType": "shopify-instagram",
  "onlyActiveProfiles": false,
  "requireEmail": false,
  "skipPreviousLeads": false,
  "resetLeadsHistory": false,
  "discoveryMode": "auto",
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# Actor output Schema

## `leads` (type: `string`):

All collected leads: store URL and platform, Shopify verification, public contacts, Instagram profile and activity metrics, and the 0-100 lead score.

## `runSummary` (type: `string`):

Counts of profiles discovered and processed, websites inspected, Shopify stores found, leads with email, duplicates removed, and the filtered-out breakdown.

# 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 = {
    "searchTerms": [
        "skincare"
    ],
    "usernames": [
        "glowrecipe",
        "cocokind"
    ],
    "maxResults": 5,
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ]
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("leafy-dev-jr/instagram-shopify-leads-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 = {
    "searchTerms": ["skincare"],
    "usernames": [
        "glowrecipe",
        "cocokind",
    ],
    "maxResults": 5,
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
    },
}

# Run the Actor and wait for it to finish
run = client.actor("leafy-dev-jr/instagram-shopify-leads-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 '{
  "searchTerms": [
    "skincare"
  ],
  "usernames": [
    "glowrecipe",
    "cocokind"
  ],
  "maxResults": 5,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}' |
apify call leafy-dev-jr/instagram-shopify-leads-scraper --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Instagram E-commerce Brands with Shopify Stores Leads Scraper",
        "description": "Find Instagram ecommerce brands in any niche, verify which ones use Shopify, and export qualified outreach leads in minutes.",
        "version": "1.0",
        "x-build-id": "zlOWiDuqgOVDhJaCZ"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/leafy-dev-jr~instagram-shopify-leads-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-leafy-dev-jr-instagram-shopify-leads-scraper",
                "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/leafy-dev-jr~instagram-shopify-leads-scraper/runs": {
            "post": {
                "operationId": "runs-sync-leafy-dev-jr-instagram-shopify-leads-scraper",
                "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/leafy-dev-jr~instagram-shopify-leads-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-leafy-dev-jr-instagram-shopify-leads-scraper",
                "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",
                "properties": {
                    "searchTerms": {
                        "title": "Search terms (niche keywords)",
                        "type": "array",
                        "description": "Niche keywords used to discover Instagram business profiles, e.g. <b>skincare</b>, <b>streetwear</b>, <b>handmade jewelry</b>. Discovery automatically expands beyond literal name matches: it also tries commerce variants of each term, profiles Instagram suggests as related, and hashtags the discovered brands actually use. For best results, also add a few seed usernames below.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "locations": {
                        "title": "Locations (optional)",
                        "type": "array",
                        "description": "Countries or cities combined with your search terms, e.g. <b>United Kingdom</b>, <b>London</b>, <b>Philippines</b>. Leave empty for worldwide discovery.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "hashtags": {
                        "title": "Hashtags (optional)",
                        "type": "array",
                        "description": "Instagram hashtags to discover profiles from, with or without the leading #, e.g. <b>skincarebrand</b>.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "usernames": {
                        "title": "Instagram usernames (highly recommended)",
                        "type": "array",
                        "description": "<b>Highly recommended for the best results.</b> Add 2-3 Instagram usernames of brands you already like in this niche (with or without the leading @) and the Actor uses them as seeds to find similar accounts via Instagram's own suggestions, on top of anything search terms find. This consistently surfaces better, less obvious matches than keywords alone, and works even without search terms.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "startUrls": {
                        "title": "Instagram profile URLs (optional)",
                        "type": "array",
                        "description": "Direct links to Instagram profiles, e.g. <b>https://www.instagram.com/examplebrand/</b>.",
                        "items": {
                            "type": "object",
                            "required": [
                                "url"
                            ],
                            "properties": {
                                "url": {
                                    "type": "string",
                                    "title": "URL of a web page",
                                    "format": "uri"
                                }
                            }
                        }
                    },
                    "maxResults": {
                        "title": "Leads to collect",
                        "minimum": 1,
                        "maximum": 5000,
                        "type": "integer",
                        "description": "The run stops as soon as this many leads have been saved to the dataset. Discovery keeps searching (more result pages, related profiles, hashtags) until this target is reached or sources are exhausted. Start small to preview results, then scale up.",
                        "default": 5
                    },
                    "leadType": {
                        "title": "Which businesses to keep",
                        "enum": [
                            "shopify-instagram",
                            "instagram",
                            "shopify",
                            "all"
                        ],
                        "type": "string",
                        "description": "What a business must have to become a lead. The default keeps only verified Shopify stores with a matched Instagram account. Looser options return more leads; every row always reports both sides (<code>isShopify</code>, <code>instagramUrl</code>), so you can also keep everything and filter the dataset afterwards.",
                        "default": "shopify-instagram"
                    },
                    "onlyActiveProfiles": {
                        "title": "Only active profiles",
                        "type": "boolean",
                        "description": "Only keep leads whose Instagram profile posted within the last 30 days.",
                        "default": false
                    },
                    "requireEmail": {
                        "title": "Require public email",
                        "type": "boolean",
                        "description": "Only keep leads that expose a public business email address.",
                        "default": false
                    },
                    "skipPreviousLeads": {
                        "title": "Only new leads",
                        "type": "boolean",
                        "description": "Skip businesses already exported by any previous run of this Actor on your account. Perfect for weekly prospecting runs that should only return fresh leads.",
                        "default": false
                    },
                    "resetLeadsHistory": {
                        "title": "Reset lead memory",
                        "type": "boolean",
                        "description": "Forget every previously exported business before this run starts. Use this to rebuild a full list from scratch after using \"Only new leads\".",
                        "default": false
                    },
                    "excludedUsernames": {
                        "title": "Excluded usernames",
                        "type": "array",
                        "description": "Instagram usernames to skip (e.g. your own accounts or existing customers).",
                        "items": {
                            "type": "string"
                        }
                    },
                    "excludedDomains": {
                        "title": "Excluded website domains",
                        "type": "array",
                        "description": "Website domains to skip, e.g. <b>examplebrand.com</b>.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "discoveryMode": {
                        "title": "Discovery engine",
                        "enum": [
                            "auto",
                            "shopify-first",
                            "instagram-first",
                            "both"
                        ],
                        "type": "string",
                        "description": "How search terms discover leads. <b>Auto</b> runs both pipelines. Shopify-first finds storefronts on the web and verifies them before touching Instagram (sidesteps Instagram rate limits; strongly favors small independent brands); Instagram-first finds profiles and then checks their websites.",
                        "default": "auto"
                    },
                    "googleApiKey": {
                        "title": "Google API key (optional)",
                        "type": "string",
                        "description": "Optional Google Custom Search API key for deeper, more stable discovery (100 free queries per day per key). Create one at <a href='https://developers.google.com/custom-search/v1/introduction' target='_blank'>developers.google.com</a>. Requires the search engine ID below."
                    },
                    "googleCseId": {
                        "title": "Google search engine ID (optional)",
                        "type": "string",
                        "description": "The Programmable Search Engine ID (cx) paired with your API key. Create a search engine that searches the entire web at <a href='https://programmablesearchengine.google.com' target='_blank'>programmablesearchengine.google.com</a>."
                    },
                    "instagramSessionCookies": {
                        "title": "Instagram session cookies (optional)",
                        "type": "string",
                        "description": "Optional <code>Cookie</code> header value from a logged-in Instagram browser session (e.g. <code>sessionid=...; csrftoken=...</code>). NOT required. It only improves hashtag discovery coverage and reduces login walls. Use a throwaway account, never your personal one."
                    },
                    "proxyConfiguration": {
                        "title": "Proxy configuration",
                        "type": "object",
                        "description": "Instagram blocks its profile API for most datacenter IPs (HTTP 401), so <b>residential</b> proxies are the default and strongly recommended. Switching to datacenter proxies is cheaper but the Actor will fall back to limited HTML profile data.",
                        "default": {
                            "useApifyProxy": true,
                            "apifyProxyGroups": [
                                "RESIDENTIAL"
                            ]
                        }
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
