{
  "openapi": "3.0.1",
  "info": {
    "title": "Licitaciones Junta de Andalucía | Contratación Pública",
    "description": "Extrae licitaciones, contratos menores y adjudicaciones de la Junta de Andalucía. Más de 912.000 expedientes de 553 organismos y 8 provincias, con importes, adjudicatarios, fechas y enlaces. Spanish public procurement / tenders dataset for Andalusia.",
    "version": "0.2",
    "x-build-id": "xvaSE9pA4nSvH2gB2"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/jesusarsan~licitaciones-junta-andalucia/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-jesusarsan-licitaciones-junta-andalucia",
        "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/jesusarsan~licitaciones-junta-andalucia/runs": {
      "post": {
        "operationId": "runs-sync-jesusarsan-licitaciones-junta-andalucia",
        "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/jesusarsan~licitaciones-junta-andalucia/run-sync": {
      "post": {
        "operationId": "run-sync-jesusarsan-licitaciones-junta-andalucia",
        "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": {
          "maxResultados": {
            "title": "Máximo de resultados",
            "minimum": 0,
            "type": "integer",
            "description": "0 = sin límite (~912.000 registros, unos 8-10 minutos). Empieza con 1000 para probar.",
            "default": 1000
          },
          "provincia": {
            "title": "Provincia de ejecución",
            "enum": [
              "",
              "04",
              "11",
              "14",
              "18",
              "21",
              "23",
              "29",
              "41",
              "98"
            ],
            "type": "string",
            "description": "Vacío = todas. Solo un tercio de los expedientes declara provincia; los demás se incluyen únicamente si dejas este campo vacío.",
            "default": ""
          },
          "tipoContrato": {
            "title": "Tipo de contrato",
            "enum": [
              "",
              "OBRA",
              "SERV",
              "SUM",
              "CONSERV",
              "CONOBR",
              "CONOBRPUB",
              "GESSERVPUB",
              "PAT",
              "PRIV",
              "ADMESP",
              "ARRED",
              "COLABPUBPR",
              "CPI"
            ],
            "type": "string",
            "description": "Vacío = todos.",
            "default": ""
          },
          "procedimiento": {
            "title": "Procedimiento de adjudicación",
            "enum": [
              "",
              "9",
              "2",
              "16",
              "17",
              "15",
              "8",
              "4",
              "5",
              "6",
              "7",
              "19",
              "18",
              "22",
              "23",
              "26",
              "30",
              "12",
              "13",
              "14",
              "20",
              "10"
            ],
            "type": "string",
            "description": "Vacío = todos. Los contratos menores son la mayor parte del volumen. La lista es la del propio portal, así que algún procedimiento poco habitual puede no tener todavía ningún expediente.",
            "default": ""
          },
          "estado": {
            "title": "Estado del expediente",
            "enum": [
              "",
              "PUB",
              "EVA",
              "ADJ",
              "RES",
              "AP"
            ],
            "type": "string",
            "description": "Vacío = todos. \"Publicada\" son los que siguen abiertos a presentación.",
            "default": ""
          },
          "perfilContratante": {
            "title": "Código de perfil contratante",
            "type": "string",
            "description": "Código del organismo. Ej: SYBS03 = Servicio Andaluz de Salud, COED02 = Agencia Pública Andaluza de Educación. Vacío = los 553 organismos. La lista completa sale en la columna perfil_contratante_codigo del dataset.",
            "default": ""
          },
          "tramitacion": {
            "title": "Tipo de tramitación",
            "enum": [
              "",
              "O",
              "U",
              "E"
            ],
            "type": "string",
            "description": "Vacío = todas.",
            "default": ""
          },
          "formaPresentacion": {
            "title": "Forma de presentación",
            "enum": [
              "",
              "E",
              "M",
              "A"
            ],
            "type": "string",
            "description": "Vacío = todas.",
            "default": ""
          },
          "concurrencia": {
            "title": "Peticiones simultáneas",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Subirlo acelera pero aumenta el riesgo de 429. 4 es un valor seguro y ya alcanza unos 2.800 registros/s.",
            "default": 4
          },
          "reanudar": {
            "title": "Reanudar ejecución anterior",
            "type": "boolean",
            "description": "Retoma desde el checkpoint, sin repetir los registros ya extraídos.",
            "default": false
          },
          "usarProxyEspana": {
            "title": "Usar proxy residencial español",
            "type": "boolean",
            "description": "Normalmente no hace falta: el portal responde bien sin proxy. Actívalo solo si ves bloqueos o errores 429 persistentes. Requiere proxy residencial en tu plan de Apify.",
            "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}