{
  "openapi": "3.0.1",
  "info": {
    "title": "AI Company Lead Enrichment & Sales Intelligence",
    "description": "Find company websites, social profiles, contact pages, emails, recent news, lead scores, sales angles, and outreach templates from company names or domains.",
    "version": "0.0",
    "x-build-id": "egAJRzsAAftomx1Jd"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/fabri-lab~leads-data-scraper-ai/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-fabri-lab-leads-data-scraper-ai",
        "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/fabri-lab~leads-data-scraper-ai/runs": {
      "post": {
        "operationId": "runs-sync-fabri-lab-leads-data-scraper-ai",
        "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/fabri-lab~leads-data-scraper-ai/run-sync": {
      "post": {
        "operationId": "run-sync-fabri-lab-leads-data-scraper-ai",
        "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": {
          "companies": {
            "title": "Companies",
            "minItems": 0,
            "maxItems": 5000,
            "type": "array",
            "description": "Company names, websites, and optional countries to enrich. Website is optional.",
            "items": {
              "type": "object",
              "properties": {
                "companyName": {
                  "title": "Company name",
                  "description": "Company name to research. Example: Ahrefs",
                  "type": "string",
                  "editor": "textfield"
                },
                "website": {
                  "title": "Website",
                  "description": "Optional company website or domain. Example: https://ahrefs.com",
                  "type": "string",
                  "editor": "textfield"
                },
                "country": {
                  "title": "Country",
                  "description": "Optional country or market context. Example: United States",
                  "type": "string",
                  "editor": "textfield"
                }
              }
            }
          },
          "csvUrl": {
            "title": "CSV URL",
            "type": "string",
            "description": "Optional public CSV URL with companyName, website, and country columns."
          },
          "maxCompanies": {
            "title": "Max companies",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Maximum number of unique companies to process in this run.",
            "default": 100
          },
          "findSocialProfiles": {
            "title": "Find social profiles",
            "type": "boolean",
            "description": "Search for public LinkedIn, Instagram, Facebook, X, YouTube, and TikTok company profiles.",
            "default": true
          },
          "findContactPages": {
            "title": "Find contact pages",
            "type": "boolean",
            "description": "Find public contact, about, demo, and sales pages from the company website.",
            "default": true
          },
          "findEmails": {
            "title": "Find emails",
            "type": "boolean",
            "description": "Extract public business emails from crawled website pages.",
            "default": true
          },
          "findRecentNews": {
            "title": "Find recent news",
            "type": "boolean",
            "description": "Search for recent company news and public announcements.",
            "default": true
          },
          "generateOutreach": {
            "title": "Generate outreach",
            "type": "boolean",
            "description": "Generate cold email and LinkedIn message templates. Add your offer details below to avoid generic placeholders.",
            "default": true
          },
          "senderName": {
            "title": "Sender name",
            "type": "string",
            "description": "Optional sender name used in the email signature. If empty, {{senderName}} is kept as a placeholder."
          },
          "senderCompany": {
            "title": "Your company",
            "type": "string",
            "description": "Optional company or agency name used in outreach copy."
          },
          "offerDescription": {
            "title": "What do you sell or offer?",
            "type": "string",
            "description": "Describe your actual offer. Example: build SEO-focused websites for local clinics, automate B2B lead research, or improve e-commerce catalog data."
          },
          "targetPainPoint": {
            "title": "Problem you solve",
            "type": "string",
            "description": "Optional. The customer problem your offer solves. If empty, the Actor uses detected company signals."
          },
          "callToAction": {
            "title": "Call to action",
            "type": "string",
            "description": "Optional custom CTA. Example: Would it make sense to send a quick example?"
          },
          "language": {
            "title": "Language",
            "enum": [
              "en",
              "tr"
            ],
            "type": "string",
            "description": "Language used for rule-based outreach templates. Select Turkish if your offer is written in Turkish.",
            "default": "en"
          },
          "maxPagesPerCompany": {
            "title": "Max website pages per company",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Maximum website pages to crawl per company. Hard-capped at 10.",
            "default": 5
          },
          "maxNewsPerCompany": {
            "title": "Max news per company",
            "minimum": 0,
            "maximum": 10,
            "type": "integer",
            "description": "Maximum recent news results per company. Hard-capped at 10.",
            "default": 3
          },
          "maxSerpQueriesPerCompany": {
            "title": "Max SERP queries per company",
            "minimum": 0,
            "maximum": 5,
            "type": "integer",
            "description": "Maximum search queries per company. Hard-capped at 5.",
            "default": 2
          },
          "maxRunTimeMinutes": {
            "title": "Max run time minutes",
            "minimum": 1,
            "maximum": 720,
            "type": "integer",
            "description": "Soft safety limit inside the Actor. Apify Run options timeout must also allow long runs.",
            "default": 720
          },
          "maxConcurrency": {
            "title": "Max concurrency",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Maximum number of companies enriched in parallel. Higher values are faster but can use more platform resources. Hard-capped at 10.",
            "default": 5
          },
          "costSafetyMode": {
            "title": "Cost safety mode",
            "type": "boolean",
            "description": "Keep strict crawl, search, and AI limits enabled.",
            "default": true
          },
          "skipIfNoWebsiteOrSocialFound": {
            "title": "Skip if no source found",
            "type": "boolean",
            "description": "Return an uncharged skipped item when no website, social profile, contact page, or news source is found.",
            "default": true
          },
          "generateAiOutreach": {
            "title": "Generate AI outreach",
            "type": "boolean",
            "description": "Use your own OpenRouter API key to rewrite outreach messages. Rule-based templates are used when disabled.",
            "default": false
          },
          "openRouterApiKey": {
            "title": "OpenRouter API key",
            "type": "string",
            "description": "Optional. Provide your own OpenRouter API key for AI-written outreach. Leave empty for rule-based outreach."
          },
          "openRouterModel": {
            "title": "OpenRouter model",
            "enum": [
              "openai/gpt-4o-mini",
              "openai/gpt-4.1-mini",
              "anthropic/claude-3.5-haiku",
              "google/gemini-2.0-flash-001",
              "meta-llama/llama-3.3-70b-instruct",
              "mistralai/mistral-small-3.1-24b-instruct"
            ],
            "type": "string",
            "description": "OpenRouter model ID used when Generate AI outreach is enabled.",
            "default": "openai/gpt-4o-mini"
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Apify proxy configuration. Used for SERP providers and blocked websites when available.",
            "default": {
              "useApifyProxy": true
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}