{
  "openapi": "3.0.1",
  "info": {
    "title": "Licitaciones y contratos menores de España (PLACSP)",
    "description": "Licitaciones y contratos menores de la Plataforma de Contratación del Sector Público en JSON limpio: filtra por CPV, provincia, órgano, importe, estado y plazo; incluye adjudicatario, actas y modificaciones.",
    "version": "0.0",
    "x-build-id": "fVkV46iJrJeH1wsZF"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/nowera~licitaciones-contratos-espana/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-nowera-licitaciones-contratos-espana",
        "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/nowera~licitaciones-contratos-espana/runs": {
      "post": {
        "operationId": "runs-sync-nowera-licitaciones-contratos-espana",
        "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/nowera~licitaciones-contratos-espana/run-sync": {
      "post": {
        "operationId": "run-sync-nowera-licitaciones-contratos-espana",
        "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": {
          "dataset": {
            "title": "Conjunto de datos",
            "enum": [
              "licitaciones",
              "contratosMenores"
            ],
            "type": "string",
            "description": "licitaciones: licitaciones de la Plataforma de Contratacion del Sector Publico. contratosMenores: contratos menores publicados en los perfiles del contratante.",
            "default": "licitaciones"
          },
          "keywords": {
            "title": "Palabras clave",
            "type": "array",
            "description": "Solo se guardan registros cuyo titulo o expediente contenga alguna de estas palabras (vacio = todos).",
            "items": {
              "type": "string"
            }
          },
          "cpvCodes": {
            "title": "Codigos CPV",
            "type": "array",
            "description": "Prefijos CPV. Ej: 72 (servicios informaticos), 4521 (obras de edificacion). Vacio = todos. Algunos contratos menores no informan CPV.",
            "items": {
              "type": "string"
            }
          },
          "contractType": {
            "title": "Tipo de contrato",
            "enum": [
              "Todos",
              "Suministros",
              "Servicios",
              "Obras",
              "Administrativo especial",
              "Privado",
              "Gestión de Servicios Públicos",
              "Concesión de Servicios",
              "Concesión de Obras Públicas",
              "Concesión de Obras",
              "Patrimonial"
            ],
            "type": "string",
            "description": "Filtra por tipo de contrato. 'Todos' no filtra.",
            "default": "Todos"
          },
          "status": {
            "title": "Estado",
            "enum": [
              "-- Todos --",
              "Anuncio Previo",
              "Publicada",
              "Evaluación",
              "Adjudicada",
              "Resuelta",
              "Anulada"
            ],
            "type": "string",
            "description": "Los contratos menores solo aparecen como Resuelta.",
            "default": "-- Todos --"
          },
          "publishedFrom": {
            "title": "Desde (AAAA-MM-DD)",
            "type": "string",
            "description": "Por defecto, hace 7 dias. Filtra por fecha de ultima actualizacion del registro."
          },
          "publishedTo": {
            "title": "Hasta (AAAA-MM-DD)",
            "type": "string",
            "description": "Por defecto, hoy."
          },
          "onlyOpen": {
            "title": "Solo licitaciones abiertas a ofertas",
            "type": "boolean",
            "description": "Por defecto SOLO se devuelven licitaciones en estado Publicada con el plazo de presentacion sin vencer. Pon false para incluir tambien las cerradas, adjudicadas y resueltas. No se aplica en contratos menores ni cuando eliges un estado concreto. Si no indicas fecha 'Desde', se revisan las paginas mas recientes del feed (ver 'Maximo de paginas')."
          },
          "deadlineFrom": {
            "title": "Plazo de presentacion desde (AAAA-MM-DD)",
            "type": "string",
            "description": "Solo licitaciones cuyo plazo de presentacion de ofertas termina a partir de esta fecha. Solo licitaciones."
          },
          "deadlineTo": {
            "title": "Plazo de presentacion hasta (AAAA-MM-DD)",
            "type": "string",
            "description": "Solo licitaciones cuyo plazo de presentacion de ofertas termina como tarde en esta fecha. Solo licitaciones."
          },
          "places": {
            "title": "Provincias o localidades",
            "type": "array",
            "description": "Texto a buscar en el lugar de ejecucion y la ciudad del organo (sin distinguir tildes ni mayusculas). Ej: Ourense, Sevilla, Gran Canaria.",
            "items": {
              "type": "string"
            }
          },
          "nutsCodes": {
            "title": "Codigos NUTS",
            "type": "array",
            "description": "Prefijos NUTS del lugar de ejecucion. Ej: ES11 (Galicia), ES30 (Madrid), ES51 (Cataluña), ES113 (Ourense).",
            "items": {
              "type": "string"
            }
          },
          "buyers": {
            "title": "Organo de contratacion",
            "type": "array",
            "description": "Texto a buscar en el nombre del organo de contratacion. Ej: Ayuntamiento de Vigo, Ministerio de Defensa.",
            "items": {
              "type": "string"
            }
          },
          "minAmount": {
            "title": "Importe minimo (EUR)",
            "type": "integer",
            "description": "Importe minimo sin IVA, en euros."
          },
          "maxAmount": {
            "title": "Importe maximo (EUR)",
            "type": "integer",
            "description": "Importe maximo sin IVA, en euros."
          },
          "maxItems": {
            "title": "Maximo de resultados",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Numero maximo de registros a devolver. Controla el coste de la ejecucion.",
            "default": 100
          },
          "maxPages": {
            "title": "Maximo de paginas del feed",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Cada pagina son ~500 registros (unas 6-8 horas de actividad en licitaciones). Limita el coste en rangos amplios.",
            "default": 40
          },
          "atomFeedUrl": {
            "title": "URL del feed ATOM (avanzado)",
            "type": "string",
            "description": "Sustituye al conjunto elegido. Permite otros feeds oficiales de datos abiertos con la misma estructura (por ejemplo encargos a medios propios)."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}