{
  "openapi": "3.0.1",
  "info": {
    "title": "Government Tenders Scraper: SAM.gov, TED EU, UK & World Bank",
    "description": "US, EU, UK and World Bank public tenders in one search and one item shape: SAM.gov, TED, Find a Tender, Contracts Finder and World Bank-financed projects by keyword, CPV or NAICS code, country or stage. Buyers, deadlines, values, winners, documents, and new tender alerts.",
    "version": "0.1",
    "x-build-id": "BdUoeQGMo9PB8mHpQ"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/pikoulas~government-tenders/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-pikoulas-government-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/pikoulas~government-tenders/runs": {
      "post": {
        "operationId": "runs-sync-pikoulas-government-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/pikoulas~government-tenders/run-sync": {
      "post": {
        "operationId": "run-sync-pikoulas-government-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": {
          "keywords": {
            "title": "Keywords",
            "type": "array",
            "description": "Words or phrases in the notice's title or description (TED: its full text, in any language): cybersecurity, cloud services, cleaning. A notice with any of them is kept; leave empty for all.",
            "items": {
              "type": "string"
            }
          },
          "countries": {
            "title": "Buyer countries",
            "type": "array",
            "description": "Two- or three-letter codes: US reads SAM.gov, GB Find a Tender and Contracts Finder, a European country TED (DE, FRA, PL), a World Bank borrower the World Bank (KE, IND, BR). Empty for all.",
            "items": {
              "type": "string"
            }
          },
          "stages": {
            "title": "Stages",
            "type": "array",
            "description": "Empty for all, notices of sale and contract changes too.",
            "items": {
              "type": "string",
              "enum": [
                "planning",
                "tender",
                "award"
              ],
              "enumTitles": [
                "Planning (prior information, presolicitations, sources sought, World Bank general notices)",
                "Open tenders (solicitations, contract notices)",
                "Awards (contract awards, justifications)"
              ]
            }
          },
          "publishedWithinDays": {
            "title": "Published within (days)",
            "minimum": 0,
            "type": "integer",
            "description": "Only notices published in the last this many days; 1 for a daily schedule. 0 for no limit (SAM.gov keeps only active notices; the UK feeds go back 10 years, read until the limit below).",
            "default": 7
          },
          "hidePassedDeadlines": {
            "title": "Only open for bids",
            "type": "boolean",
            "description": "Leave out notices whose response deadline has passed. Those without a deadline are kept.",
            "default": false
          },
          "cpvCodes": {
            "title": "CPV codes (TED, UK)",
            "type": "array",
            "description": "Common Procurement Vocabulary codes, each with everything under it: 72 (IT services), 7221, 45000000-7. With CPV codes and no NAICS or PSC code, SAM.gov isn't read; with any code, the World Bank isn't.",
            "items": {
              "type": "string"
            }
          },
          "naicsCodes": {
            "title": "NAICS codes (SAM.gov)",
            "type": "array",
            "description": "Each with everything under it: 5415 (computer systems design), 541512. With NAICS or PSC codes and no CPV code, only SAM.gov is read.",
            "items": {
              "type": "string"
            }
          },
          "pscCodes": {
            "title": "PSC codes (SAM.gov)",
            "type": "array",
            "description": "Product and Service Codes, each with everything under it: D3 (IT services), R425.",
            "items": {
              "type": "string"
            }
          },
          "setAsides": {
            "title": "Set-asides (SAM.gov)",
            "type": "array",
            "description": "Small-business set-asides: SAM.gov only, so with one the other sources aren't read.",
            "items": {
              "type": "string",
              "enum": [
                "SBA",
                "SBP",
                "8A",
                "8AN",
                "HZC",
                "HZS",
                "SDVOSBC",
                "SDVOSBS",
                "WOSB",
                "WOSBSS",
                "EDWOSB",
                "EDWOSBSS",
                "VSA",
                "ISBEE",
                "IEE",
                "BICiv",
                "LAS",
                "ESB",
                "NONE"
              ],
              "enumTitles": [
                "Total small business (SBA)",
                "Partial small business (SBP)",
                "8(a) set-aside",
                "8(a) sole source",
                "HUBZone set-aside",
                "HUBZone sole source",
                "Service-disabled veteran-owned set-aside (SDVOSB)",
                "Service-disabled veteran-owned sole source",
                "Women-owned small business (WOSB)",
                "WOSB sole source",
                "Economically disadvantaged WOSB (EDWOSB)",
                "EDWOSB sole source",
                "Veteran-owned, VA only (VSA)",
                "Indian small business economic enterprise (ISBEE)",
                "Indian economic enterprise (IEE)",
                "Buy Indian, IHS only",
                "Local area set-aside",
                "Emerging small business",
                "No set-aside used"
              ]
            }
          },
          "sources": {
            "title": "Sources",
            "type": "array",
            "description": "Empty for all five.",
            "items": {
              "type": "string",
              "enum": [
                "sam-gov",
                "ted",
                "find-a-tender",
                "contracts-finder",
                "world-bank"
              ],
              "enumTitles": [
                "SAM.gov (US federal)",
                "TED (EU and Europe)",
                "Find a Tender (UK)",
                "Contracts Finder (UK)",
                "World Bank (projects it finances)"
              ]
            }
          },
          "language": {
            "title": "Language",
            "enum": [
              "eng",
              "deu",
              "fra",
              "spa",
              "ita",
              "pol",
              "nld",
              "por",
              "ron",
              "swe",
              "ces",
              "dan",
              "fin",
              "ell",
              "hun",
              "slk",
              "slv",
              "bul",
              "hrv",
              "lit",
              "lav",
              "est",
              "gle",
              "mlt"
            ],
            "type": "string",
            "description": "TED's titles, descriptions and buyers' names in this language where the notice has it; otherwise English, then the notice's own.",
            "default": "eng"
          },
          "maxResultsPerSource": {
            "title": "Max notices per source",
            "minimum": 0,
            "type": "integer",
            "description": "Newest first; 0 for all that match.",
            "default": 1000
          },
          "onlyNew": {
            "title": "Only new notices",
            "type": "boolean",
            "description": "Give, and charge for, only the notices no earlier run with the same memory gave. Schedule it daily for new tender alerts.",
            "default": false
          },
          "memory": {
            "title": "Memory name",
            "type": "string",
            "description": "One per alert, so two schedules don't share a memory. Kept in your account's key-value store government-tenders-memory for 90 days.",
            "default": "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}