{
  "openapi": "3.0.1",
  "info": {
    "title": "Spain Public Tenders Feed: PLACSP + Regional Platforms",
    "description": "New Spanish public tenders and contract awards from the official PLACSP open-data feeds, incl. regional platforms. Filter by CPV, NUTS region, value, keyword, buyer. Schedule it daily and get only notices you have not seen. No API key, no contact data.",
    "version": "0.0",
    "x-build-id": "dgqAEoT8TMKRpcWHG"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/asunoki~spain-public-tenders-feed/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-asunoki-spain-public-tenders-feed",
        "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/asunoki~spain-public-tenders-feed/runs": {
      "post": {
        "operationId": "runs-sync-asunoki-spain-public-tenders-feed",
        "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/asunoki~spain-public-tenders-feed/run-sync": {
      "post": {
        "operationId": "run-sync-asunoki-spain-public-tenders-feed",
        "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": {
          "noticeTypes": {
            "title": "Notice types",
            "type": "array",
            "description": "Leave empty for opportunities only.",
            "items": {
              "type": "string",
              "enum": [
                "opportunity",
                "planning",
                "evaluation",
                "award",
                "cancelled"
              ],
              "enumTitles": [
                "Opportunities (open for tenders: you can bid)",
                "Planning (prior information notices)",
                "Evaluation (closed, award pending)",
                "Awards (who won, at what price)",
                "Cancelled"
              ]
            }
          },
          "cpvPrefixes": {
            "title": "CPV codes (or their start)",
            "type": "array",
            "description": "2 to 8 digits. 72 = IT services, 48 = software, 45 = construction works, 79 = business services, 90 = cleaning and environmental, 85 = health and social. A notice matches if any of its CPV codes (including lots) starts with one of these. Leave empty for all.",
            "items": {
              "type": "string"
            }
          },
          "keywords": {
            "title": "Keywords in the title (any)",
            "type": "array",
            "description": "Only notices whose title contains at least one of these. Case and accents are ignored (licitacion = licitación). Titles are in Spanish or a regional language, so use Spanish words, e.g. limpieza, software, mantenimiento.",
            "items": {
              "type": "string"
            }
          },
          "excludeKeywords": {
            "title": "Exclude keywords",
            "type": "array",
            "description": "Drop notices whose title contains any of these.",
            "items": {
              "type": "string"
            }
          },
          "nutsPrefixes": {
            "title": "Regions (NUTS codes)",
            "type": "array",
            "description": "Place-of-performance NUTS codes or their start: ES11 Galicia, ES12 Asturias, ES13 Cantabria, ES21 Basque Country, ES22 Navarre, ES23 La Rioja, ES24 Aragon, ES30 Madrid, ES41 Castile and León, ES42 Castile-La Mancha, ES43 Extremadura, ES51 Catalonia, ES52 Valencian Community, ES53 Balearic Islands, ES61 Andalusia, ES62 Murcia, ES63 Ceuta, ES64 Melilla, ES70 Canary Islands. Nationwide (ES) notices always match.",
            "items": {
              "type": "string"
            }
          },
          "includeUnknownRegion": {
            "title": "Keep notices without a region",
            "type": "boolean",
            "description": "Turn off to drop notices that state no place of performance when a region filter is set.",
            "default": true
          },
          "contractTypes": {
            "title": "Contract types",
            "type": "array",
            "description": "Leave empty for all.",
            "items": {
              "type": "string",
              "enum": [
                "goods",
                "services",
                "works",
                "other"
              ],
              "enumTitles": [
                "Goods (suministros)",
                "Services (servicios, incl. concessions)",
                "Works (obras, incl. concessions)",
                "Other (special, private, patrimonial, PPP)"
              ]
            }
          },
          "minValueEur": {
            "title": "Minimum value (EUR)",
            "minimum": 0,
            "type": "integer",
            "description": "Estimated value excluding VAT (or the base budget; for awards without either, the awarded amount)."
          },
          "maxValueEur": {
            "title": "Maximum value (EUR)",
            "minimum": 0,
            "type": "integer",
            "description": "Leave empty for no maximum."
          },
          "includeUnknownValue": {
            "title": "Keep notices without a value",
            "type": "boolean",
            "description": "Turn off to drop notices without any amount when a value filter is set.",
            "default": true
          },
          "openOnly": {
            "title": "Only opportunities still open",
            "type": "boolean",
            "description": "Drop opportunities whose submission deadline has passed.",
            "default": true
          },
          "euFundedOnly": {
            "title": "Only EU-funded contracts",
            "type": "boolean",
            "description": "Only notices that state EU funding (e.g. Recovery and Resilience Plan, NextGenerationEU).",
            "default": false
          },
          "buyerNameContains": {
            "title": "Buyer name contains (any)",
            "type": "array",
            "description": "Matched against the buyer name and its hierarchy (e.g. ayuntamiento, Generalitat, Ministerio de Defensa, Canarias). Case and accents ignored.",
            "items": {
              "type": "string"
            }
          },
          "sources": {
            "title": "Sources",
            "type": "array",
            "description": "Leave empty for both. Minor contracts (contratos menores) are not included.",
            "items": {
              "type": "string",
              "enum": [
                "placsp",
                "regional-platforms"
              ],
              "enumTitles": [
                "PLACSP contracting profiles (state, many regions and local bodies)",
                "Regional platforms aggregated by PLACSP (Catalonia, Madrid, Basque Country, Andalusia, Galicia, ...)"
              ]
            }
          },
          "days": {
            "title": "Look back (days)",
            "minimum": 1,
            "maximum": 7,
            "type": "integer",
            "description": "Read entries updated in the last N days. Use at least one day more than your schedule interval. With \"Only new\" on, archive files already read by an earlier run are not downloaded again.",
            "default": 2
          },
          "onlyNew": {
            "title": "Only new",
            "type": "boolean",
            "description": "Output each procedure only once per stage across runs (kept per filter set in a named key-value store).",
            "default": true
          },
          "maxItems": {
            "title": "Max notices per run",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "You are charged per notice stored, so this caps the cost of a run. On a working day PLACSP publishes several hundred new opportunities and over a thousand updates. Notices cut by the limit stay new for the next run.",
            "default": 200
          },
          "stateStoreName": {
            "title": "State store name (advanced)",
            "type": "string",
            "description": "Leave empty to use the default."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}