{
  "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": "qwC3SMaSTj86VvaP3"
  },
  "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, fitness, real estate). ✨ Add one or many keywords. (base key `keywords` still accepted)",
            "items": {
              "type": "string"
            }
          },
          "contactTypes": {
            "title": "📞 Contact Types To Collect",
            "enum": [
              "email",
              "phone",
              "both"
            ],
            "type": "string",
            "description": "📱 phone = phone numbers only | 📧 email = emails only (default, matches base actor) | 🤝 both = require BOTH a phone number AND an email on the same lead. (legacy base key `extractPhone: true` is honoured as `both` when this field is left unset)"
          },
          "country": {
            "title": "🌎 Target Country / Dial Code",
            "type": "string",
            "description": "🌍 Country name and/or dial code to target phone numbers by (e.g. 'United Kingdom (+44)', 'United States', or just '+91'). 🎯 When a dial code resolves, phone matches are normalized AND filtered to that dial code. Leave empty for no country targeting."
          },
          "collectionMode": {
            "title": "🎯 Extraction Mode",
            "enum": [
              "b2b",
              "personal"
            ],
            "type": "string",
            "description": "👤 personal = Gmail/Outlook discovery | 🏢 b2b = corporate email search patterns. Controls how search queries are built. (base key `mode` still accepted)"
          },
          "personalDomainAllowlist": {
            "title": "📬 Custom Email Domains",
            "type": "array",
            "description": "👤 Personal mode: filter results to these domains (e.g. @gmail.com, @outlook.com). ⏭️ Ignored in B2B mode. (base key `customDomains` still accepted)",
            "items": {
              "type": "string"
            }
          },
          "b2bSearchPatterns": {
            "title": "🔎 B2B Search Patterns",
            "type": "array",
            "description": "🏢 B2B only: 📂 empty list runs all patterns; or name specific keys from b2b_patterns.py (e.g. email_for_bookings, bio_email_basic). (base key `patterns` still accepted)",
            "items": {
              "type": "string"
            }
          },
          "contactSourcePlatform": {
            "title": "🌐 Platform",
            "enum": [
              "Instagram.com"
            ],
            "type": "string",
            "description": "📱 Target social platform for lead discovery. (base key `platform` still accepted)"
          },
          "searchLocation": {
            "title": "📍 Location",
            "type": "string",
            "description": "🗺️ Geographic filter added to search queries (e.g. London, New York). 🌍 Leave empty for global results. (base key `location` still accepted)"
          },
          "maxContactLeads": {
            "title": "📊 Maximum Total Leads",
            "minimum": 1,
            "maximum": 50000,
            "type": "integer",
            "description": "🎯 Maximum number of leads to collect across all keywords and patterns. (base key `maxEmails` still accepted)"
          },
          "maxLeadsPerPattern": {
            "title": "🧩 Max Leads Per B2B Pattern",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "📈 Cap leads collected per B2B search pattern (🏢 B2B mode only). (base key `maxEmailsPerPattern` still accepted)"
          },
          "smartProxyRotation": {
            "title": "🛡️ Smart Proxy Rotation",
            "type": "boolean",
            "description": "✅ Enable Apify proxy with automatic tier escalation for Google Search requests. ⭐ Recommended: on for best results. Unchecked = direct connection only. (base key `useProxy` still accepted)"
          },
          "enrichProfile": {
            "title": "🧬 Enrich With Real Profile Data",
            "type": "boolean",
            "description": "✅ Fetch each discovered lead's live Instagram profile (followers count, business account flag, business category, verified status, bio, external URL) via the public web_profile_info endpoint, plus a list of related/lookalike profiles. Off by default (adds one extra request per lead). (base key `enrichProfile`)"
          },
          "maxRelatedProfiles": {
            "title": "🔗 Max Related Profiles Per Lead",
            "minimum": 0,
            "maximum": 50,
            "type": "integer",
            "description": "🕸️ Maximum number of lookalike/related profiles to capture per enriched lead. Only applies when 🧬 Enrich With Real Profile Data is ON. (base key `maxRelatedProfiles`)"
          },
          "proxyOverride": {
            "title": "⚙️ Advanced Proxy Settings",
            "type": "object",
            "description": "🔧 Optional proxy override when 🛡️ Smart Proxy Rotation is enabled. 🎯 Leave as default for best performance. (base key `proxyConfiguration` still accepted)"
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}