{
  "openapi": "3.0.1",
  "info": {
    "title": "Spain public tenders (PLACSP) to JSON | Licitaciones España",
    "description": "Spanish public procurement tenders from the official PLACSP feed as clean JSON, filtered by CPV, province (NUTS), value, contract type, status and keywords. Licitaciones de la Plataforma de Contratación del Sector Público en JSON limpio.",
    "version": "0.4",
    "x-build-id": "4391lgWTt0r3K91Ca"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/fixandfocus~licitaciones-espana/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-fixandfocus-licitaciones-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/fixandfocus~licitaciones-espana/runs": {
      "post": {
        "operationId": "runs-sync-fixandfocus-licitaciones-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/fixandfocus~licitaciones-espana/run-sync": {
      "post": {
        "operationId": "run-sync-fixandfocus-licitaciones-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": {
          "estados": {
            "title": "Estados",
            "type": "array",
            "description": "PRE anuncio previo, PUB en plazo, EV pendiente de adjudicación, ADJ adjudicada, RES resuelta, ANUL anulada.",
            "items": {
              "type": "string",
              "enum": [
                "PRE",
                "PUB",
                "EV",
                "ADJ",
                "RES",
                "ANUL"
              ]
            },
            "default": [
              "PUB"
            ]
          },
          "cpv": {
            "title": "Códigos CPV (prefijos)",
            "type": "array",
            "description": "Prefijos CPV, p. ej. 72 (servicios informáticos) o 45 (construcción). Vacío = todos.",
            "items": {
              "type": "string"
            }
          },
          "nuts": {
            "title": "Provincias / regiones (prefijos NUTS)",
            "type": "array",
            "description": "Prefijos NUTS, p. ej. ES30 (Madrid), ES51 (Cataluña), ES61 (Andalucía). Vacío = toda España.",
            "items": {
              "type": "string"
            }
          },
          "tiposContrato": {
            "title": "Tipos de contrato",
            "type": "array",
            "description": "1 Suministros, 2 Servicios, 3 Obras, 21 Gestión de Servicios Públicos, 22 Concesión de Servicios, 31 Concesión de Obras Públicas, 32 Concesión de Obras, 40 Colaboración público-privada, 7 Administrativo especial, 8 Privado, 50 Patrimonial.",
            "items": {
              "type": "string",
              "enum": [
                "1",
                "2",
                "3",
                "21",
                "22",
                "31",
                "32",
                "40",
                "7",
                "8",
                "50"
              ]
            }
          },
          "importeMinimo": {
            "title": "Importe mínimo sin IVA (€)",
            "minimum": 0,
            "type": "integer",
            "description": "Descarta licitaciones con importe sin IVA (o valor estimado) inferior a esta cifra."
          },
          "importeMaximo": {
            "title": "Importe máximo sin IVA (€)",
            "minimum": 0,
            "type": "integer",
            "description": "Descarta licitaciones con importe sin IVA (o valor estimado) superior a esta cifra."
          },
          "palabrasClave": {
            "title": "Palabras clave",
            "type": "array",
            "description": "Alguna debe aparecer en el título o en el órgano de contratación.",
            "items": {
              "type": "string"
            }
          },
          "soloAbiertas": {
            "title": "Solo con plazo de presentación abierto",
            "type": "boolean",
            "description": "Solo licitaciones cuya fecha límite de presentación no ha pasado.",
            "default": true
          },
          "maxResultados": {
            "title": "Máximo de licitaciones",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Número máximo de licitaciones a guardar (y a cobrar).",
            "default": 50
          },
          "maxPaginas": {
            "title": "Máximo de páginas del feed (250 entradas cada una)",
            "minimum": 1,
            "maximum": 40,
            "type": "integer",
            "description": "Cuántas páginas del feed oficial revisar; cada página tiene unas 250 entradas recientes.",
            "default": 4
          }
        }
      },
      "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}