{
  "openapi": "3.0.1",
  "info": {
    "title": "Licitaciones TED: concursos públicos de la UE",
    "description": "Licitaciones públicas de la UE desde la API oficial de TED, filtradas por país, sector (CPV), importe y plazo. Para pymes que licitan y gestorías: cada aviso con resumen en lenguaje llano y enlace oficial. Fuente: TED, Oficina de Publicaciones de la UE.",
    "version": "0.1",
    "x-build-id": "XiwrKucpsrDpbgdeI"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/daironvf~licitaciones-ted-europa/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-daironvf-licitaciones-ted-europa",
        "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/daironvf~licitaciones-ted-europa/runs": {
      "post": {
        "operationId": "runs-sync-daironvf-licitaciones-ted-europa",
        "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/daironvf~licitaciones-ted-europa/run-sync": {
      "post": {
        "operationId": "run-sync-daironvf-licitaciones-ted-europa",
        "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": {
          "codigosCpv": {
            "title": "Códigos CPV (opcional)",
            "type": "array",
            "description": "Códigos CPV de 8 dígitos (se admite el dígito de control, p. ej. 45000000-7) de los sectores que te interesan: construcción 45000000, servicios informáticos 72000000, limpieza 90900000... Vacío = todos los sectores. Se filtra en el servidor de TED (classification-cpv).",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "diasAtras": {
            "title": "Días hacia atrás",
            "minimum": 1,
            "maximum": 365,
            "type": "integer",
            "description": "Solo licitaciones publicadas en los últimos N días (fecha de publicación en TED).",
            "default": 7
          },
          "importeMinimo": {
            "title": "Importe mínimo estimado (opcional)",
            "minimum": 0,
            "type": "number",
            "description": "Importe estimado mínimo del contrato, en la moneda del aviso (normalmente euros). Las licitaciones que no publican importe estimado se descartan cuando este filtro está activo, porque no se puede acreditar que alcancen el mínimo. 0 = sin mínimo.",
            "default": 0
          },
          "maxResultados": {
            "title": "Máximo de resultados",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Tope de licitaciones devueltas tras aplicar todos los filtros.",
            "default": 200
          },
          "paisesComprador": {
            "title": "Países del comprador (ISO alpha-3 o alpha-2)",
            "type": "array",
            "description": "Países de los organismos compradores, en código ISO alpha-3 (ESP, FRA, DEU...) o alpha-2 (ES, FR, DE...), que se convierte automáticamente. Se filtra en el servidor de TED (buyer-country).",
            "items": {
              "type": "string"
            },
            "default": [
              "ESP"
            ]
          },
          "palabrasClaveTitulo": {
            "title": "Palabras clave en el título (opcional)",
            "type": "array",
            "description": "Solo se devuelven las licitaciones cuyo título contenga alguna de estas palabras (sin distinguir acentos ni mayúsculas). El filtrado se hace sobre los resultados ya descargados. Vacío = sin filtro de título.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "soloPlazoAbierto": {
            "title": "Solo licitaciones con plazo de presentación abierto",
            "type": "boolean",
            "description": "Si está activado, se descartan las licitaciones cuyo plazo de presentación ya terminó y las que no traen fecha límite (no se puede acreditar que sigan abiertas; entre ellas van las adjudicaciones ya resueltas).",
            "default": true
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}