{
  "openapi": "3.0.1",
  "info": {
    "title": "Indonesia Government Tenders Scraper (LPSE / SPSE INAPROC)",
    "description": "Scrape open Indonesian government tenders from 600 LPSE sites (SPSE INAPROC): title, agency, HPS/pagu budget, stage, location. Keyword and only-new monitoring.",
    "version": "0.1",
    "x-build-id": "FhVXSX9mjEL0KNQ73"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/nusantara-data-tools~indonesia-lpse-tenders/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-nusantara-data-tools-indonesia-lpse-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/nusantara-data-tools~indonesia-lpse-tenders/runs": {
      "post": {
        "operationId": "runs-sync-nusantara-data-tools-indonesia-lpse-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/nusantara-data-tools~indonesia-lpse-tenders/run-sync": {
      "post": {
        "operationId": "run-sync-nusantara-data-tools-indonesia-lpse-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": {
          "lpseSites": {
            "title": "LPSE sites",
            "type": "array",
            "description": "LPSE slugs on spse.inaproc.id, e.g. 'kemenkeu', 'pu', 'jakarta', 'jabarprov', 'surabaya', 'kemkes'. Use ['ALL'] to scan all ~600 LPSE sites (slow, combine with keywords).",
            "default": [
              "kemenkeu"
            ],
            "items": {
              "type": "string"
            }
          },
          "keywords": {
            "title": "Keywords (any match)",
            "type": "array",
            "description": "Case-insensitive keywords matched against tender title, agency and category, e.g. 'laptop', 'konsultan', 'gedung', 'software'. Leave empty for all tenders.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "onlyOpen": {
            "title": "Only open / ongoing tenders",
            "type": "boolean",
            "description": "Skip tenders that are completed, cancelled or failed.",
            "default": true
          },
          "category": {
            "title": "Procurement category",
            "enum": [
              "all",
              "goods",
              "construction",
              "consulting_non_construction",
              "consulting_construction",
              "other_services",
              "individual_consulting_non_construction",
              "individual_consulting_construction",
              "integrated_construction"
            ],
            "type": "string",
            "description": "Filter by SPSE procurement category (Jenis Pengadaan).",
            "default": "all"
          },
          "fiscalYear": {
            "title": "Fiscal year (Tahun Anggaran)",
            "minimum": 2008,
            "maximum": 2035,
            "type": "integer",
            "description": "Optional. Leave empty for the site's default year."
          },
          "agencyId": {
            "title": "Agency ID (instansiId)",
            "type": "string",
            "description": "Optional SPSE agency code, e.g. 'K10' (Ministry of Finance). Shown in the agency dropdown on the LPSE site."
          },
          "minHpsIdr": {
            "title": "Minimum HPS (owner estimate) in IDR",
            "minimum": 0,
            "type": "integer",
            "description": "Skip tenders with an estimated value below this amount, e.g. 500000000 for Rp 500 million."
          },
          "includeDetails": {
            "title": "Include announcement details",
            "type": "boolean",
            "description": "Open each tender announcement for pagu & exact HPS, work unit, location, business qualification (Kecil/Non-kecil), RUP codes, participants count and qualification requirements. Charged as 'tender-with-details'.",
            "default": false
          },
          "onlyNewSinceLastRun": {
            "title": "Only new tenders since last run (monitoring)",
            "type": "boolean",
            "description": "Remember tenders already returned (named key-value store 'lpse-tenders-state') and output only new ones. Ideal for daily schedules + email/Slack integrations.",
            "default": false
          },
          "maxItems": {
            "title": "Max results",
            "minimum": 1,
            "type": "integer",
            "description": "Maximum number of tenders to output (each output item is one billable result).",
            "default": 100
          },
          "maxPagesPerSite": {
            "title": "Max list pages per LPSE site (50 tenders/page, newest first)",
            "minimum": 1,
            "type": "integer",
            "description": "Max list pages per LPSE site (50 tenders/page, newest first).",
            "default": 20
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "SPSE INAPROC blocks non-Indonesian datacenter IPs (HTTP 403). Keep the default Indonesian residential Apify Proxy for reliable results.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ],
              "apifyProxyCountry": "ID"
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}