{
  "openapi": "3.0.1",
  "info": {
    "title": "UK Contract Expiry Radar - Recompete Leads",
    "description": "UK public contracts ending soon with incumbent supplier, buyer, value and contact - recompete leads from Contracts Finder award notices.",
    "version": "0.11",
    "x-build-id": "PIZXpjIS8wdDkHz1Y"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/datagrit~uk-contract-expiry-radar/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-datagrit-uk-contract-expiry-radar",
        "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/datagrit~uk-contract-expiry-radar/runs": {
      "post": {
        "operationId": "runs-sync-datagrit-uk-contract-expiry-radar",
        "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/datagrit~uk-contract-expiry-radar/run-sync": {
      "post": {
        "operationId": "run-sync-datagrit-uk-contract-expiry-radar",
        "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",
        "properties": {
          "queries": {
            "title": "Keywords",
            "type": "array",
            "description": "Optional. A contract is returned when its title, award and tender descriptions, buyer or supplier name contains any of these keywords (case-insensitive; the description is searched in full even though the result shows it shortened to 800 characters). Leave empty to list every contract in the expiry window. Keywords narrow results but make the scan read more notices.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "expiresAfterMonths": {
            "title": "Ends no sooner than (months from today)",
            "minimum": 0,
            "maximum": 240,
            "type": "integer",
            "description": "Earliest contract end date, counted in months from today. 0 includes contracts that end from today on; use 6 to skip contracts ending in the next six months.",
            "default": 0
          },
          "expiresBeforeMonths": {
            "title": "Ends no later than (months from today)",
            "minimum": 0,
            "maximum": 240,
            "type": "integer",
            "description": "Latest contract end date, counted in months from today. 12 lists contracts that come up for recompete within a year.",
            "default": 12
          },
          "publishedLookbackDays": {
            "title": "Award notices published in the last N days",
            "minimum": 1,
            "maximum": 1095,
            "type": "integer",
            "description": "How far back to read Contracts Finder award notices, newest first; the scan stops as soon as Maximum results is reached. Roughly one to two hundred award notices are published per working day (1 to 2 API requests; very few at weekends) and the source allows 12 requests per 120 seconds (the Actor paces itself), so the default 7 days (11 to 12 requests, about 15 seconds) normally never waits, and each further working day of lookback adds roughly 20 seconds of pause. Long contracts (3-5 years) need a long window to appear as expiring - raise this together with Maximum run time.",
            "default": 7
          },
          "maxRunSeconds": {
            "title": "Maximum run time (seconds)",
            "minimum": 0,
            "maximum": 86400,
            "type": "integer",
            "description": "Hard time budget for reading the source. When it is reached the Actor stops, keeps every contract found so far and says how many lookback days it covered in the run status. 0 removes the limit (needed for long lookback windows with strict filters).",
            "default": 240
          },
          "cpvPrefixes": {
            "title": "CPV code prefixes",
            "type": "array",
            "description": "Optional. Keep only contracts whose CPV code (main or additional) starts with one of these prefixes, for example 72 for IT services or 45 for construction.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "minValue": {
            "title": "Minimum contract value (GBP)",
            "minimum": 0,
            "type": "integer",
            "description": "Skip contracts with an awarded value below this amount. Awards published without a value (the source reports 0) are skipped as soon as a minimum above 0 is set. 0 keeps everything, including awards without a value.",
            "default": 0
          },
          "includeFrameworkCallOffs": {
            "title": "Include framework call-offs",
            "type": "boolean",
            "description": "Call-offs from frameworks such as G-Cloud and from dynamic purchasing systems are usually short and re-bought through the same route. Turn off to drop every notice whose procurement procedure says call-off from a framework agreement or a dynamic purchasing system. Notices that only mention call-off in their text are kept.",
            "default": true
          },
          "includeContactEmail": {
            "title": "Include buyer contact email",
            "type": "boolean",
            "description": "Adds the contact email the buyer published on the notice. Off by default; when you turn it on, you are responsible for using it in line with data protection rules.",
            "default": false
          },
          "maxItems": {
            "title": "Maximum results",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Stop after this many contracts.",
            "default": 20
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Optional proxy. Contracts Finder is a public government API and normally needs none; enable Apify Proxy only if the run fails with a message that the source is throttling your IP address.",
            "default": {
              "useApifyProxy": false
            }
          }
        }
      },
      "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}