{
  "openapi": "3.0.1",
  "info": {
    "title": "Spain Public Tenders (PLACSP + regional platforms)",
    "description": "Spanish public procurement from the Plataforma de Contratación del Sector Público and the regional platforms it aggregates (Catalonia, Andalusia, Madrid...): tenders, awards with winners and amounts. Filter by CPV, region, keywords. Normalized JSON.",
    "version": "1.0",
    "x-build-id": "H197AUbDv3Ww3XLqe"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/danielefontana~spain-tenders/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-danielefontana-spain-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/danielefontana~spain-tenders/runs": {
      "post": {
        "operationId": "runs-sync-danielefontana-spain-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/danielefontana~spain-tenders/run-sync": {
      "post": {
        "operationId": "run-sync-danielefontana-spain-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": {
          "noticeKinds": {
            "title": "Notice kind",
            "type": "array",
            "description": "competition = calls for tenders (en plazo, and pendiente de adjudicación once the deadline has passed); result = awards (adjudicada, resuelta) with winners and amounts; planning = prior information (anuncio previo); other = cancellations (anulada).",
            "items": {
              "type": "string",
              "enum": [
                "competition",
                "result",
                "planning",
                "other"
              ],
              "enumTitles": [
                "Calls for tenders (licitaciones)",
                "Awards (adjudicaciones)",
                "Prior information (anuncios previos)",
                "Cancellations (anuladas)"
              ]
            },
            "default": [
              "competition"
            ]
          },
          "regions": {
            "title": "Regions (NUTS codes)",
            "type": "array",
            "description": "Prefixes of the NUTS code of the place of performance: ES3 Madrid, ES51 Cataluña, ES52 Comunidad Valenciana, ES61 Andalucía, ES21 País Vasco, ES11 Galicia, ES41 Castilla y León, ES24 Aragón... More digits narrow it down (ES511 = Barcelona). Empty = all of Spain.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "cpvCodes": {
            "title": "CPV codes or prefixes",
            "type": "array",
            "description": "Common Procurement Vocabulary codes. A prefix matches the whole division: 72 = IT services, 45 = construction, 90 = cleaning and environmental, 33 = medical, 79 = business services. Full codes like 72253000 are accepted too.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "keywords": {
            "title": "Keywords",
            "type": "array",
            "description": "Words or phrases searched in the title (case and accent insensitive). Any keyword may match. Example: software, limpieza, \"mantenimiento de ascensores\".",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "threshold": {
            "title": "Above or below the EU thresholds",
            "enum": [
              "all",
              "above",
              "below"
            ],
            "type": "string",
            "description": "above = harmonised procedures (also on TED); below = national procedures below the EU thresholds (not on TED).",
            "default": "all"
          },
          "contractNatures": {
            "title": "Contract type",
            "type": "array",
            "description": "Works (obras), services (servicios) or goods (suministros). Concessions are mapped to works or services. Empty = all.",
            "items": {
              "type": "string",
              "enum": [
                "works",
                "services",
                "goods"
              ],
              "enumTitles": [
                "Works (obras)",
                "Services (servicios)",
                "Goods (suministros)"
              ]
            },
            "default": []
          },
          "buyerNames": {
            "title": "Buyer name contains",
            "type": "array",
            "description": "Matches the contracting body and its parent organizations, e.g. \"Ayuntamiento de Madrid\", \"Servicio Andaluz de Salud\", \"Generalitat\".",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "daysBack": {
            "title": "Published in the last N days",
            "minimum": 1,
            "maximum": 366,
            "type": "integer",
            "description": "Used when 'Published from' is empty. PLACSP pages are large: each day takes roughly 30–60 seconds to read.",
            "default": 3
          },
          "dateFrom": {
            "title": "Published from (YYYY-MM-DD)",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
            "type": "string",
            "description": "Overrides 'daysBack'. Lower bound, inclusive."
          },
          "dateTo": {
            "title": "Published until (YYYY-MM-DD)",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
            "type": "string",
            "description": "Upper bound, inclusive. Empty = today."
          },
          "minValue": {
            "title": "Minimum estimated value (EUR)",
            "minimum": 0,
            "type": "integer",
            "description": "Skips contract files whose estimated value (excluding VAT) is lower than this amount."
          },
          "onlyOpen": {
            "title": "Only tenders still open",
            "type": "boolean",
            "description": "Keep only calls for tenders whose deadline has not passed yet.",
            "default": false
          },
          "maxItems": {
            "title": "Maximum results",
            "minimum": 1,
            "type": "integer",
            "description": "Stop after this many records. You are only charged for records actually written. Empty = no limit (subject to your Apify spending cap)."
          },
          "sources": {
            "title": "Feeds",
            "type": "array",
            "description": "placsp = authorities publishing on PLACSP (state administration, most municipalities and regions); regional = regional platforms aggregated by PLACSP (Catalonia, Andalusia, Madrid, Basque Country, Galicia...). Both by default.",
            "items": {
              "type": "string",
              "enum": [
                "placsp",
                "regional"
              ],
              "enumTitles": [
                "PLACSP",
                "Regional platforms"
              ]
            },
            "default": [
              "placsp",
              "regional"
            ]
          },
          "includeUpdates": {
            "title": "Include updates",
            "type": "boolean",
            "description": "Also return contract files that changed in the window without a new notice (bids opened, documents added, corrections), with their latest state.",
            "default": false
          },
          "includeRaw": {
            "title": "Include raw CODICE entry",
            "type": "boolean",
            "description": "Adds the original feed entry (XML converted to JSON) under the `raw` field (much larger output).",
            "default": false
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}