{
  "openapi": "3.0.1",
  "info": {
    "title": "Licitaciones España — Spain Public Tenders API (PLACSP)",
    "description": "Spanish public tenders (licitaciones) from official PLACSP feeds, incl. regional platforms. Filter by CPV, province, contract type, status, budget and deadline. Schedule daily with Only-new and pay only for new tenders. $3 per 1,000.",
    "version": "0.1",
    "x-build-id": "SWBeSyWkYXuehLzev"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/icarodata~placsp-licitaciones/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-icarodata-placsp-licitaciones",
        "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/icarodata~placsp-licitaciones/runs": {
      "post": {
        "operationId": "runs-sync-icarodata-placsp-licitaciones",
        "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/icarodata~placsp-licitaciones/run-sync": {
      "post": {
        "operationId": "run-sync-icarodata-placsp-licitaciones",
        "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": "Keywords",
            "type": "array",
            "description": "Optional keywords. A tender is kept if any keyword appears in the title, description or contracting-authority name (case-insensitive).",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "cpvCodes": {
            "title": "CPV codes",
            "type": "array",
            "description": "Optional CPV prefixes or full codes (for example 72 or 72212900). A tender matches if any of its CPV codes starts with one of these prefixes. Non-digit characters are ignored.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "provinces": {
            "title": "Provinces or NUTS codes",
            "type": "array",
            "description": "Optional places of execution. Accepts province names (Barcelona), INE codes (08) or NUTS codes (ES511, ES51 for Catalonia). Leave empty to include every location.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "contractTypes": {
            "title": "Contract type",
            "type": "array",
            "description": "Optional contract types from the official CODICE list. Leave empty to include every type.",
            "items": {
              "type": "string",
              "enum": [
                "supplies",
                "services",
                "works",
                "special_administrative",
                "private",
                "public_service_management",
                "services_concession",
                "public_works_concession",
                "works_concession",
                "ppp",
                "patrimonial"
              ],
              "enumTitles": [
                "Supplies (suministros)",
                "Services (servicios)",
                "Works (obras)",
                "Special administrative",
                "Private",
                "Public-service management",
                "Services concession",
                "Public-works concession",
                "Works concession",
                "Public-private collaboration",
                "Patrimonial"
              ]
            },
            "default": []
          },
          "procedures": {
            "title": "Procedure",
            "type": "array",
            "description": "Optional tendering procedures from the official CODICE syndication list. Leave empty to include every procedure.",
            "items": {
              "type": "string",
              "enum": [
                "open",
                "restricted",
                "negotiated_without_publicity",
                "negotiated_with_publicity",
                "competitive_dialogue",
                "minor",
                "framework",
                "design_contest",
                "simplified_open",
                "innovation_partnership",
                "based_on_innovation_partnership",
                "dynamic_purchasing",
                "negotiation",
                "internal_rules",
                "other"
              ],
              "enumTitles": [
                "Open (abierto)",
                "Restricted (restringido)",
                "Negotiated without publicity",
                "Negotiated with publicity",
                "Competitive dialogue",
                "Minor contract",
                "Based on a framework agreement",
                "Design contest",
                "Simplified open (abierto simplificado)",
                "Innovation partnership",
                "Based on an innovation partnership",
                "Based on a dynamic purchasing system",
                "Tender with negotiation",
                "Internal rules (normas internas)",
                "Other"
              ]
            },
            "default": []
          },
          "status": {
            "title": "Status",
            "type": "array",
            "description": "Optional tender statuses. 'open' is EN PLAZO (PUB), 'announced' is a prior notice (PRE), 'pending_award' is evaluation (EV), 'awarded' is ADJ, 'resolved' is RES, 'cancelled' is ANUL.",
            "items": {
              "type": "string",
              "enum": [
                "announced",
                "open",
                "pending_award",
                "awarded",
                "resolved",
                "cancelled"
              ],
              "enumTitles": [
                "Announced (anuncio previo)",
                "Open / in deadline (en plazo)",
                "Pending award (evaluación)",
                "Awarded (adjudicada)",
                "Resolved (resuelta)",
                "Cancelled (anulada)"
              ]
            },
            "default": []
          },
          "sources": {
            "title": "Feed sources",
            "type": "array",
            "description": "Which official ATOM feeds to read. contracting_profiles is sindicación 643 (licitacionesPerfilesContratanteCompleto3). aggregated is sindicación 1044 (PlataformasAgregadasSinMenores), covering regional platforms.",
            "items": {
              "type": "string",
              "enum": [
                "contracting_profiles",
                "aggregated"
              ],
              "enumTitles": [
                "Contracting-authority profiles (sindicación 643)",
                "Aggregated regional platforms (sindicación 1044)"
              ]
            },
            "default": [
              "contracting_profiles",
              "aggregated"
            ]
          },
          "minEstimatedValue": {
            "title": "Minimum estimated value (EUR, excl. VAT)",
            "minimum": 0,
            "type": "number",
            "description": "Keep tenders whose estimated value or budget excluding VAT is at least this amount. Leave empty for no lower bound."
          },
          "maxEstimatedValue": {
            "title": "Maximum estimated value (EUR, excl. VAT)",
            "minimum": 0,
            "type": "number",
            "description": "Keep tenders whose estimated value or budget excluding VAT is at most this amount. Leave empty for no upper bound."
          },
          "publicationDateFrom": {
            "title": "Publication date from",
            "type": "string",
            "description": "First publication date to include, YYYY-MM-DD. Compared with the earliest official notice date (or the feed update date when no notice date is present)."
          },
          "publicationDateTo": {
            "title": "Publication date to",
            "type": "string",
            "description": "Last publication date to include, YYYY-MM-DD."
          },
          "deadlineAfter": {
            "title": "Deadline after",
            "type": "string",
            "description": "Keep only tenders whose submission deadline is on or after this date (YYYY-MM-DD). Tenders without a published deadline are dropped when this filter is set."
          },
          "maxItems": {
            "title": "Maximum tenders",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Maximum number of matching tenders to save. Between 1 and 5,000.",
            "default": 50
          },
          "maxRunTimeSecs": {
            "title": "Max run time (seconds)",
            "minimum": 0,
            "maximum": 86400,
            "type": "integer",
            "description": "Internal time budget. Each official PLACSP page (~500 procedures) takes ~20-60 s to read. When the budget is reached the Actor stops and saves the tenders found so far (the run still succeeds). Default 180 s; set e.g. 1800 for narrow filters or back-fills, or 0 for no internal limit (the platform run timeout still applies, minus a 45 s safety margin).",
            "default": 180
          },
          "onlyNewSinceLastRun": {
            "title": "Only new since last run",
            "type": "boolean",
            "description": "If enabled, only tenders not seen in a previous run with the same filters are saved. Seen IDs are stored in the named key-value store 'placsp-licitaciones-state' so scheduled runs only return (and bill) new tenders.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}