{
  "openapi": "3.0.1",
  "info": {
    "title": "UK Staffing Agency Scraper",
    "description": "Discovers active UK staffing agencies via Companies House API and enriches records with contact emails and designations from company websites.",
    "version": "1.0",
    "x-build-id": "hDt5tc5ldvahTrgzy"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/devntransform~uk-staffing-agency-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-devntransform-uk-staffing-agency-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/devntransform~uk-staffing-agency-scraper/runs": {
      "post": {
        "operationId": "runs-sync-devntransform-uk-staffing-agency-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/devntransform~uk-staffing-agency-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-devntransform-uk-staffing-agency-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",
        "required": [
          "companiesHouseApiKey"
        ],
        "properties": {
          "companiesHouseApiKey": {
            "title": "Companies House API Key",
            "type": "string",
            "description": "Your Companies House REST API key. Get one free at https://developer.company-information.service.gov.uk"
          },
          "specialization": {
            "title": "Staffing Specialization",
            "type": "array",
            "description": "Filter agencies by industry specialization. Select one or more.",
            "items": {
              "type": "string",
              "enum": [
                "General",
                "IT & Technology",
                "Healthcare & Nursing",
                "Finance & Accounting",
                "Legal",
                "Engineering",
                "Construction",
                "Education",
                "Executive & C-Suite"
              ]
            },
            "default": [
              "General"
            ]
          },
          "companyStatus": {
            "title": "Company Status",
            "enum": [
              "active"
            ],
            "type": "string",
            "description": "Only active companies are useful. Dissolved companies are excluded by default.",
            "default": "active"
          },
          "sicCodes": {
            "title": "SIC Codes to Target",
            "type": "array",
            "description": "SIC codes define the business type. 7820 = Temporary employment agencies. 7810 = Employment placement agencies. 7830 = HR provision.",
            "items": {
              "type": "string",
              "enum": [
                "7820",
                "7810",
                "7830"
              ]
            },
            "default": [
              "7820",
              "7810"
            ]
          },
          "maxResults": {
            "title": "Max Results Per Run",
            "minimum": 10,
            "maximum": 400,
            "type": "integer",
            "description": "Maximum number of enriched records to collect per run. Recommended: 300-400.",
            "default": 300
          },
          "keywordFilter": {
            "title": "Keyword Filter (Optional)",
            "type": "string",
            "description": "Only include companies whose name contains this keyword. Leave blank for all. Example: nursing, IT, finance",
            "default": ""
          },
          "enableDedup": {
            "title": "Enable Deduplication",
            "type": "boolean",
            "description": "Skip domains already scraped in previous runs. Strongly recommended to keep ON.",
            "default": true
          },
          "exclusionMode": {
            "title": "Exclusion Mode",
            "enum": [
              "automatic",
              "manual",
              "both"
            ],
            "type": "string",
            "description": "How to load previously seen domains. Automatic = from last run. Manual = paste your own list. Both = merge both.",
            "default": "automatic"
          },
          "manualExclusionList": {
            "title": "Manual Exclusion List",
            "type": "string",
            "description": "Paste domains to exclude, one per line. Example: reed.co.uk\\nhays.com. Only used if Exclusion Mode includes Manual.",
            "default": ""
          },
          "outputFormat": {
            "title": "Output Format",
            "enum": [
              "json",
              "csv"
            ],
            "type": "string",
            "description": "Format for the final dataset export.",
            "default": "csv"
          },
          "useProxy": {
            "title": "Enable Proxy",
            "type": "boolean",
            "description": "Route Google search requests through a proxy to avoid rate limiting and blocks. Strongly recommended for runs above 100 records.",
            "default": true
          },
          "proxyType": {
            "title": "Proxy Type",
            "enum": [
              "apify_residential",
              "apify_datacenter",
              "custom"
            ],
            "type": "string",
            "description": "Which proxy to use. Apify Residential gives UK IPs and is best for Google. Datacenter is faster but more likely to be blocked. Custom lets you use your own proxy.",
            "default": "apify_residential"
          },
          "customProxyUrl": {
            "title": "Custom Proxy URL",
            "type": "string",
            "description": "Only used if Proxy Type is set to Custom. Format: http://username:password@host:port"
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}