{
  "openapi": "3.0.1",
  "info": {
    "title": "Government Tenders Scraper (UK, EU TED, US, Canada, Australia)",
    "description": "Scrape government tenders and contract awards from UK Find a Tender, Contracts Finder, EU TED and CanadaBuys, plus SAM.gov, USAspending and AusTender: buyer, CPV or NAICS code, value, deadline, winning supplier and link. Only new notices since your last run. No login. $3 per 1,000 tenders.",
    "version": "0.1",
    "x-build-id": "s08Rax1WhvOyQup1p"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/locaihost~gov-tenders/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-locaihost-gov-tenders",
        "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/locaihost~gov-tenders/runs": {
      "post": {
        "operationId": "runs-sync-locaihost-gov-tenders",
        "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/locaihost~gov-tenders/run-sync": {
      "post": {
        "operationId": "run-sync-locaihost-gov-tenders",
        "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": {
          "sources": {
            "title": "Sources",
            "type": "array",
            "description": "Which portals to read. The four UK, EU and Canada sources are the default (also when left empty). US and Australian sources are opt-in: tick them to add them. 'US: SAM.gov opportunities, no key' reads SAM.gov's free daily public file and needs nothing from you. The keyed SAM.gov option needs your own free SAM.gov API key (below); tick both and a notice is returned once.",
            "items": {
              "type": "string",
              "enum": [
                "uk-find-a-tender",
                "uk-contracts-finder",
                "eu-ted",
                "ca-canadabuys",
                "au-austender",
                "us-usaspending",
                "us-sam-public",
                "us-sam"
              ],
              "enumTitles": [
                "UK Find a Tender",
                "UK Contracts Finder",
                "EU TED (all EU/EEA)",
                "CanadaBuys",
                "Australia: AusTender contract awards (opt-in)",
                "US: USAspending federal contract awards (opt-in)",
                "US: SAM.gov contract opportunities, no key needed (opt-in)",
                "US: SAM.gov contract opportunities (opt-in, needs your API key)"
              ]
            },
            "default": [
              "uk-find-a-tender",
              "uk-contracts-finder",
              "eu-ted",
              "ca-canadabuys"
            ]
          },
          "keywords": {
            "title": "Keywords",
            "type": "array",
            "description": "Keep notices whose title or description contains ANY of these words (case-insensitive). Leave empty for all.",
            "items": {
              "type": "string"
            }
          },
          "daysBack": {
            "title": "Days back",
            "minimum": 1,
            "maximum": 90,
            "type": "integer",
            "description": "How far back to look on each run. With 'Only new' on, a daily schedule with 3 days back never misses a notice.",
            "default": 3
          },
          "maxResults": {
            "title": "Max results",
            "minimum": 0,
            "type": "integer",
            "description": "Stop after this many notices. 0 = no limit. Free-plan runs stop at 100.",
            "default": 1000
          },
          "statuses": {
            "title": "Notice types",
            "type": "array",
            "description": "Open = invitations to tender you can still bid on. Awarded = contract award notices (who won, for how much). Planned = prior information notices.",
            "items": {
              "type": "string",
              "enum": [
                "open",
                "awarded",
                "planned",
                "closed",
                "cancelled"
              ]
            },
            "default": [
              "open",
              "awarded",
              "planned"
            ]
          },
          "cpvCodes": {
            "title": "CPV / UNSPSC code prefixes",
            "type": "array",
            "description": "Keep notices whose classification starts with any of these. CPV (UK & EU): 72 = IT services, 48 = software, 45 = construction, 79 = business services, 85 = health, 33 = medical equipment. CanadaBuys and AusTender use UNSPSC (e.g. 43 = IT equipment, 81 = engineering & IT services). US sources use NAICS (5415 = computer systems design) and PSC (D = IT services). A plain number matches the first code of any scheme; prefix it with the scheme to match only that scheme: NAICS:5415, PSC:DA, CPV:72, UNSPSC:43.",
            "items": {
              "type": "string"
            }
          },
          "naicsCodes": {
            "title": "NAICS code prefixes (US)",
            "type": "array",
            "description": "Keep US notices whose NAICS code starts with any of these, e.g. 5415 = computer systems design, 2362 = non-residential building, 5416 = management consulting. Works with the SAM.gov and USAspending sources. Combined with the CPV / UNSPSC list above as OR: a notice matching either list is kept. Leave empty for no NAICS filter.",
            "items": {
              "type": "string"
            }
          },
          "countries": {
            "title": "Buyer countries (ISO-2)",
            "type": "array",
            "description": "e.g. GB, IE, DE, FR, CA, AU, US. Leave empty for all.",
            "items": {
              "type": "string"
            }
          },
          "buyerContains": {
            "title": "Buyer name contains",
            "type": "array",
            "description": "Keep notices whose buying organisation contains ANY of these words (case-insensitive), e.g. NHS, Defense, County Council. Leave empty for all buyers.",
            "items": {
              "type": "string"
            }
          },
          "closingWithinDays": {
            "title": "Closing within (days)",
            "minimum": 0,
            "maximum": 365,
            "type": "integer",
            "description": "Keep only notices whose bid deadline is today or within this many days. Notices without a deadline (most awards) are skipped when this is set. 0 or empty = off."
          },
          "minValue": {
            "title": "Minimum value",
            "minimum": 0,
            "type": "integer",
            "description": "Skip notices with no stated value or a value below this. In the notice's own currency unless you pick USD or GBP under 'Currency for value limits'. 0 or empty = off."
          },
          "maxValue": {
            "title": "Maximum value",
            "minimum": 0,
            "type": "integer",
            "description": "Skip notices with no stated value or a value above this. Same currency rule as the minimum. 0 or empty = off."
          },
          "valueCurrency": {
            "title": "Currency for value limits",
            "enum": [
              "source",
              "USD",
              "GBP"
            ],
            "type": "string",
            "description": "What the minimum and maximum value are in. USD and GBP compare each notice's value converted at the bundled monthly ECB euro reference rates (the month is in the run's SUMMARY record); notices in a currency without a rate are skipped when a limit is set.",
            "default": "source"
          },
          "onlyNew": {
            "title": "Only new since last run",
            "type": "boolean",
            "description": "Skip notices this saved configuration already returned. Ideal for daily schedules and alerts — you only pay for fresh notices. Off by default, so a first run (and Apify's automated test) always returns results; turn it on in a scheduled task to get only new notices.",
            "default": false
          },
          "samApiKey": {
            "title": "SAM.gov API key (only for the SAM.gov source)",
            "type": "string",
            "description": "Your own free SAM.gov public API key, needed only if you tick 'US: SAM.gov contract opportunities'. Get it at sam.gov → sign in → Account Details → Public API Key. It is stored encrypted and used only to call api.sam.gov for you. Personal keys allow few requests per day, so one run uses at most 5."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}