# UK Tender Amendment Compare (`midas_labs/uk-tender-amendment-compare`) Actor

Compare two public UK Find a Tender notice versions. Get source-linked changes to deadlines, tender status and lot IDs, with missing fields flagged.

- **URL**: https://apify.com/midas_labs/uk-tender-amendment-compare.md
- **Developed by:** [MIDAS Labs](https://apify.com/midas_labs) (community)
- **Categories:** Developer tools
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$1,000.00 / 1,000 comparison reports

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

## UK Tender Amendment Compare

Compare two public UK Find a Tender notices for the same procurement. The Actor returns deadline changes, tender status and lot IDs in one JSON report. It links to both notices and flags missing fields.

### Run a comparison

In Apify Console, open the Actor’s Input tab and use the two official notices in the prefilled example, or provide your own `before` and `after` snapshots. Each snapshot needs `source` set to `Find a Tender`, the `ocid`, the `notice` reference and a `published` ISO 8601 timestamp with an offset. Both snapshots must have the same OCDS process ID, different notice references and publication timestamps in chronological order. Include `deadline`, `status` or `lot_ids` when available. Select **Start** and open the run’s default dataset for the report.

The verified example compares the [original notice](https://www.find-tender.service.gov.uk/Notice/083047-2025) with its [amendment](https://www.find-tender.service.gov.uk/Notice/085139-2025) and reports a four-day deadline extension. Status and lot IDs were absent from those projections, so the report leaves them unavailable. An unchanged comparison returns one report with no field changes. Invalid or different-process input returns no report.

### Verified sample output

```json
{
  "source": "Find a Tender",
  "ocid": "ocds-h6vhtk-05a643",
  "baseline_url": "https://www.find-tender.service.gov.uk/Notice/083047-2025",
  "candidate_url": "https://www.find-tender.service.gov.uk/Notice/085139-2025",
  "changes": {
    "deadline": {
      "before": "2026-01-16T12:00:00+00:00",
      "after": "2026-01-20T12:00:00+00:00",
      "coverage": "both_reported",
      "seconds_delta": 345600
    }
  },
  "unavailable_fields": [
    "status",
    "lot_ids"
  ],
  "attribution": "Contains public sector information licensed under the Open Government Licence v3.0.",
  "scope": "Compare the supplied fields only. Open the official notice before relying on a change."
}
```

The Store price is **US$1 per delivered report**, including platform usage. Check the price shown on the Actor before starting a run.

The Actor uses limited permissions. It compares supplied data and makes no external retrieval calls. Supply only the listed public fields. Recheck both official notices before relying on a change for a bid. Contains public sector information licensed under the [Open Government Licence v3.0](https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/).

### Errors and support

If input validation fails, check the run log and correct the process ID, notice references, timestamps or unsupported fields before trying again. A rejected comparison produces no report and triggers no report fee. For a reproducible issue, use the Actor’s **Issues** tab and include the public notice references and error message. Keep credentials and personal data out of issue reports.

# Actor input Schema

## `before` (type: `object`):

A JSON object with source (Find a Tender), ocid, notice and published (ISO timestamp with offset). Optional public fields are deadline, status and lot_ids. Do not enter URLs, text narratives, credentials or personal data.

## `after` (type: `object`):

A different later notice in the same process, with the same allowed field names as the earlier snapshot. Omit unknown data.

## Actor input object example

```json
{
  "before": {
    "source": "Find a Tender",
    "ocid": "ocds-h6vhtk-05a643",
    "notice": "083047-2025",
    "published": "2025-12-15T16:36:00Z",
    "deadline": "2026-01-16T12:00:00Z"
  },
  "after": {
    "source": "Find a Tender",
    "ocid": "ocds-h6vhtk-05a643",
    "notice": "085139-2025",
    "published": "2025-12-19T17:01:00Z",
    "deadline": "2026-01-20T12:00:00Z"
  }
}
```

# Actor output Schema

## `comparison` (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 = {
    "before": {
        "source": "Find a Tender",
        "ocid": "ocds-h6vhtk-05a643",
        "notice": "083047-2025",
        "published": "2025-12-15T16:36:00Z",
        "deadline": "2026-01-16T12:00:00Z"
    },
    "after": {
        "source": "Find a Tender",
        "ocid": "ocds-h6vhtk-05a643",
        "notice": "085139-2025",
        "published": "2025-12-19T17:01:00Z",
        "deadline": "2026-01-20T12:00:00Z"
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("midas_labs/uk-tender-amendment-compare").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 = {
    "before": {
        "source": "Find a Tender",
        "ocid": "ocds-h6vhtk-05a643",
        "notice": "083047-2025",
        "published": "2025-12-15T16:36:00Z",
        "deadline": "2026-01-16T12:00:00Z",
    },
    "after": {
        "source": "Find a Tender",
        "ocid": "ocds-h6vhtk-05a643",
        "notice": "085139-2025",
        "published": "2025-12-19T17:01:00Z",
        "deadline": "2026-01-20T12:00:00Z",
    },
}

# Run the Actor and wait for it to finish
run = client.actor("midas_labs/uk-tender-amendment-compare").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 '{
  "before": {
    "source": "Find a Tender",
    "ocid": "ocds-h6vhtk-05a643",
    "notice": "083047-2025",
    "published": "2025-12-15T16:36:00Z",
    "deadline": "2026-01-16T12:00:00Z"
  },
  "after": {
    "source": "Find a Tender",
    "ocid": "ocds-h6vhtk-05a643",
    "notice": "085139-2025",
    "published": "2025-12-19T17:01:00Z",
    "deadline": "2026-01-20T12:00:00Z"
  }
}' |
apify call midas_labs/uk-tender-amendment-compare --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,midas_labs/uk-tender-amendment-compare"
        }
    }
}
```

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/LN7DAnbTpZdhE7tC6/builds/RfQetTxSq2wo5MO7h/openapi.json
