{
  "openapi": "3.0.1",
  "info": {
    "title": "Public Tenders Feed (unofficial TED + SAM.gov)",
    "description": "Unofficial search of newly published public-procurement notices from the EU TED Search API, plus US SAM.gov opportunities when you supply your own API key. One normalized row per notice.",
    "version": "0.1",
    "x-build-id": "p4zotzpqJnfgKvnK6"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/plusonets~public-tenders-feed/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-plusonets-public-tenders-feed",
        "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/plusonets~public-tenders-feed/runs": {
      "post": {
        "operationId": "runs-sync-plusonets-public-tenders-feed",
        "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/plusonets~public-tenders-feed/run-sync": {
      "post": {
        "operationId": "run-sync-plusonets-public-tenders-feed",
        "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 to find. TED searches the full notice text (stemmed). SAM.gov searches the opportunity title only, which is all the public Opportunities API supports. Leave the list empty to search by date, CPV, NAICS, country, or notice type alone. The default keyword is software.",
            "default": [
              "software"
            ],
            "items": {
              "type": "string"
            }
          },
          "cpvCodes": {
            "title": "CPV codes",
            "type": "array",
            "description": "EU Common Procurement Vocabulary codes for TED. Use 8 digits (72000000), a code with a check digit (72000000-1), or a shorter prefix such as 72. A prefix matches the whole branch. Ignored by SAM.gov.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "naicsCodes": {
            "title": "NAICS codes",
            "type": "array",
            "description": "6-digit NAICS codes for SAM.gov. The API parameter is ncode. Shorter codes are rejected here because SAM.gov does not treat them as prefixes. Ignored by TED.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "countries": {
            "title": "Countries",
            "type": "array",
            "description": "ISO 3166-1 alpha-2 or alpha-3 buyer countries, for example FR, DEU, or SWE. TED filters on buyer country. SAM.gov is US-only: it is queried when this list is empty or includes US or USA, and skipped otherwise.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "dateFrom": {
            "title": "Published from",
            "type": "string",
            "description": "First publication day, YYYY-MM-DD, inclusive. Leave both date fields empty to search yesterday and today in the Europe/Brussels calendar, which is the TED publication clock."
          },
          "dateTo": {
            "title": "Published to",
            "type": "string",
            "description": "Last publication day, YYYY-MM-DD, inclusive. The range can cover at most 365 days."
          },
          "noticeTypes": {
            "title": "Notice types",
            "type": "array",
            "description": "Optional. Leave empty for every type in the date window. TED eForms codes include cn-standard, cn-social, cn-desg, pin-cfc-standard, pin-cfc-social, pin-only, pin-rtl, pin-buyer, pin-tran, can-standard, can-social, can-desg, can-modif, can-tran, pmc, qu-sy, subco, veat, compl, brin-ecs, and brin-eeig. SAM.gov ptype codes: o solicitation, k combined synopsis/solicitation, p pre-solicitation, r sources sought, s special notice, a award, u justification, g surplus sale, i intent to bundle. Each code is sent only to the source that uses it.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "maxResults": {
            "title": "Maximum notices",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Stop after this many saved notices, across both sources. Already seen notices are not counted when Only new notices is on.",
            "default": 10
          },
          "sources": {
            "title": "Sources",
            "minItems": 1,
            "uniqueItems": true,
            "type": "array",
            "description": "ted calls the EU TED Search API and needs no key. sam calls the US SAM.gov Opportunities API and needs samGovApiKey.",
            "items": {
              "type": "string",
              "enum": [
                "ted",
                "sam"
              ],
              "enumTitles": [
                "EU TED",
                "US SAM.gov (your API key)"
              ]
            },
            "default": [
              "ted"
            ]
          },
          "onlyNew": {
            "title": "Only new notices",
            "type": "boolean",
            "description": "When on, skip notice ids already saved by a previous run and remember the ids you save now. State is kept in the named key-value store public-tenders-feed-state. Leave this off for the default run: a scheduled watch that finds nothing new is a successful empty dataset, and the Apify daily test needs the default input to return notices.",
            "default": false
          },
          "samGovApiKey": {
            "title": "SAM.gov API key",
            "type": "string",
            "description": "Your own public API key from the SAM.gov Account Details page. It is a secret input, sent only to api.sam.gov, and never written to the dataset or the log. Leave it empty when you search TED only."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}