{
  "openapi": "3.0.1",
  "info": {
    "title": "Tender Search & Government Contracts Finder: US, UK & EU TED",
    "description": "Tender search across SAM.gov, USAspending.gov, UK Find a Tender and EU TED in one clean feed. Find open government tenders and awarded contracts; filter by keyword, NAICS or CPV code, country, deadline and value, and get only new notices since your last run as daily bid alerts.",
    "version": "0.1",
    "x-build-id": "tjF4VvraZI4iQAIBr"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/data-done-right~government-contracts-finder/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-data-done-right-government-contracts-finder",
        "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/data-done-right~government-contracts-finder/runs": {
      "post": {
        "operationId": "runs-sync-data-done-right-government-contracts-finder",
        "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/data-done-right~government-contracts-finder/run-sync": {
      "post": {
        "operationId": "run-sync-data-done-right-government-contracts-finder",
        "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": {
          "mode": {
            "title": "What to find",
            "enum": [
              "opportunities",
              "awards",
              "both"
            ],
            "type": "string",
            "description": "Open opportunities (tenders, solicitations, contract notices), awarded contracts, or both.",
            "default": "opportunities"
          },
          "sources": {
            "title": "Sources",
            "type": "array",
            "description": "Official sources to search. SAM.gov needs your free API key (below). USAspending.gov has awarded contracts only.",
            "items": {
              "type": "string",
              "enum": [
                "sam",
                "usaspending",
                "uk",
                "eu"
              ],
              "enumTitles": [
                "US: SAM.gov opportunities (API key)",
                "US: USAspending.gov awards",
                "UK: Find a Tender",
                "EU: TED (Tenders Electronic Daily)"
              ]
            },
            "default": [
              "sam",
              "usaspending",
              "uk",
              "eu"
            ]
          },
          "keywords": {
            "title": "Keywords",
            "type": "array",
            "description": "Keep notices that mention any of these words or phrases (e.g. software, cybersecurity, cleaning services). TED searches the full notice text; Find a Tender and SAM.gov match the title and description; USAspending searches its award text.",
            "items": {
              "type": "string"
            }
          },
          "naicsCodes": {
            "title": "NAICS codes (US)",
            "type": "array",
            "description": "US industry codes, e.g. 541512 (computer systems design). Used by SAM.gov (one request per code) and USAspending.gov. Ignored by UK and EU sources.",
            "items": {
              "type": "string"
            }
          },
          "cpvCodes": {
            "title": "CPV codes (UK and EU)",
            "type": "array",
            "description": "EU procurement codes, e.g. 72000000 (IT services) or 45000000 (construction). Broader codes include their sub-codes. Used by TED and Find a Tender; ignored by US sources.",
            "items": {
              "type": "string"
            }
          },
          "countries": {
            "title": "Countries",
            "type": "array",
            "description": "Optional. Two- or three-letter codes, e.g. US, GB, DE, FRA. US runs the US sources, GB runs Find a Tender, any other code filters TED by buyer country. Empty = all.",
            "items": {
              "type": "string"
            }
          },
          "postedWithinDays": {
            "title": "Posted in the last N days",
            "minimum": 1,
            "maximum": 365,
            "type": "integer",
            "description": "Only notices published in this many days (ignored when 'Posted after' is set).",
            "default": 7
          },
          "postedAfter": {
            "title": "Posted after",
            "type": "string",
            "description": "Optional fixed start date, YYYY-MM-DD. Overrides 'Posted in the last N days'. SAM.gov allows at most one year."
          },
          "deadlineAfter": {
            "title": "Response deadline after",
            "type": "string",
            "description": "Optional, YYYY-MM-DD. Keeps only opportunities whose bid deadline is on or after this date (use today's date for still-open tenders). Notices without a deadline are dropped. Not applied to awards."
          },
          "onlyOpen": {
            "title": "Only still-open opportunities",
            "type": "boolean",
            "description": "Keeps only opportunities whose bid deadline is today or later, checked on each run's date (best for scheduled alerts). Notices without a deadline are dropped. Not applied to awards.",
            "default": false
          },
          "minValue": {
            "title": "Minimum value",
            "minimum": 0,
            "type": "integer",
            "description": "Optional. Minimum estimated value (opportunities) or awarded value (awards), in the notice's own currency (USD, GBP, EUR ...). No currency conversion."
          },
          "keepItemsWithoutValue": {
            "title": "Keep notices without a published value",
            "type": "boolean",
            "description": "Many notices publish no value. With a minimum value set, these are dropped unless you turn this on.",
            "default": false
          },
          "includeEarlyNotices": {
            "title": "Include early-stage notices",
            "type": "boolean",
            "description": "Also return pre-tender notices: SAM.gov sources sought, presolicitation and special notices, UK planning (pipeline) notices and EU prior information notices.",
            "default": false
          },
          "maxItemsPerSource": {
            "title": "Max items per source",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Newest first. Also caps cost.",
            "default": 100
          },
          "onlyNew": {
            "title": "Only notices new since my last run",
            "type": "boolean",
            "description": "Remembers what earlier runs delivered and skips it. Schedule the Actor daily for a bid-alert feed.",
            "default": false
          },
          "samApiKey": {
            "title": "SAM.gov API key",
            "type": "string",
            "description": "Free public API key from SAM.gov (sign in > Account Details > Public API Key). Without it SAM.gov is skipped and the other sources still run. Stored encrypted, never logged or written to the output."
          },
          "samSetAside": {
            "title": "SAM.gov set-aside code",
            "type": "string",
            "description": "Optional, one code: SBA (small business), 8A, HZC (HUBZone), SDVOSBC (service-disabled veteran-owned), WOSB, EDWOSB and others from SAM.gov."
          },
          "samFetchDescriptions": {
            "title": "Fetch full SAM.gov descriptions",
            "type": "boolean",
            "description": "SAM.gov returns descriptions as a separate link. On = one extra API request per notice, which uses up your key's daily request limit fast. Off = the link is in descriptionUrl.",
            "default": false
          },
          "maxRecordsScanned": {
            "title": "Max records scanned per source",
            "minimum": 100,
            "maximum": 50000,
            "type": "integer",
            "description": "Upper limit on raw records read per source before filtering. Raise it for long date windows with narrow filters (Find a Tender is filtered on our side; its requests are paced about 5 seconds apart, 100 records each).",
            "default": 3000
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}