{
  "openapi": "3.0.1",
  "info": {
    "title": "Subvenciones y Ayudas España (BDNS) - Spain Grants Monitor",
    "description": "Spanish grants and subsidies (subvenciones y ayudas) from the official BDNS: filter by keyword, administration level, region, minimum budget and open period. Deadline, budget, beneficiaries and legal basis in clean JSON.",
    "version": "0.1",
    "x-build-id": "w5WZ0DJoh97KL5JM4"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/flets_sv~subvenciones-bdns-espana/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-flets_sv-subvenciones-bdns-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/flets_sv~subvenciones-bdns-espana/runs": {
      "post": {
        "operationId": "runs-sync-flets_sv-subvenciones-bdns-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/flets_sv~subvenciones-bdns-espana/run-sync": {
      "post": {
        "operationId": "run-sync-flets_sv-subvenciones-bdns-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": {
          "palabrasClave": {
            "title": "Keywords",
            "type": "string",
            "description": "Words searched in the call title, e.g. ayudas, pymes, digitalización. Empty returns every call of the window.",
            "default": "ayudas"
          },
          "tipoAdministracion": {
            "title": "Administration level",
            "enum": [
              "todas",
              "C",
              "A",
              "L",
              "O"
            ],
            "type": "string",
            "description": "Who publishes the call, sent to the BDNS as is. todas = no filter, C = State, A = autonomous communities, L = local, O = other bodies. Example: A.",
            "default": "todas"
          },
          "diasAtras": {
            "title": "Published in the last N days",
            "minimum": 1,
            "maximum": 365,
            "type": "integer",
            "description": "Only calls registered in the BDNS in the last N days (1 to 365).",
            "default": 60
          },
          "soloAbiertas": {
            "title": "Only open calls",
            "type": "boolean",
            "description": "Keep only calls whose application period is still running, judged by the closing date. If a call has no dates, the Actor falls back to the open flag that the BDNS publishes for it.",
            "default": false
          },
          "excluirConcesionDirecta": {
            "title": "Exclude direct awards",
            "type": "boolean",
            "description": "Hide nominative and direct-award entries (already assigned to one beneficiary). Keeps only calls you can actually apply to.",
            "default": true
          },
          "presupuestoMinimo": {
            "title": "Minimum budget (EUR)",
            "minimum": 0,
            "type": "integer",
            "description": "Skip calls whose total budget is below this amount in euros; calls without a published budget count as 0. 0 disables the filter. Example: 100000.",
            "default": 0
          },
          "regionTexto": {
            "title": "Region or body contains (optional)",
            "type": "string",
            "description": "Keep calls whose region list or issuing body contains this text (case-insensitive, accents must match, e.g. Andalucía, not Andalucia). Empty = any.",
            "default": ""
          },
          "soloNuevas": {
            "title": "Only new since last run (alerts)",
            "type": "boolean",
            "description": "Alert mode. Returns only calls not returned by a previous run with the same claveAlerta, so you are never charged twice for the same call. The memory lives in your account, in the named key-value store subvenciones-bdns-vistas (up to 20000 ids, kept one year). Schedule the Actor daily and turn this on.",
            "default": false
          },
          "claveAlerta": {
            "title": "Alert name",
            "type": "string",
            "description": "Name that isolates the memory of one alert from another when soloNuevas is on. Use a different name per search, for example pymes-andalucia. Characters other than letters, digits, dot, dash and underscore are replaced by an underscore and the name is cut at 60 characters.",
            "default": "default"
          },
          "maxItems": {
            "title": "Max calls",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Maximum number of calls returned; it also caps your spend. The Actor inspects at most 15 times this number of candidate calls (up to 2000), so very strict filters can return fewer results.",
            "default": 10
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}