{
  "openapi": "3.0.1",
  "info": {
    "title": "LPSE Indonesia Government Tenders Scraper",
    "description": "Scrape Indonesian government tenders from SPSE/LPSE (spse.inaproc.id): package name, agency, stage, HPS budget, method, category and year, with optional exact ceiling and HPS, work unit, location, qualification and bidder count. Monitor mode returns only new or changed tenders.",
    "version": "0.1",
    "x-build-id": "0RXJYoTuMbWbLhkuJ"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/den_den~lpse-tenders-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-den_den-lpse-tenders-scraper",
        "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/den_den~lpse-tenders-scraper/runs": {
      "post": {
        "operationId": "runs-sync-den_den-lpse-tenders-scraper",
        "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/den_den~lpse-tenders-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-den_den-lpse-tenders-scraper",
        "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": {
          "instances": {
            "title": "LPSE instances",
            "type": "array",
            "description": "SPSE instance slugs from spse.inaproc.id/<slug>, e.g. nasional (central and many regional agencies), kemenkeu, pu, jakarta, jabarprov. Default: nasional.",
            "items": {
              "type": "string"
            }
          },
          "allInstances": {
            "title": "All 600 LPSE instances",
            "type": "boolean",
            "description": "Scan every known LPSE instance (about 600). Slow; use with filters and Max packages.",
            "default": false
          },
          "packageTypes": {
            "title": "Package types",
            "type": "array",
            "description": "Tender (lelang/seleksi) and/or non-tender (pengadaan langsung, penunjukan langsung).",
            "items": {
              "type": "string",
              "enum": [
                "tender",
                "nonTender"
              ],
              "enumTitles": [
                "Tender",
                "Non-tender"
              ]
            },
            "default": [
              "tender"
            ]
          },
          "year": {
            "title": "Budget year (TA)",
            "minimum": 2008,
            "maximum": 2030,
            "type": "integer",
            "description": "Fiscal year of the packages. Default: current year."
          },
          "categories": {
            "title": "Categories",
            "type": "array",
            "description": "Only these procurement categories. Leave empty for all.",
            "items": {
              "type": "string",
              "enum": [
                "Pengadaan Barang",
                "Pekerjaan Konstruksi",
                "Jasa Konsultansi Badan Usaha Non Konstruksi",
                "Jasa Konsultansi Badan Usaha Konstruksi",
                "Jasa Konsultansi Perorangan Non Konstruksi",
                "Jasa Konsultansi Perorangan Konstruksi",
                "Jasa Lainnya",
                "Pekerjaan Konstruksi Terintegrasi"
              ],
              "enumTitles": [
                "Goods",
                "Construction works",
                "Consulting (firm, non-construction)",
                "Consulting (firm, construction)",
                "Consulting (individual, non-construction)",
                "Consulting (individual, construction)",
                "Other services",
                "Integrated construction"
              ]
            }
          },
          "keywords": {
            "title": "Keywords in package name",
            "type": "array",
            "description": "Keep packages whose name contains any of these words, e.g. \"jalan\", \"laptop\", \"CCTV\".",
            "items": {
              "type": "string"
            }
          },
          "agencies": {
            "title": "Agency contains",
            "type": "array",
            "description": "Keep packages whose agency name contains any of these words, e.g. \"Provinsi Jawa Barat\", \"Kementerian Kesehatan\".",
            "items": {
              "type": "string"
            }
          },
          "minHpsIdr": {
            "title": "Min HPS (IDR)",
            "minimum": 0,
            "type": "integer",
            "description": "Only packages with an estimated budget (HPS) of at least this many rupiah."
          },
          "maxHpsIdr": {
            "title": "Max HPS (IDR)",
            "minimum": 0,
            "type": "integer",
            "description": "Only packages with an estimated budget (HPS) of at most this many rupiah."
          },
          "excludeFinished": {
            "title": "Skip finished or cancelled",
            "type": "boolean",
            "description": "Drop packages whose stage says finished, cancelled or failed.",
            "default": false
          },
          "includeDetails": {
            "title": "Include announcement details",
            "type": "boolean",
            "description": "Open each announcement page for exact ceiling and HPS, work unit, location, contract type, business qualification, requirements, RUP codes and bidder count. Charged as an extra event per package.",
            "default": false
          },
          "monitorMode": {
            "title": "Monitor mode",
            "type": "boolean",
            "description": "Save only packages that are new, or whose name, stage or HPS changed, since the last run with the same monitor key. Unchanged packages are not saved or charged.",
            "default": false
          },
          "monitorKey": {
            "title": "Monitor key",
            "type": "string",
            "description": "Name for this monitor's memory. Use a different key per search you schedule.",
            "default": "default"
          },
          "maxPagesPerInstance": {
            "title": "Max pages per instance",
            "minimum": 1,
            "type": "integer",
            "description": "Pages of 100 packages to read per instance, package type and category (newest first).",
            "default": 20
          },
          "maxItems": {
            "title": "Max packages per instance and type",
            "minimum": 1,
            "type": "integer",
            "description": "Stop after this many packages for each LPSE instance and package type (newest first).",
            "default": 100
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}