{
  "openapi": "3.0.1",
  "info": {
    "title": "Public Tenders API: Spain, EU & UK (PLACSP, TED) + Alerts",
    "description": "Public tenders from Spain (PLACSP), the EU (TED) and the UK (Find a Tender, Contracts Finder) in one JSON format, with CPV/keyword/value filters and a new-only alert mode for daily schedules. From 0.0015 USD per tender.",
    "version": "0.1",
    "x-build-id": "ATOIyQCM68AZx7tR3"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/flets_sv~public-tenders-spain-eu-uk/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-flets_sv-public-tenders-spain-eu-uk",
        "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/flets_sv~public-tenders-spain-eu-uk/runs": {
      "post": {
        "operationId": "runs-sync-flets_sv-public-tenders-spain-eu-uk",
        "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/flets_sv~public-tenders-spain-eu-uk/run-sync": {
      "post": {
        "operationId": "run-sync-flets_sv-public-tenders-spain-eu-uk",
        "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": {
          "paises": {
            "title": "Countries (ISO 2-letter codes)",
            "type": "array",
            "description": "Country of the contracting authority, as ISO 3166-1 alpha-2 codes. ES = Spain (source PLACSP), GB = United Kingdom (Find a Tender + Contracts Finder), any other EU/EEA code such as FR, DE, IT, PT, PL = TED. Example: [\"ES\", \"FR\"]. Empty list means every country (slower and returns more results).",
            "default": [
              "ES"
            ],
            "items": {
              "type": "string"
            }
          },
          "fuentes": {
            "title": "Sources",
            "type": "array",
            "description": "Restrict to some sources: \"placsp\" (Spanish national platform), \"ted\" (EU official API) and/or \"uk\" (UK official APIs). Empty list means all three. Example: [\"placsp\", \"ted\"].",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "palabrasClave": {
            "title": "Keywords (any of them)",
            "type": "array",
            "description": "A tender matches if its title, buyer or description contains ANY keyword. Case and accents are ignored. Use the language of the notice. Example: [\"software\", \"ciberseguridad\"]. Empty list means no keyword filter.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "cpv": {
            "title": "CPV code prefixes",
            "type": "array",
            "description": "Common Procurement Vocabulary prefixes (2 to 8 digits). A tender matches if any of its CPV codes starts with any prefix. Example: [\"72\", \"48\"] for IT services and software, [\"45\"] for construction, [\"90\"] for cleaning and waste. Empty list means no CPV filter.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "importeMin": {
            "title": "Minimum value",
            "minimum": 0,
            "type": "number",
            "description": "Minimum estimated value in the currency of the notice (EUR for Spain and the EU, GBP for the UK). Notices without a declared value are excluded when this is above 0. 0 means no minimum. Example: 50000.",
            "default": 0
          },
          "importeMax": {
            "title": "Maximum value",
            "minimum": 0,
            "type": "number",
            "description": "Maximum estimated value in the currency of the notice. Notices without a declared value are excluded when this is above 0. 0 means no maximum. Example: 2000000.",
            "default": 0
          },
          "tipoAviso": {
            "title": "Notice type",
            "enum": [
              "licitaciones",
              "adjudicaciones",
              "todos"
            ],
            "type": "string",
            "description": "\"licitaciones\" = tenders open for bids, \"adjudicaciones\" = award notices (who won and for how much), \"todos\" = both.",
            "default": "licitaciones"
          },
          "diasAtras": {
            "title": "Published in the last N days",
            "minimum": 1,
            "maximum": 60,
            "type": "integer",
            "description": "Only notices published or updated in this window (1 to 60). Ignored if fechaDesde is set. For a daily alert use 2, for a weekly alert use 8.",
            "default": 2
          },
          "fechaDesde": {
            "title": "Published since (date)",
            "type": "string",
            "description": "Optional start date in YYYY-MM-DD format. Overrides diasAtras. Example: 2026-11-01. Leave empty to use diasAtras.",
            "default": ""
          },
          "soloAbiertas": {
            "title": "Only tenders still open",
            "type": "boolean",
            "description": "Skip tenders whose submission deadline has already passed. Does not affect award notices.",
            "default": true
          },
          "soloNuevas": {
            "title": "Only new since last run (alerts)",
            "type": "boolean",
            "description": "Alert mode. Returns only tenders not returned by a previous run with the same claveAlerta (and, therefore, you are only charged for new ones). The memory lives in your account, in the named key-value store licitaciones-espana-ue-vistas. Schedule the Actor daily and use this switch.",
            "default": false
          },
          "claveAlerta": {
            "title": "Alert name",
            "type": "string",
            "description": "Name that isolates the memory of one alert from another when soloNuevas is on. Use a different name per search, for example \"ti-madrid\" and \"obras-francia\". Letters, digits, dot, dash and underscore.",
            "default": "default"
          },
          "maxResultados": {
            "title": "Max results",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Maximum number of tenders returned (1 to 10000). It is also your spending cap: you pay one event per result.",
            "default": 20
          },
          "paginasPlacsp": {
            "title": "PLACSP pages to read",
            "minimum": 1,
            "maximum": 60,
            "type": "integer",
            "description": "How many pages (about 500 entries each, newest first) of the Spanish PLACSP feed to read at most. Raise it if you search more than 2 days back or use narrow filters. 1 to 60.",
            "default": 6
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}