{
  "openapi": "3.0.1",
  "info": {
    "title": "Instagram Email & Contact Scraper — Emails, Phones & WhatsApp",
    "description": "🔥 Up to 20% OFF! Scrape Instagram contact leads — email, phone, WhatsApp link, bio link, follower velocity & per-post engagement. MX-verified, residential proxy built in. Perfect for lead generation & influencer outreach. ⚡",
    "version": "0.0",
    "x-build-id": "g8NhLvokTHRs7Quge"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/bgfc97~instagram-email-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-bgfc97-instagram-email-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/bgfc97~instagram-email-scraper/runs": {
      "post": {
        "operationId": "runs-sync-bgfc97-instagram-email-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/bgfc97~instagram-email-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-bgfc97-instagram-email-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": {
          "usernames": {
            "title": "Instagram usernames or profile URLs",
            "type": "array",
            "description": "Instagram @handles or profile URLs to scrape (e.g. `natgeo`, `@nike`, `https://www.instagram.com/gopro/`). `@` and URLs are normalized automatically; `/p/`, `/reel/`, `/explore/` etc. are ignored. Optional if you provide `hashtags` or `searchTerms` instead.",
            "items": {
              "type": "string"
            }
          },
          "hashtags": {
            "title": "Discover by hashtag",
            "type": "array",
            "description": "DISCOVERY mode. Give one or more hashtags (e.g. `coffeeshop`, `#realestateagent`) and the Actor resolves the profiles posting under them into your target list — scale a lead list without knowing the handles up front. Discovery needs the residential proxy.",
            "items": {
              "type": "string"
            }
          },
          "searchTerms": {
            "title": "Discover by search term",
            "type": "array",
            "description": "DISCOVERY mode. Keywords, niches or place names (e.g. `coffee roaster austin`) run through Instagram search; the matching accounts are added to your target list. Discovery needs the residential proxy.",
            "items": {
              "type": "string"
            }
          },
          "expandLinkInBio": {
            "title": "Expand the link-in-bio",
            "type": "boolean",
            "description": "ON by default. When a profile's external link points to a Linktree / Beacons / Bio.site / Carrd / Stan.store / personal site, the Actor also fetches that page (through the proxy) and mines the emails, phone numbers and social profiles found there — usually the richest source of a real contact. Turn off to read only the Instagram profile itself.",
            "default": true
          },
          "maxLinksPerProfile": {
            "title": "Max links to expand per profile",
            "minimum": 0,
            "maximum": 5,
            "type": "integer",
            "description": "How many of a profile's external/bio links to follow when expansion is on (0–5). More links = more contacts but more proxy bandwidth.",
            "default": 2
          },
          "validateEmails": {
            "title": "Validate email domains (DNS MX)",
            "type": "boolean",
            "description": "OFF by default. When on, each email's domain is checked for a valid mail (MX) record via DNS and the passing addresses are returned in `emails_valid` with `has_valid_email`. Free, no third-party service — it confirms the domain can receive mail, not that the exact mailbox exists. It also upgrades the per-email confidence tiers (`email_quality`) from structural to MX-verified.",
            "default": false
          },
          "includeRecentPosts": {
            "title": "Include recent-posts lead context",
            "type": "boolean",
            "description": "ON by default and FREE (parsed from the same profile response — no extra request). Adds `recent_posts` (captions, likes, comments, dates), `post_hashtags`/`post_mentions`, and a `post_stats` block with **engagement rate**, average likes/comments, last-post date and **activity** (active / dormant / inactive) — so you can qualify a lead by how engaged and alive the account is. Best-effort: Instagram returns recent media for many but not all logged-out profiles.",
            "default": true
          },
          "maxRecentPosts": {
            "title": "Max recent posts to sample",
            "minimum": 0,
            "maximum": 48,
            "type": "integer",
            "description": "How many recent posts to read for the engagement/activity stats and caption hashtags (0–48).",
            "default": 12
          },
          "deepContactPages": {
            "title": "Deep-mine the website contact page",
            "type": "boolean",
            "description": "OFF by default. When a profile links to a real website (not an aggregator), also follow ONE same-site `/contact`, `/about`, `/contato`, `impressum` (etc.) page and mine the email/phone that businesses usually hide there instead of the homepage. Costs one extra fetch per website.",
            "default": false
          },
          "expandRelated": {
            "title": "Expand to related / suggested accounts",
            "type": "boolean",
            "description": "OFF by default. After scraping your seeds, also scrape the **related/suggested accounts** Instagram returns for them (one hop), deduped and capped by `maxItems`. Turn a handful of seed profiles into a whole niche lead list. Each added profile counts toward `maxItems` and is charged like any other.",
            "default": false
          },
          "maxRelatedPerProfile": {
            "title": "Max related accounts per profile",
            "minimum": 0,
            "maximum": 20,
            "type": "integer",
            "description": "When related expansion is on, how many suggested accounts to take from each seed profile (0–20).",
            "default": 5
          },
          "dedupeAcrossRuns": {
            "title": "De-duplicate across runs (never scrape a lead twice)",
            "type": "boolean",
            "description": "OFF by default. When on, profiles already delivered in previous runs are remembered in a named Key-Value store and **skipped on the next run** — not fetched and not charged. Ideal for a recurring harvest of the same hashtag/location where you only want NEW leads. Runs also resume cleanly after a platform migration without re-charging finished profiles.",
            "default": false
          },
          "dedupeStoreName": {
            "title": "Cross-run dedupe store name",
            "type": "string",
            "description": "Name of the named Key-Value store that holds the 'already delivered' set (used only when `dedupeAcrossRuns` is on). Use the same name across runs of the same campaign to share the memory; use different names to keep campaigns separate.",
            "default": "instagram-email-scraper-seen"
          },
          "trackChanges": {
            "title": "Track changes across runs (turn the scraper into a monitor)",
            "type": "boolean",
            "description": "OFF by default. When on, each delivered profile's compact snapshot is kept in a named Key-Value store (survives between runs), so the NEXT run with the same `monitorKey` adds a `change_since` block to every profile — **follower growth + velocity** (followers/day over the real elapsed time = who's rising), a **new creator** that appeared in a watched hashtag/search, a **new contact channel** (email/WhatsApp/phone/bio link = new outreach), **@username / name** changes (keyed on the stable user id), **professionalization** (personal → business/creator), **verification** gained/lost, going **private**, engagement-rate & lead-score deltas, new posts and influencer-tier milestones — plus one free `monitor_summary` row (new contacts, fastest-growing, trending hashtags). Off = unchanged output, zero monitor columns. Uses its own store namespace, separate from the de-dupe store.",
            "default": false
          },
          "monitorKey": {
            "title": "Monitor key (watchlist name)",
            "type": "string",
            "description": "Used when `trackChanges` OR `trackPostEngagement` is on. Names the monitor's memory so the SAME watchlist diffs across runs: reuse the same key each run of a campaign to accumulate history; use different keys to keep watchlists separate. Leave empty to auto-derive a stable key from the usernames/hashtags/search terms you pass. The account monitor and the per-post content monitor keep separate stores under this one key.",
            "default": ""
          },
          "trackPostEngagement": {
            "title": "Track per-POST engagement across runs (post curve + velocity)",
            "type": "boolean",
            "description": "OFF by default and FREE (reuses the recent posts already parsed from the SAME profile response — no extra request). Separate from `trackChanges`: where that monitors the ACCOUNT (follower growth, how MANY posts appeared), this monitors the CONTENT — run to run it keeps a bounded index of each profile's recent posts in its own named Key-Value store and adds a `content_monitor` block saying **which posts are NEW** (with real shortcode/URL/caption) and **each existing post's like/comment CURVE + VELOCITY** (likes/hour over the real elapsed time) — so you can tell a post that's **bombing** from one that's **dead**, spot the `fastest_rising_post` vs the current `top_post`, and catch a breakout early. Plus one free `content_monitor_summary` row (viral posts by velocity, new posts, accounts gaining likes). Honest & best-effort: Instagram serves the recent-media block for many but not all logged-out profiles (and never for private ones); when it withholds it the block is `posts_available:false` and the prior index is preserved — nothing is invented. Uses the same `monitorKey` as `trackChanges` but its own store namespace. Off = unchanged output, zero content column.",
            "default": false
          },
          "postTrackCap": {
            "title": "Max posts to index per profile (content monitor)",
            "minimum": 1,
            "maximum": 48,
            "type": "integer",
            "description": "Only used when `trackPostEngagement` is on. How many recent posts to keep in the per-profile content index (1–48). Instagram's profile response returns roughly the 12 newest posts, so the index holds about two windows' worth as new posts push old ones out; posts that fall out of the recent window stop being tracked (bounded by design).",
            "default": 24
          },
          "defaultCountry": {
            "title": "Default country for phone normalization (ISO-2)",
            "type": "string",
            "description": "Optional ISO-2 country code (e.g. `BR`, `US`, `GB`) used ONLY to complete bare national phone numbers into E.164 when a profile exposes no country code of its own — useful for a single-country niche. Leave empty to never guess a country (international `+…` numbers and IG's structured dial code are always normalized regardless). Produces `phones_e164`, a `primary_phone` and a click-to-chat `wa_link`.",
            "default": ""
          },
          "onlyWithContact": {
            "title": "Only keep profiles with a contact",
            "type": "boolean",
            "description": "Save (and charge for) only profiles that yielded at least one email, phone or address. Keeps your lead list tight.",
            "default": false
          },
          "onlyWithEmail": {
            "title": "Only keep profiles with an email",
            "type": "boolean",
            "description": "Save (and charge for) only profiles that yielded at least one email.",
            "default": false
          },
          "minFollowers": {
            "title": "Minimum followers",
            "minimum": 0,
            "type": "integer",
            "description": "Drop profiles below this follower count (0 = no minimum).",
            "default": 0
          },
          "maxFollowers": {
            "title": "Maximum followers",
            "minimum": 0,
            "type": "integer",
            "description": "Drop profiles above this follower count (0 = no maximum).",
            "default": 0
          },
          "requireVerified": {
            "title": "Only verified accounts",
            "type": "boolean",
            "description": "Keep only blue-tick verified accounts.",
            "default": false
          },
          "requireBusiness": {
            "title": "Only business / professional accounts",
            "type": "boolean",
            "description": "Keep only business or professional/creator accounts (the ones that expose structured contact fields).",
            "default": false
          },
          "minLeadScore": {
            "title": "Minimum lead score (0–100)",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "Keep only profiles whose transparent lead score (quality of email + phone + WhatsApp + business/verified signals + engagement/activity) meets this threshold. 0 = keep all. Try ~40 for a tight, high-intent list.",
            "default": 0
          },
          "concurrency": {
            "title": "Concurrency",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "How many profiles to process in parallel (1–20). Higher is faster; lower is gentler on the proxy / rate limits.",
            "default": 5
          },
          "maxItems": {
            "title": "Max profiles",
            "minimum": 1,
            "type": "integer",
            "description": "Cap on the total number of profiles processed (direct + discovered).",
            "default": 1000
          },
          "timeoutSecs": {
            "title": "Request timeout (seconds)",
            "minimum": 10,
            "maximum": 120,
            "type": "integer",
            "description": "Timeout per HTTP request (10–120).",
            "default": 30
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Instagram blocks datacenter IPs (it serves an HTML anti-bot page), so requests go through a proxy. Defaults to Apify Proxy on the RESIDENTIAL group — paid by whoever runs the Actor. You can switch groups or supply your own proxy URLs. Keep it on residential for reliable results.",
            "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}