{
  "openapi": "3.0.1",
  "info": {
    "title": "Instagram B2B Email Scraper & Phone Leads",
    "description": "📸 Instagram B2B Email Scraper (instagram-b2b-email-scraper) extracts verified business emails & contact info from Instagram profiles, bios and linked sites. 🎯 Filter by hashtag, niche, location. 🚀 Ideal for B2B lead gen, outreach & sales. ⚙️ CSV/CRM export & email validation.",
    "version": "1.0",
    "x-build-id": "FgqDTTnBfhsbwfJOE"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/simpleapi~instagram-b2b-email-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-simpleapi-instagram-b2b-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/simpleapi~instagram-b2b-email-scraper/runs": {
      "post": {
        "operationId": "runs-sync-simpleapi-instagram-b2b-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/simpleapi~instagram-b2b-email-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-simpleapi-instagram-b2b-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": {
          "targetKeywords": {
            "title": "🔍 Target Keywords",
            "type": "array",
            "description": "🔎 Search terms for Instagram via Google (e.g. marketing, tattoo, real estate). ✨ Add one or many keywords. (base key `keywords` still accepted)",
            "items": {
              "type": "string"
            },
            "default": [
              "marketing"
            ]
          },
          "contactTypes": {
            "title": "📞 Contact Types To Collect",
            "enum": [
              "email",
              "phone",
              "both"
            ],
            "type": "string",
            "description": "📧 email = only leads that carry an email | 📱 phone = only leads that carry a VALIDATED phone number | 🤝 both = require BOTH on the same lead. 📱/🤝 also switch the default Google query set to phone-oriented patterns. (legacy base key `extractPhone: true` is honoured as `both` when this field is left unset)",
            "default": "email"
          },
          "country": {
            "title": "🌎 Target Country / Dial Code",
            "type": "string",
            "description": "🌍 Country name, ISO code and/or dial code (e.g. 'United Kingdom (+44)', 'United States', 'GB', or just '+91'). 🎯 Phone matches are normalized AND validated against that country's real numbering plan — for +1 the area code decides between 🇺🇸 US and 🇨🇦 Canada. Leave empty for no country targeting.",
            "default": ""
          },
          "collectionMode": {
            "title": "🎯 Extraction Mode",
            "enum": [
              "b2b",
              "personal"
            ],
            "type": "string",
            "description": "🏢 b2b = corporate email search patterns (personal webmail domains excluded) | 👤 personal = Gmail/Outlook-style discovery restricted to 📬 Custom Email Domains. Controls how the Google queries are built. (base key `mode` still accepted)",
            "default": "b2b"
          },
          "personalDomainAllowlist": {
            "title": "📬 Custom Email Domains",
            "type": "array",
            "description": "👤 Personal mode only: narrows BOTH the Google query and the result filter to these domains (e.g. @gmail.com, @outlook.com). ⏭️ Ignored in B2B mode. (base key `customDomains` still accepted)",
            "items": {
              "type": "string"
            },
            "default": [
              "@gmail.com",
              "@outlook.com"
            ]
          },
          "b2bSearchPatterns": {
            "title": "🔎 Search Pattern Keys",
            "type": "array",
            "description": "🧩 Leave EMPTY (recommended) to auto-pick the right set: email patterns for 📧/🤝, phone patterns for 📱. Or name specific keys — 📧 email keys: email_for_bookings, bio_email_basic, job_applications, email_direct_mention, cta_get_in_touch, careers_hiring, hours_contact, hr_recruitment, customer_service, team_department, email_mention_variations, bio_for_collab, interested_in, multiple_locations, professional_services, booking_inquiries, cta_more_info, email_for_rates, email_us_at_variations, membership_join, contact_at_domain, business_account, business_development, contact_info_section, franchise_contact, sponsor_me, bio_email_emoji_extended, dm_or_email, WhatsApp_business. 📱 phone keys: phone_whatsapp, phone_call_or_text, phone_call_us, phone_number_label, phone_bookings, phone_emoji, phone_enquiries. (base key `patterns` still accepted)",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "contactSourcePlatform": {
            "title": "🌐 Platform",
            "enum": [
              "Instagram.com"
            ],
            "type": "string",
            "description": "📱 Target social platform for lead discovery. (base key `platform` still accepted)",
            "default": "Instagram.com"
          },
          "searchLocation": {
            "title": "📍 Location",
            "type": "string",
            "description": "🗺️ Geographic phrase added to every search query (e.g. London, New York). 🌍 Leave empty for global results. (base key `location` still accepted)",
            "default": ""
          },
          "maxContactLeads": {
            "title": "📊 Maximum Total Leads",
            "minimum": 1,
            "maximum": 50000,
            "type": "integer",
            "description": "🎯 Hard cap on leads collected across all keywords and patterns. (base key `maxEmails` still accepted)",
            "default": 10
          },
          "maxLeadsPerPattern": {
            "title": "🧩 Max Leads Per Search Pattern",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "📈 Cap leads collected per search pattern before moving to the next one (🏢 B2B mode only). Keeps one productive pattern from consuming the whole budget. (base key `maxEmailsPerPattern` still accepted)",
            "default": 15
          },
          "maxRuntimeMinutes": {
            "title": "⏱️ Max Runtime (minutes)",
            "minimum": 1,
            "maximum": 720,
            "type": "integer",
            "description": "🛑 Wall-clock budget for the whole run. When it expires the actor stops paging and finishes with whatever it has, instead of grinding on a doomed query until the platform timeout.",
            "default": 20
          },
          "smartProxyRotation": {
            "title": "🛡️ Smart Proxy Rotation",
            "type": "boolean",
            "description": "✅ ON = Apify proxy with automatic tier escalation (GOOGLE_SERP → RESIDENTIAL) and per-request session rotation. ❌ OFF = direct connection only; this OVERRIDES ⚙️ Advanced Proxy Settings. ⭐ Google blocks Apify datacenter IPs, so leave this ON. (base key `useProxy` still accepted)",
            "default": true
          },
          "proxyOverride": {
            "title": "⚙️ Advanced Proxy Settings",
            "type": "object",
            "description": "🔧 Optional proxy override, used only when 🛡️ Smart Proxy Rotation is ON. 🎯 Leave as GOOGLE_SERP for best results — it is the only Apify group tuned for Google Search. (base key `proxyConfiguration` still accepted)",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "GOOGLE_SERP"
              ]
            }
          },
          "enrichProfile": {
            "title": "🧬 Enrich With Real Profile Data",
            "type": "boolean",
            "description": "✅ Fetch each lead's LIVE Instagram profile (followers, following, verified, private, full name, bio, external URL) from Instagram's server-rendered page — no login needed. 🔎 Also mines the real bio text, post caption and bio link (including WhatsApp deep links, where the link IS the number) for contacts Google's truncated snippet cut off — this is what makes 🤝 Both practical. ⏳ Adds 1–2 requests per lead.",
            "default": false
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}