# HSE Consultation Deadline Scraper (`vixendata/hse-consultation-deadline-scraper`) Actor

Export HSE consultation opening and closing dates, source statuses, topics and document links from homepage discovery or supplied detail URLs.

- **URL**: https://apify.com/vixendata/hse-consultation-deadline-scraper.md
- **Developed by:** [Vixendata](https://apify.com/vixendata) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.00 / 1,000 recognized consultation/publication/alert metadata records

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

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

## HSE Consultation Deadline Scraper

Turn the Health and Safety Executive's consultation hub into deadline records for regulatory trackers and EHS research. Discover recently featured open and closed consultations, or supply known consultation URLs. Each row includes typed opening/closing dates, the source's status, audience/interests and links to supporting documents.

### What you get

- One row per recognized consultation, deduplicated by source URL within the run.
- ISO calendar dates, raw deadline-time wording, source URL and retrieval timestamp.
- HSE portal-specific discovery and parsing, including REACH, PFAS and other consultations featured by the hub. This does not read HSE's separate authorisation workbook.
- Dataset exports through Apify in JSON, CSV and Excel; RUN_SUMMARY explains skipped pages, caps and discovery coverage.

Useful for building a review queue or comparing snapshots on your own schedule. The actor does not send alerts, determine compliance obligations, or calculate a legally authoritative deadline.

### Quick start

Run with default input to discover the consultation cards shown at https://consultations.hse.gov.uk/. Default output cap: 10 rows. For a narrowly bounded lookup:

```json
{"consultationUrls":["https://consultations.hse.gov.uk/crd-reach/afa-073-01/"],"discoverRecent":false,"maxItems":1,"status":"all"}
```

`consultationUrls`: up to 30 plain HTTPS HSE detail URLs with a department and consultation slug. Query strings, fragments, forms, external hosts and document-download URLs cannot be fetched.

`discoverRecent`: add homepage consultation cards. This is a recent, curated inventory, not a complete historical or current consultation census. Finder pagination and the National Archives are not crawled.

`maxItems`: 1–30 matching records. No more than 30 detail pages are attempted, even if a filter removes rows.

`status`: all, open, closed, forthcoming or unknown. Status comes from the source's Opens/Closes/Closed labels, not date arithmetic.

### Real source example

Observed from the HSE AFA073-01 page on 5 October 2026:

```json
{
  "title": "Applications for authorisation AFA073-01 - Chromium Trioxide",
  "openedDate": "2026-09-21",
  "closingDate": "2026-11-16",
  "closingTimeText": "closes at 23:59 London time (BST).",
  "observedStatus": "open",
  "audiences": ["Applications for authorisation"],
  "interests": ["Registration, Evaluation, Authorisation & restriction of CHemicals (REACH)"],
  "sourceUrl": "https://consultations.hse.gov.uk/crd-reach/afa-073-01/"
}
```

The sample omits the long document URLs and run-specific timestamp for readability. Actual rows also include documentUrls, retrievedAt (UTC ISO timestamp), coverage, warnings and attribution. Missing dates become null; warnings identify absent or unrecognized closing dates. The source's BST wording is preserved verbatim, even though the date is in November. No timezone offset is invented.

### Coverage and reliability

The homepage currently features selected open and closed consultations. Explicit URLs are visited first. RUN_SUMMARY gives the number of candidates, attempted/fetched pages, output rows, requests, errors and whether candidate processing was truncated. Zero matches do not establish that no consultations exist. Portal redesigns can require parser updates. No cross-run deduplication, lifecycle database, change detection, applicant extraction or document text extraction is provided.

Failures preserve any rows already emitted and mark the run failed. Always inspect RUN_SUMMARY before treating an export as complete. Confirm deadlines on the linked HSE page before acting.

### Responsible collection and reuse

Only public metadata and reference links are collected. No response forms, respondent identities, submissions, applicant narrative, logos or document contents are exported. Source HTML is parsed in memory; it is not republished.

The actor checks robots.txt first and fails closed if it cannot obtain valid rules. Requests are sequential, at least five seconds apart, honoring any longer supported crawl delay or request-rate interval. It configures no scraping proxy, credentials, browser evasion or redirects. Standard runtime networking is used. It stops on 401, 403, 429, redirects and source-policy denials, without retries. Each response is limited to 2 MiB, requests have a 20-second socket timeout and reads a 35-second budget; runs have a 32-request and approximately 15-minute collection cap.

Attribution: Health and Safety Executive. Contains public sector information licensed under the [Open Government Licence v3.0](https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/). See [HSE copyright and reuse policy](https://www.hse.gov.uk/help/copyright.htm). Third-party rights and logos are excluded from that permission. Supporting documents remain source links; independently review their terms before reusing them. HSE and Delib do not endorse this actor.

### Runtime

Python 3.12 with Apify SDK 4.0.2. No browser or third-party parsing dependency is needed. This release is a private, source-specific prototype; source availability and layout may change.

# Actor input Schema

## `consultationUrls` (type: `array`):

Optional plain HTTPS consultations.hse.gov.uk/department/consultation/ detail URLs, maximum 30. No forms, finder URLs or document downloads.

## `discoverRecent` (type: `boolean`):

Add consultation cards from the HSE hub homepage. Bounded recent inventory, not a complete archive.

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

Stop after this many matching rows. At most 30 detail pages are attempted per run.

## `status` (type: `string`):

Filter source date labels. No status or timezone is inferred from your local clock.

## Actor input object example

```json
{
  "consultationUrls": [],
  "discoverRecent": true,
  "maxItems": 10,
  "status": "all"
}
```

# Actor output Schema

## `results` (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("vixendata/hse-consultation-deadline-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("vixendata/hse-consultation-deadline-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 vixendata/hse-consultation-deadline-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,vixendata/hse-consultation-deadline-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/f0AUs0g1vq4vgTunY/builds/zk13apQjfn3k3RvUy/openapi.json
