{
  "openapi": "3.0.1",
  "info": {
    "title": "TED Tenders Scraper (EU & US Public Procurement Data)",
    "description": "Monitor new EU procurement notices on TED and U.S. federal contract awards on USAspending. Saved searches, source filter, unified schema and delta-only results. Public data, pay per new result.",
    "version": "0.2",
    "x-build-id": "ec1XIjoRhZRIWcm5P"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/steadfetch~ted-tender-monitor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-steadfetch-ted-tender-monitor",
        "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/steadfetch~ted-tender-monitor/runs": {
      "post": {
        "operationId": "runs-sync-steadfetch-ted-tender-monitor",
        "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/steadfetch~ted-tender-monitor/run-sync": {
      "post": {
        "operationId": "run-sync-steadfetch-ted-tender-monitor",
        "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",
        "required": [
          "queries"
        ],
        "properties": {
          "source": {
            "title": "Source",
            "enum": [
              "ted",
              "usaspending",
              "all"
            ],
            "type": "string",
            "description": "Which data source to query. 'all' runs both TED and USAspending for every applicable saved query.",
            "default": "all"
          },
          "queries": {
            "title": "Saved queries",
            "minItems": 1,
            "maxItems": 50,
            "type": "array",
            "description": "One to 50 saved searches. TED filters: text, cpv, countries, minValueEur. USAspending filters: text, agencies, naics. A query with only TED filters runs on TED only, a query with only USAspending filters runs on USAspending only, and a query with text only (or no filters) runs on both sources.",
            "items": {
              "type": "object",
              "additionalProperties": false,
              "properties": {
                "text": {
                  "title": "Free text",
                  "type": "string",
                  "description": "Keywords matched by the source search engine.",
                  "editor": "textfield",
                  "example": "software"
                },
                "cpv": {
                  "title": "CPV codes (TED)",
                  "type": "array",
                  "description": "CPV code or prefix, e.g. 48000000 or 48. Matched against TED notices.",
                  "editor": "stringList",
                  "items": {
                    "type": "string"
                  },
                  "example": [
                    "48000000"
                  ]
                },
                "countries": {
                  "title": "Buyer countries (TED)",
                  "type": "array",
                  "description": "Buyer country codes (ISO2 or ISO3), e.g. ES or ESP. Empty means all TED countries.",
                  "editor": "stringList",
                  "items": {
                    "type": "string"
                  },
                  "example": [
                    "ES"
                  ]
                },
                "minValueEur": {
                  "title": "Minimum value in EUR (TED)",
                  "type": "number",
                  "description": "Only TED notices whose published estimated value is at least this amount in EUR. Notices without a published value are excluded when this filter is set.",
                  "editor": "number",
                  "minimum": 0,
                  "example": 100000
                },
                "agencies": {
                  "title": "Awarding agencies (USAspending)",
                  "type": "array",
                  "description": "Top-tier U.S. awarding agencies by name, slug or abbreviation, e.g. Department of Energy or DOE.",
                  "editor": "stringList",
                  "items": {
                    "type": "string"
                  },
                  "example": [
                    "Department of Energy"
                  ]
                },
                "naics": {
                  "title": "NAICS code (USAspending)",
                  "type": "string",
                  "description": "NAICS industry code used by the USAspending search, e.g. 511210.",
                  "editor": "textfield",
                  "example": "511210"
                }
              }
            }
          },
          "maxResults": {
            "title": "Max new results",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Maximum number of new notices delivered to the dataset in this run, across all sources and queries. Only new rows are billed.",
            "default": 500
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}