{
  "openapi": "3.0.1",
  "info": {
    "title": "Crm Data Enrichment Agent",
    "description": "Turn partial contact info into complete, verified business profiles. Automatically enrich your leads with deep person insights, company firmographics, and French legal data (SIREN/SIRET) using the power of **Hunter.io** and **Dropcontact**.",
    "version": "0.3",
    "x-build-id": "3NwcBDRrNpHj8h0F1"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/theguide~crm-data-enrichment-agent/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-theguide-crm-data-enrichment-agent",
        "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/theguide~crm-data-enrichment-agent/runs": {
      "post": {
        "operationId": "runs-sync-theguide-crm-data-enrichment-agent",
        "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/theguide~crm-data-enrichment-agent/run-sync": {
      "post": {
        "operationId": "run-sync-theguide-crm-data-enrichment-agent",
        "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": [
          "records"
        ],
        "properties": {
          "records": {
            "title": "Contacts to enrich",
            "type": "array",
            "description": "List of contact records to enrich. Each record can contain email, name, company name, etc.",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "title": "External ID",
                  "type": "string",
                  "description": "Unique identifier from the source CRM."
                },
                "email": {
                  "title": "Email Address",
                  "type": "string",
                  "description": "Primary email address of the contact."
                },
                "firstName": {
                  "title": "First Name",
                  "type": "string",
                  "description": "Given name of the contact."
                },
                "lastName": {
                  "title": "Last Name",
                  "type": "string",
                  "description": "Family name of the contact."
                },
                "fullName": {
                  "title": "Full Name",
                  "type": "string",
                  "description": "Combined full name if first/last are not separate."
                },
                "companyName": {
                  "title": "Company Name",
                  "type": "string",
                  "description": "Name of the organization the contact works for."
                },
                "companyDomain": {
                  "title": "Company Domain",
                  "type": "string",
                  "description": "Website domain of the company (e.g., example.com)."
                },
                "linkedinUrl": {
                  "title": "LinkedIn URL",
                  "type": "string",
                  "description": "URL of the contact's LinkedIn profile."
                },
                "notes": {
                  "title": "Notes",
                  "type": "string",
                  "description": "Additional context or notes about the contact."
                },
                "tags": {
                  "title": "Tags",
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "description": "Labels or categories assigned to the contact."
                }
              }
            },
            "default": [
              {
                "id": "1",
                "firstName": "Jan",
                "lastName": "Curn",
                "companyName": "Apify"
              },
              {
                "id": "2",
                "email": "sam@openai.com"
              },
              {
                "id": "3",
                "companyName": "Reddit"
              }
            ]
          },
          "dropcontactApiKey": {
            "title": "Dropcontact API Key",
            "type": "string",
            "description": "Used for person enrichment and company data."
          },
          "hunterApiKey": {
            "title": "Hunter API Key",
            "type": "string",
            "description": "Used for email verification and email discovery (Email Finder)."
          },
          "includeRawProviderPayloads": {
            "title": "Include raw payloads",
            "type": "boolean",
            "description": "If enabled, the full response from providers will be included in the output.",
            "default": false
          },
          "maxConcurrency": {
            "title": "Max concurrency",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Number of records to process in parallel.",
            "default": 3
          },
          "requestTimeoutSecs": {
            "title": "Request timeout (seconds)",
            "minimum": 1,
            "maximum": 120,
            "type": "integer",
            "description": "Timeout for API requests to providers.",
            "default": 30
          },
          "companyUrlFallbackProtocols": {
            "title": "Company URL protocols",
            "type": "array",
            "description": "Protocols to try when fetching company homepage.",
            "items": {
              "type": "string",
              "enum": [
                "https",
                "http"
              ]
            },
            "default": [
              "https",
              "http"
            ]
          },
          "fetchCompanyHomepage": {
            "title": "Fetch company homepage",
            "type": "boolean",
            "description": "If enabled, attempts to fetch and parse the company's homepage for extra context.",
            "default": true
          },
          "dropcontactSiren": {
            "title": "Dropcontact SIREN",
            "type": "boolean",
            "description": "Enrich with SIREN/SIRET data (French companies).",
            "default": true
          },
          "autoResolveDomain": {
            "title": "Auto-resolve company domain",
            "type": "boolean",
            "description": "If company domain is missing, try to resolve it from the company name via Hunter.",
            "default": true
          },
          "language": {
            "title": "Language",
            "enum": [
              "en",
              "fr"
            ],
            "type": "string",
            "description": "Language for enrichment results.",
            "default": "en"
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}