{
  "openapi": "3.0.1",
  "info": {
    "title": "Government Tenders Scraper: SAM.gov, TED EU, UK & Canada",
    "description": "Public tenders and contract awards from 5 official sources in one format: SAM.gov, EU TED, UK Find a Tender, Contracts Finder, CanadaBuys. Keywords, CPV/NAICS, countries, value, open deadlines; only-new alerts; CSV. $3 per 1,000 notices.",
    "version": "0.1",
    "x-build-id": "X4N7lfgVWgjDU8lRY"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/tidytools~government-tenders-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-tidytools-government-tenders-scraper",
        "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/tidytools~government-tenders-scraper/runs": {
      "post": {
        "operationId": "runs-sync-tidytools-government-tenders-scraper",
        "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/tidytools~government-tenders-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-tidytools-government-tenders-scraper",
        "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": {
          "keywords": {
            "title": "Keywords (optional)",
            "type": "array",
            "description": "Keep notices that mention at least one of these words or phrases in the title, description or buyer name, e.g. \"software\", \"cleaning services\", \"NHS\". TED searches its full text in every EU language (an English word also finds notices whose English title matches). Empty = all notices.",
            "items": {
              "type": "string"
            }
          },
          "sources": {
            "title": "Sources",
            "type": "array",
            "description": "Official public-procurement sources to search. Empty = all five.",
            "items": {
              "type": "string",
              "enum": [
                "sam",
                "ted",
                "uk-fts",
                "uk-cf",
                "canadabuys"
              ],
              "enumTitles": [
                "SAM.gov: US federal contract opportunities",
                "TED: EU and EEA public tenders",
                "Find a Tender: UK public tenders",
                "Contracts Finder: UK (England) tenders and awards",
                "CanadaBuys: Canadian federal tenders"
              ]
            },
            "default": [
              "sam",
              "ted",
              "uk-fts",
              "uk-cf",
              "canadabuys"
            ]
          },
          "noticeTypes": {
            "title": "Notices",
            "enum": [
              "tenders",
              "tenders-and-planning",
              "awards",
              "all"
            ],
            "type": "string",
            "description": "Stage of the procurement. Awards come from SAM.gov, TED and the two UK sources (CanadaBuys open data lists open tenders only).",
            "default": "tenders"
          },
          "daysBack": {
            "title": "Published in the last N days",
            "minimum": 1,
            "maximum": 90,
            "type": "integer",
            "description": "Notices published today and in the previous days (UTC calendar days). SAM.gov publishes its file once a day, so its newest notices are from yesterday.",
            "default": 3
          },
          "countries": {
            "title": "Buyer countries (optional)",
            "type": "array",
            "description": "2-letter codes of the buyer's country, e.g. DE, FR, IE, GB, US, CA. Sources that cannot have such buyers are skipped. Empty = every country.",
            "items": {
              "type": "string"
            }
          },
          "cpvCodes": {
            "title": "CPV codes (EU and UK, optional)",
            "type": "array",
            "description": "Common Procurement Vocabulary prefixes, e.g. 72 (IT services), 48 (software packages), 45 (construction work), 79 (business services), or a full code like 72212000. Used by TED and the UK sources. With a code filter, sources without matching codes are skipped (set NAICS codes too to keep SAM.gov).",
            "items": {
              "type": "string"
            }
          },
          "naicsCodes": {
            "title": "NAICS codes (SAM.gov, optional)",
            "type": "array",
            "description": "NAICS prefixes for US notices, e.g. 5415 (computer systems design), 541511, 236 (construction of buildings). With a code filter, sources without matching codes are skipped (set CPV codes too to keep TED and the UK).",
            "items": {
              "type": "string"
            }
          },
          "excludeKeywords": {
            "title": "Exclude keywords (optional)",
            "type": "array",
            "description": "Drop notices whose title contains one of these words, e.g. \"framework\", \"vehicle\". Dropped notices are free.",
            "items": {
              "type": "string"
            }
          },
          "minValue": {
            "title": "Minimum value (optional)",
            "minimum": 0,
            "type": "integer",
            "description": "Drop notices whose stated estimated value (or award value) is below this amount, in the notice's own currency (EUR, GBP, USD ...). Notices without a stated value are kept."
          },
          "onlyOpen": {
            "title": "Only tenders still open",
            "type": "boolean",
            "description": "Drop tenders whose response deadline has already passed (free). Tenders without a stated deadline are kept.",
            "default": true
          },
          "maxResults": {
            "title": "Max notices",
            "minimum": 1,
            "maximum": 50000,
            "type": "integer",
            "description": "Stop after this many notices (newest first across all sources). In our test week a business day had about 1,900 open tenders on TED, 200-700 SAM.gov solicitations, 110-150 UK tenders and 30 CanadaBuys tenders; with all notice types about 3,600 (TED) and 1,000 (SAM.gov).",
            "default": 1000
          },
          "includeContacts": {
            "title": "Buyer contact",
            "type": "boolean",
            "description": "The contact point the buying organisation published in the notice for bidder questions (email, phone and, when given, the name of the procurement contact). Turn off for a dataset without any personal names or direct contacts (same price).",
            "default": true
          },
          "descriptionChars": {
            "title": "Description length",
            "minimum": 0,
            "maximum": 20000,
            "type": "integer",
            "description": "Longest description kept per notice, in characters (longer ones end with \"…\"). 0 = no description.",
            "default": 3000
          },
          "includeUpdates": {
            "title": "Include amendments",
            "type": "boolean",
            "description": "Also return amended or updated versions of notices (UK tender updates, SAM.gov modifications, CanadaBuys amendments, TED change notices) as separate rows. Off = original notices only.",
            "default": false
          },
          "csvExport": {
            "title": "CSV file",
            "type": "boolean",
            "description": "Also save TENDERS.csv (one row per notice, the main columns) in the run's key-value store, ready for Sheets, Excel or a CRM import. Free.",
            "default": true
          },
          "onlyNew": {
            "title": "Only new notices (for scheduled runs)",
            "type": "boolean",
            "description": "Skip notices returned by earlier runs of the same monitor (free), so a daily schedule with \"last 3 days\" returns each notice once. Notices are remembered for 180 days.",
            "default": false
          },
          "monitorName": {
            "title": "Monitor name",
            "type": "string",
            "description": "Name of the saved state (letters, digits, dashes). Use one name per schedule and a new one when you change the filters; empty = derived from the filters.",
            "default": ""
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}