# Hays Jobs Scraper (`jobsapi/hays-jobs-search-scraper`) Actor

Direct Hays public job-list and JobPosting JSON-LD adapter with source-backed employment fields and fail-closed access diagnostics.

- **URL**: https://apify.com/jobsapi/hays-jobs-search-scraper.md
- **Developed by:** [Jobs API](https://apify.com/jobsapi) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.99 / 1,000 hays job records

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Hays Jobs Search Scraper

This Actor reads public Hays job-list pages and then fetches each public job-detail page. The default source is [Hays US jobs](https://www.hays.com/jobs). Presets cover the United States, United Kingdom, Australia, Germany, Austria, Switzerland, France, Netherlands, Belgium, and Denmark. If a custom supported-country Hays URL is supplied without a market, the market is inferred from its hostname.

### Source-backed output

Each `hays-job` row is grounded in the Hays detail page and its public `JobPosting` JSON-LD. Alongside title, reference, job type, profession, industry, compensation, posting/closing dates, and location, it retains structured location/organization data, source-published employment and application options, description HTML and sectioned text, skills, responsibilities, qualifications, education/experience requirements, benefits, work hours, and other standard `JobPosting` fields when available. A direct application URL is emitted only when an explicit public application link is present; otherwise the detail URL and visible application-option labels remain separate. Each record carries request evidence and a computed count of more than 20 populated meaningful source fields.

Consultant names, office addresses, phone numbers, email addresses, account/session data, and application payloads are not collected. Email and phone patterns in public descriptions are redacted. Null, blank, placeholder, and empty nested values are removed.

When Hays' visible pay label conflicts with its structured salary unit, `salary.unit` follows the visible label while `sourceUnitText` preserves the JSON-LD value and `unitConflict` flags the mismatch. A structured `DAY` without a visible pay period is retained as source evidence but omitted as an unverified normalized unit. Invalid coordinate pairs are omitted.

### Inputs

- `market`: `us` (default), `uk`, `au`, `de`, `at`, `ch`, `fr`, `nl`, `be`, or `dk`.
- `sourceUrl` or the first `startUrls` item: an optional public Hays list/result/detail URL.
- `maxItems` and `timeoutMs`: bounded detail-page controls. The complete public description is always retained and sanitized.

The Actor uses ordinary direct HTTPS, with no proxy, identity/fingerprint changes, or retries. It follows at most five redirects, only when every destination remains on the approved Hays HTTPS host allowlist. HTTP `401`, `403`, `429`, and `451`, or a visible source challenge with a matching hashed response receipt, stop requests immediately. The output summary records platform `status` (`SUCCEEDED` or `FAILED`) separately from extraction `resultStatus` (`COMPLETE`, `LIMITED`, `SKIPPED`, `DEFERRED`, `NO_DATA`, or `FAILED`). A confirmed source barrier is `SUCCEEDED` / `SKIPPED` when its diagnostics persist; buffered jobs are discarded. Only awaited successful Dataset writes increment `successfulItems`; `detailItemsParsed` is a separate count of validated candidates before persistence. Stored source-backed rows followed by later errors remain `SUCCEEDED` / `LIMITED`; a fatal zero-row run uses `Actor.fail()` and is `FAILED` / `FAILED`. Diagnostics, fixture/dummy items, and incomplete or unverified records are kept out of the Dataset. An unrecognized empty listing or uncertain network/tool outcome is `DEFERRED`; `NO_DATA` requires affirmative source evidence and is not inferred from missing job links. `OUTPUT_SUMMARY`, `REQUEST_RECEIPTS`, and `RUN_DIAGNOSTICS` retain run counts, direct-access receipts and hashes, and failure reasons.

### Local verification

```text
npm install
npm run check
npm test
apify validate-schema
apify run --purge --input-file INPUT.json
npm run validate
```

# Actor input Schema

## `market` (type: `string`):

Official Hays country-site preset.

## `sourceUrl` (type: `string`):

Optional public Hays jobs/listing or job-detail URL. Credential-bearing URLs are rejected.

## `startUrls` (type: `array`):

Compatibility input; the first URL is used when sourceUrl is not supplied.

## `maxItems` (type: `integer`):

Maximum Hays job-detail pages to inspect.

## `timeoutMs` (type: `integer`):

Maximum time allowed for each direct Hays request.

## Actor input object example

```json
{
  "startUrls": [],
  "maxItems": 5,
  "timeoutMs": 30000
}
```

# Actor output Schema

## `dataset` (type: `string`):

No description

## `runSummary` (type: `string`):

No description

## `diagnostics` (type: `string`):

No description

## `requestReceipts` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {};

// Run the Actor and wait for it to finish
const run = await client.actor("jobsapi/hays-jobs-search-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {}

# Run the Actor and wait for it to finish
run = client.actor("jobsapi/hays-jobs-search-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{}' |
apify call jobsapi/hays-jobs-search-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,jobsapi/hays-jobs-search-scraper"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/fYip8TDmVO7SSOP8h/builds/mzLJ1rQsakEHyKzRf/openapi.json
