# UK FTS Contract Extension Review (`remarkable_whipscorpion/fts-contract-extension-review`) Actor

Review current contract periods and stated renewal options from a bounded official FTS feed.

- **URL**: https://apify.com/remarkable_whipscorpion/fts-contract-extension-review.md
- **Developed by:** [Kagerou AP](https://apify.com/remarkable_whipscorpion) (community)
- **Categories:** Business
- **Stats:** 2 total users, 1 monthly users, 84.6% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $10.00 / 1,000 useful unique contract revieweds

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 FTS Contract Extension Review

Review contract periods and stated renewal options from recent official UK Find a Tender (FTS) releases. This Actor helps UK bid and capture agencies maintain a source-linked contract review pipeline.

The output separates the contract's stated current end date, maximum extension date and renewal declaration. An extension option is **not evidence that an extension was exercised**, and it does not confirm a future tender. Every result requires human review.

### Try the default input

```json
{"maxPages":1,"maxContracts":10,"cpvPrefixes":[],"previousRows":[]}
```

This uses the live recent feed. No API key, login, proxy or date maintenance is required. The default scans one page (normally up to 100 releases) and returns at most 10 useful unique contracts. It may legitimately return a coverage summary with no useful contracts; it never substitutes demo contracts for an empty or failed source.

For a recent window, optionally supply `updatedFrom` as an ISO datetime with timezone, no more than seven days before the run. The end of that window is the run's start time. Blank or omitted `updatedFrom` uses the recent feed. `maxPages` is 1–3; `maxContracts` is 1–50. A run fetches at most 300 releases. Requests are serial, spaced by at least 10.5 seconds. HTTP 429 or a Retry-After header stops retrieval without retries.

Optional `cpvPrefixes` accepts up to ten numeric prefixes, each 2–8 digits. It filters observed contract, explicitly matched award and release-level tender CPV classifications. It does not enrich codes or establish a contract-specific classification where the source only supplies a tender classification.

Optional `previousRows` accepts at most 50 prior rows keyed by exact `ocid` and `contractId`, with `currentEndDate`, `maximumExtensionDate`, and/or `renewalDeclared`. Supply only observed fields. For example:

```json
{"ocid":"ocds-h6vhtk-07854b","contractId":"1","currentEndDate":"2027-10-10T07:59:59+09:00"}
```

Differences are computed only for records and fields observed in both inputs. Missing dates remain unknown. A previous contract absent from this bounded scan is unobserved; it is never marked expired, removed or unchanged. Same-time conflicting releases and duplicated prior identities are held for review. Latest retrieved releases supersede older ones without copying missing historical fields forward.

### Results

The default Dataset contains source-linked contract rows, or a coverage summary when no useful contracts are observed. KVS record `OUTPUT` contains the same contract facts, coverage and authoritative settled custom-event counts. Dataset rows are saved **before** charging and refer to `OUTPUT` or the native charge ledger for final billing; their pre-charge snapshot does not claim a settled fee.

Rows include `ocid`, `contractId`, `releaseId`, buyer, supplier IDs when explicitly linked by `awardID`, observed CPV codes, `currentEndDate`, `maximumExtensionDate`, `renewalDeclared`, `renewalText`, `sourcePaths`, `periodBasis`, unknown fields and source attribution. Periods come only from `contracts.period`; tender or lot planned periods are not presented as contract periods. Original ISO strings and offsets are preserved. No UK calendar-date conversion is implied.

Coverage reports pages and release counts, requested window, next cursor, filtered/unknown/duplicate counts, output truncation and source failures. This is a review of retrieved releases, not a complete UK market, historical contract record or verified current portfolio. The API may omit releases in larger time windows; use narrower windows when appropriate and retain coverage with your report.

On source failure, useful facts already observed can remain accessible with partial/unknown coverage, but the run fails and no custom fee is requested. All-unknown records incur no custom fee. Result writes happen before charge requests. Interrupted or ambiguous writes/charges are not automatically replayed on resurrection; the saved checkpoint and native ledger must be reviewed. An incomplete checkpoint or uncertain charge response fails the run rather than claiming success.

### Pricing

- $0.01 per unique `ocid` + `contractId` with at least one meaningful contract date or stated renewal field (`contract_reviewed`).
- Automatic platform start event: $0.00005 per run.
- Default Dataset item event: $0. No extra Dataset fee.
- Source failure, all-unknown rows, summaries and duplicate occurrences: $0 custom fee.

Ten charged contracts cost $0.10005 including the start event; 50 cost $0.50005. On successful paid runs, useful contract output is limited to the funded event capacity before saving to OUTPUT or the Dataset, with exact budget checks before serial custom-event requests. A budget below one contract event returns only a budget and coverage summary. Source-failure facts retain the no-custom-fee exception described above. Pricing is an untested commercial hypothesis.

### Source and licence

Source: [FTS official OCDS release packages](https://www.find-tender.service.gov.uk/api/1.0/ocdsReleasePackages). Contains public sector information licensed under the [Open Government Licence v3.0](http://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/). Source links and this notice accompany the output. No government endorsement is implied. Only selected public factual contract fields are exported; contact points, attachments, logos and company enrichment are excluded.

### Local verification

Node 24.22.1 and official Apify SDK 3.7.2 are pinned with the dependency lockfile. `npm ci --ignore-scripts`, `npm test`, `npm run validate` and `npm run sample` run the local checks. The sample output is generated from an actual stored official source fixture and is explicitly labelled as a fixture execution. `npm run live` performs a bounded public-source read without an Apify cloud run or charge. Cloud build, pricing configuration and public listing are separate release checks.

# Actor input Schema

## `maxPages` (type: `integer`):

Default 1. Hard maximum 3; serial official API requests.

## `maxContracts` (type: `integer`):

Default 10. Hard maximum 50 output contracts.

## `updatedFrom` (type: `string`):

RFC3339 with timezone, at most 7 days before run time; omitted uses the recent feed.

## `cpvPrefixes` (type: `array`):

Up to 10 numeric prefixes, 2–8 digits. Filters only retrieved CPV fields.

## `previousRows` (type: `array`):

Optional up to 50 prior ocid + contractId rows. Only both-present fields can be compared; absence never implies expiry/removal.

## Actor input object example

```json
{
  "maxPages": 1,
  "maxContracts": 10,
  "cpvPrefixes": [],
  "previousRows": []
}
```

# Actor output Schema

## `contracts` (type: `string`):

No description

## `output` (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 = {
    "maxPages": 1,
    "maxContracts": 10,
    "cpvPrefixes": [],
    "previousRows": []
};

// Run the Actor and wait for it to finish
const run = await client.actor("remarkable_whipscorpion/fts-contract-extension-review").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 = {
    "maxPages": 1,
    "maxContracts": 10,
    "cpvPrefixes": [],
    "previousRows": [],
}

# Run the Actor and wait for it to finish
run = client.actor("remarkable_whipscorpion/fts-contract-extension-review").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 '{
  "maxPages": 1,
  "maxContracts": 10,
  "cpvPrefixes": [],
  "previousRows": []
}' |
apify call remarkable_whipscorpion/fts-contract-extension-review --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,remarkable_whipscorpion/fts-contract-extension-review"
        }
    }
}
```

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/4PTNTFCcs3NmfcBji/builds/wd5eY2r83Rs0WBSbj/openapi.json
