{
  "openapi": "3.0.1",
  "info": {
    "title": "Serp CWD",
    "description": "Website discovery for companies",
    "version": "0.0",
    "x-build-id": "WrndB8alUG5LhaWde"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/l_axis~serp-CWD/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-l_axis-serp-CWD",
        "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/l_axis~serp-CWD/runs": {
      "post": {
        "operationId": "runs-sync-l_axis-serp-CWD",
        "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/l_axis~serp-CWD/run-sync": {
      "post": {
        "operationId": "run-sync-l_axis-serp-CWD",
        "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": {
          "searches": {
            "title": "Searches",
            "type": "array",
            "description": "Inline company rows to process. Each item should contain companyName and optionally companyNumber and town.",
            "items": {
              "type": "object",
              "properties": {
                "companyNumber": {
                  "title": "Company number",
                  "type": "string",
                  "description": "Companies House number (e.g. 12345678)."
                },
                "companyName": {
                  "title": "Company name",
                  "type": "string",
                  "description": "Registered company name to search for."
                },
                "town": {
                  "title": "Town",
                  "type": "string",
                  "description": "Town or city to narrow the search (optional)."
                }
              },
              "required": [
                "companyName"
              ]
            }
          },
          "sourceDatasetId": {
            "title": "Source dataset",
            "type": "string",
            "description": "Optional dataset ID containing company rows. Items should expose companyName or company_name, plus optional companyNumber/company_number and town."
          },
          "limit": {
            "title": "Limit",
            "minimum": 1,
            "type": "integer",
            "description": "Maximum number of searches to run after loading inline rows and dataset rows.",
            "default": 100
          },
          "maxConcurrency": {
            "title": "Max concurrency",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "Number of concurrent Google SERP requests. GOOGLE_SERP allows up to 200 concurrent connections per account.",
            "default": 50
          },
          "proxyGroup": {
            "title": "Proxy group",
            "enum": [
              "GOOGLE_SERP",
              "RESIDENTIAL"
            ],
            "type": "string",
            "description": "Apify proxy group to use. GOOGLE_SERP is most reliable; RESIDENTIAL is cheaper but may get blocked.",
            "default": "GOOGLE_SERP"
          },
          "googleDomain": {
            "title": "Google domain",
            "type": "string",
            "description": "Google hostname to query. For UK search use google.co.uk.",
            "default": "google.co.uk"
          },
          "language": {
            "title": "Language",
            "type": "string",
            "description": "Google hl parameter.",
            "default": "en"
          },
          "pagesPerQuery": {
            "title": "Pages per query",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "How many SERP pages to fetch. Each page counts as a separate SERP proxy request.",
            "default": 1
          },
          "matchMode": {
            "title": "Match mode",
            "enum": [
              "strict",
              "loose",
              "raw"
            ],
            "type": "string",
            "description": "Scoring mode for choosing likely company websites.",
            "default": "strict"
          },
          "proxySettings": {
            "title": "Apify proxy settings",
            "type": "object",
            "description": "Optional Apify proxy selection. Leave empty to use the default GOOGLE_SERP group unless customProxyUrls are provided."
          },
          "customProxyUrls": {
            "title": "Custom proxy URLs",
            "type": "array",
            "description": "Optional full proxy URLs. If provided, these override Apify proxy usage and are rotated round-robin by the Apify SDK.",
            "items": {
              "type": "string"
            }
          },
          "proxyProviderLabel": {
            "title": "Proxy provider label",
            "type": "string",
            "description": "Optional label written to each output row and summary, e.g. dataimpulse_residential.",
            "default": ""
          },
          "includeHtmlSnippet": {
            "title": "Include raw HTML snippet",
            "type": "boolean",
            "description": "Store the first part of the raw Google HTML in each output row for debugging.",
            "default": false
          },
          "checkpointKey": {
            "title": "Checkpoint key",
            "type": "string",
            "description": "Key-value store key used for resumable state. Reuse the same key to continue a previous run.",
            "default": "CHECKPOINT"
          },
          "resumeFromCheckpoint": {
            "title": "Resume from checkpoint",
            "type": "boolean",
            "description": "When enabled, skip searches already recorded under the checkpoint key.",
            "default": false
          },
          "pushBatchSize": {
            "title": "Push batch size",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "How many result rows to buffer before pushing them to the default dataset.",
            "default": 25
          },
          "requestTimeoutSecs": {
            "title": "Request timeout",
            "minimum": 5,
            "maximum": 180,
            "type": "integer",
            "description": "Per-request timeout in seconds.",
            "default": 45
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}