{
  "openapi": "3.0.1",
  "info": {
    "title": "Subvenciones y ayudas públicas de España (BDNS)",
    "description": "Convocatorias de subvenciones y ayudas de toda España (BDNS) en JSON limpio: filtra por región, beneficiario, finalidad, plazo y presupuesto; incluye bases y documentos.",
    "version": "0.0",
    "x-build-id": "SB803lkqbFN5pU4lW"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/nowera~subvenciones-ayudas-espana/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-nowera-subvenciones-ayudas-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~subvenciones-ayudas-espana/runs": {
      "post": {
        "operationId": "runs-sync-nowera-subvenciones-ayudas-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~subvenciones-ayudas-espana/run-sync": {
      "post": {
        "operationId": "run-sync-nowera-subvenciones-ayudas-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": {
          "keywords": {
            "title": "Palabras clave",
            "type": "array",
            "description": "Se guardan convocatorias cuya descripción contenga alguna de estas palabras (vacío = todas). Usa palabras sueltas, p. ej. digitalización, empleo, turismo.",
            "items": {
              "type": "string"
            }
          },
          "regions": {
            "title": "Regiones",
            "type": "array",
            "description": "Comunidad, provincia o isla (p. ej. Galicia, Ourense, Gran Canaria) o código NUTS (p. ej. ES11). Incluye las provincias de cada comunidad. Vacío = toda España.",
            "items": {
              "type": "string"
            }
          },
          "beneficiaryTypes": {
            "title": "Tipo de beneficiario",
            "type": "array",
            "description": "Quién puede solicitar la ayuda. Vacío = todos.",
            "items": {
              "type": "string",
              "enum": [
                "Pymes y autónomos",
                "Gran empresa",
                "Personas jurídicas sin actividad económica (asociaciones, entidades)",
                "Personas físicas sin actividad económica"
              ]
            }
          },
          "purposes": {
            "title": "Finalidad",
            "type": "array",
            "description": "Política o área de la ayuda. Vacío = todas.",
            "items": {
              "type": "string",
              "enum": [
                "Acceso a la vivienda y fomento de la edificación",
                "Agricultura, pesca y alimentación",
                "Comercio, turismo y pymes",
                "Cooperación internacional para el desarrollo y cultural",
                "Cultura",
                "Defensa",
                "Desempleo",
                "Educación",
                "Fomento del empleo",
                "Industria y energía",
                "Infraestructuras",
                "Investigación, desarrollo e innovación",
                "Justicia",
                "Otras actuaciones de carácter económico",
                "Otras prestaciones económicas",
                "Sanidad",
                "Seguridad ciudadana e instituciones penitenciarias",
                "Servicios sociales y promoción social",
                "Subvenciones al transporte"
              ]
            }
          },
          "administrationLevel": {
            "title": "Ámbito de la administración",
            "enum": [
              "Todos",
              "Estatal",
              "Autonómica",
              "Local",
              "Otros"
            ],
            "type": "string",
            "description": "Estatal, autonómica, local u otros organismos. «Todos» no filtra.",
            "default": "Todos"
          },
          "competition": {
            "title": "Tipo de convocatoria",
            "enum": [
              "Todas",
              "Concurrencia competitiva",
              "Concesión directa"
            ],
            "type": "string",
            "description": "Concurrencia competitiva (ayudas abiertas a solicitudes de cualquiera que cumpla los requisitos) o concesión directa (convenios y ayudas nominativas, casi siempre a un destinatario concreto). «Todas» no filtra.",
            "default": "Todas"
          },
          "onlyOpen": {
            "title": "Solo convocatorias abiertas",
            "type": "boolean",
            "description": "Si está activado (valor por defecto), solo se devuelven convocatorias abiertas a solicitudes: con plazo vigente, sin fecha de fin o con apertura próxima. Desactívalo para incluir también las cerradas."
          },
          "includeUnknownDeadline": {
            "title": "Incluir las que no informan plazo",
            "type": "boolean",
            "description": "Muchas convocatorias solo describen el plazo en texto (campo plazoSolicitudTexto) y no informan fechas. Actívalo para incluirlas aunque no se pueda confirmar que estén abiertas; el campo estadoPlazo vale «Sin datos de plazo».",
            "default": false
          },
          "deadlineFrom": {
            "title": "Fin de plazo desde",
            "type": "string",
            "description": "Solo convocatorias cuyo plazo de solicitud termina a partir de esta fecha (AAAA-MM-DD). Excluye las que no informan fecha de fin."
          },
          "deadlineTo": {
            "title": "Fin de plazo hasta",
            "type": "string",
            "description": "Solo convocatorias cuyo plazo de solicitud termina hasta esta fecha (AAAA-MM-DD). Excluye las que no informan fecha de fin."
          },
          "minBudget": {
            "title": "Presupuesto mínimo (EUR)",
            "minimum": 0,
            "type": "integer",
            "description": "Presupuesto total mínimo de la convocatoria en euros."
          },
          "maxBudget": {
            "title": "Presupuesto máximo (EUR)",
            "minimum": 0,
            "type": "integer",
            "description": "Presupuesto total máximo de la convocatoria en euros."
          },
          "buyers": {
            "title": "Organismo convocante",
            "type": "array",
            "description": "Texto en el nombre del organismo que convoca (p. ej. Xunta, Ayuntamiento de Vigo, Ministerio de Industria). Cualquiera de ellos.",
            "items": {
              "type": "string"
            }
          },
          "publishedFrom": {
            "title": "Registrada desde",
            "type": "string",
            "description": "Fecha de registro de la convocatoria en la BDNS, desde (AAAA-MM-DD). Por defecto, los últimos 30 días. Las convocatorias abiertas con registro más antiguo solo aparecen si amplías este rango."
          },
          "publishedTo": {
            "title": "Registrada hasta",
            "type": "string",
            "description": "Fecha de registro de la convocatoria en la BDNS, hasta (AAAA-MM-DD). Por defecto, hoy."
          },
          "maxItems": {
            "title": "Máximo de resultados",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Número máximo de convocatorias a guardar. También limita el coste.",
            "default": 100
          },
          "maxScan": {
            "title": "Máximo de convocatorias a revisar",
            "minimum": 1,
            "maximum": 50000,
            "type": "integer",
            "description": "Tope de convocatorias que se revisan una a una (unas 14 por segundo). Si se alcanza, el log lo indica: acota fechas o filtros para revisar más.",
            "default": 3000
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}