{
  "openapi": "3.0.1",
  "info": {
    "title": "Basque Country Tenders Scraper — Euskadi Public Contracts",
    "description": "Scrape the Basque Country public procurement announcements index (Basque Government, provincial councils and town halls) from the official Open Data Euskadi catalogue. Anuncios de contratación pública del País Vasco, con volcado anual o solo anuncios en plazo.",
    "version": "0.1",
    "x-build-id": "NmdhtA9yVapTsatGy"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/xamto1987~euskadi-tenders/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-xamto1987-euskadi-tenders",
        "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/xamto1987~euskadi-tenders/runs": {
      "post": {
        "operationId": "runs-sync-xamto1987-euskadi-tenders",
        "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/xamto1987~euskadi-tenders/run-sync": {
      "post": {
        "operationId": "run-sync-xamto1987-euskadi-tenders",
        "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": {
          "fuente": {
            "title": "Fuente / Source",
            "enum": [
              "abiertos",
              "anio"
            ],
            "type": "string",
            "description": "`abiertos` (por defecto) = solo los anuncios ACTUALMENTE en plazo de presentación de ofertas (volcado pequeño, se actualiza a diario, ejecución rápida). `anio` = volcado histórico completo de un año concreto (`anio`), mucho más grande (decenas de miles de filas) e incluye anuncios ya cerrados/adjudicados. / `abiertos` = currently open tenders only (small, daily, fast). `anio` = full historical yearly dump (much larger).",
            "default": "abiertos"
          },
          "anio": {
            "title": "Año (solo si fuente=anio) / Year (only if fuente=anio)",
            "minimum": 2005,
            "maximum": 2026,
            "type": "integer",
            "description": "Año del volcado histórico a descargar. Disponible desde 2005. Se ignora si `fuente` es `abiertos`. ⚠️ Los volcados anuales recientes tienen decenas de miles de filas (el de 2025 pesa ~230 MB): la ejecución puede tardar varios minutos solo en descargar el fichero. / Year of the historical dump; ignored when `fuente` is `abiertos`. Recent years are large (tens of thousands of rows).",
            "default": 2025
          },
          "keywords": {
            "title": "Palabras clave / Keywords",
            "type": "array",
            "description": "Lista de términos a buscar en el título y objeto del contrato. ⚠️ Filtro EN CLIENTE: esta fuente no ofrece parámetros de búsqueda en servidor (verificado con curl, no expone `?q=`). Vacío = sin filtro. / Client-side filter — this source has no server-side query API (verified with curl).",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "soloContratoMenor": {
            "title": "Solo contratos menores / Minor contracts only",
            "type": "boolean",
            "description": "Filtra (en cliente) solo anuncios marcados como contrato menor por la propia fuente. / Client-side filter for minor (direct-award) contracts only.",
            "default": false
          },
          "fechaDesde": {
            "title": "Fecha desde / Date from",
            "type": "string",
            "description": "Solo anuncios publicados a partir de esta fecha (filtro EN CLIENTE, formato ISO AAAA-MM-DD). / Client-side date filter, ISO format."
          },
          "fechaHasta": {
            "title": "Fecha hasta / Date to",
            "type": "string",
            "description": "Solo anuncios publicados hasta esta fecha (filtro EN CLIENTE, formato ISO AAAA-MM-DD). / Client-side date filter, ISO format."
          },
          "maxItems": {
            "title": "Máximo de resultados / Max items",
            "minimum": 1,
            "maximum": 200000,
            "type": "integer",
            "description": "Número máximo de anuncios a guardar en el dataset. El actor para limpiamente al alcanzarlo. / Hard cap on dataset items.",
            "default": 200
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}