{
  "openapi": "3.0.1",
  "info": {
    "title": "🏢 Company Data Aggregator — LEI, SEC Funding & Tech",
    "description": "Aggregate company intelligence from official sources: legal identity (GLEIF LEI), real funding signals (SEC Form D), and a domain/tech profile (WHOIS, DNS, GitHub, tech stack). No paid APIs, no keys.",
    "version": "0.0",
    "x-build-id": "rh14f2GWZcmgWqRrJ"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/nexgendata~company-data-aggregator/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-nexgendata-company-data-aggregator",
        "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/nexgendata~company-data-aggregator/runs": {
      "post": {
        "operationId": "runs-sync-nexgendata-company-data-aggregator",
        "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/nexgendata~company-data-aggregator/run-sync": {
      "post": {
        "operationId": "run-sync-nexgendata-company-data-aggregator",
        "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",
        "required": [
          "competitorCapterraSlugs"
        ],
        "properties": {
          "competitorCapterraSlugs": {
            "title": "Competitor Capterra Slugs",
            "type": "array",
            "description": "Capterra product slugs (the path segment after /p/) for the competitors you want to mine for unhappy reviewers. Find these by visiting the competitor's Capterra listing — e.g. capterra.com/p/salesforce-com gives slug 'salesforce-com'.",
            "items": {
              "type": "string"
            }
          },
          "maxRating": {
            "title": "Max Rating Threshold",
            "minimum": 1,
            "maximum": 5,
            "type": "integer",
            "description": "Only mine reviewers who left this many stars or fewer (1-5). Default 3 keeps only unhappy reviewers — the high-intent buyer signal.",
            "default": 3
          },
          "maxLeadsPerCompetitor": {
            "title": "Max Leads Per Competitor",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Max number of qualifying leads to surface per competitor product slug.",
            "default": 50
          },
          "requireVerifiedReviewer": {
            "title": "Verified Reviewers Only",
            "type": "boolean",
            "description": "When true, only emits leads from Capterra-verified reviewers (LinkedIn or screenshot verified). Reduces fake-account / vendor-incentive noise.",
            "default": true
          },
          "enrichToLinkedIn": {
            "title": "Enrich with LinkedIn + Email",
            "type": "boolean",
            "description": "When true, pipes each lead through nexgendata/lead-list-enricher to look up the reviewer's company domain and find verified emails. Extra charge per enriched lead.",
            "default": false
          },
          "industryFilter": {
            "title": "Industry Filter",
            "type": "array",
            "description": "Optional list of Capterra industry names to keep (case-insensitive substring match). E.g. ['Software','Information Technology','Marketing'].",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "companySizeBuckets": {
            "title": "Company Size Buckets",
            "type": "array",
            "description": "Optional list of Capterra company-size labels to keep (exact or substring match). E.g. ['50-200 employees','200-500 employees','500-1,000 employees'].",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "notionConnector": {
            "title": "Deliver to Notion (optional)",
            "type": "string",
            "description": "Optional. Connect your Notion workspace and the leads are also written as a Notion page in the same run — the Actor never sees your Notion credentials. Authorize a Notion MCP connector in Apify Console → Settings → API & Integrations, then select it here."
          },
          "notionParentId": {
            "title": "Notion parent page ID (optional)",
            "type": "string",
            "description": "Optional. The Notion page ID to create the page under. If blank, Notion creates a private page in your workspace."
          },
          "supabaseConnector": {
            "title": "Deliver to Supabase (optional)",
            "type": "string",
            "description": "Optional. Connect your own Supabase project and the results are also inserted into a table in the same run — the Actor never sees your Supabase credentials. Authorize a write-scoped, project-scoped Supabase MCP connector in Apify Console (Settings -> Integrations), then select it here."
          },
          "supabaseTable": {
            "title": "Supabase table name (optional)",
            "type": "string",
            "description": "Target table in the public schema (created if missing, with id, a jsonb data column, and a scraped_at timestamp). Default: nexgendata_leads.",
            "default": "nexgendata_leads"
          },
          "supabaseProjectId": {
            "title": "Supabase project ID (optional)",
            "type": "string",
            "description": "Your Supabase project reference (e.g. abcdefghijklmnop). Required unless your connector URL is already project-scoped. Find it in your project URL: supabase.com/dashboard/project/THIS_PART."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}