{
  "openapi": "3.0.1",
  "info": {
    "title": "Korea G2B Bid Intelligence - 나라장터 입찰·낙찰·발주계획",
    "description": "Korean public procurement (나라장터 G2B) bid notices, awards and order plans from the official 조달청 Open APIs, plus award-rate (낙찰률) median/p10/p90, recommended bid band, top-winner leaderboard and upcoming pipeline per agency and category.",
    "version": "0.1",
    "x-build-id": "zRuG8netc4IQTXhFb"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/gochujang~korea-g2b-bid-intelligence/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-gochujang-korea-g2b-bid-intelligence",
        "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/gochujang~korea-g2b-bid-intelligence/runs": {
      "post": {
        "operationId": "runs-sync-gochujang-korea-g2b-bid-intelligence",
        "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/gochujang~korea-g2b-bid-intelligence/run-sync": {
      "post": {
        "operationId": "run-sync-gochujang-korea-g2b-bid-intelligence",
        "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": {
          "mode": {
            "title": "Mode (조회 유형)",
            "enum": [
              "bids",
              "awards",
              "plans",
              "insights"
            ],
            "type": "string",
            "description": "bids = open bid notices with deadline countdown; awards = award results (낙찰); plans = order plans (발주계획); insights = derived award-rate stats, recommended bid band, top winners and upcoming pipeline.",
            "default": "bids"
          },
          "categories": {
            "title": "Categories (업무구분)",
            "type": "array",
            "description": "Any of services (용역), goods (물품), construction (공사), foreign (외자).",
            "items": {
              "type": "string",
              "enum": [
                "services",
                "goods",
                "construction",
                "foreign"
              ],
              "enumTitles": [
                "Services (용역)",
                "Goods (물품)",
                "Construction (공사)",
                "Foreign (외자)"
              ]
            },
            "default": [
              "services",
              "goods",
              "construction"
            ]
          },
          "keywords": {
            "title": "Keywords (공고명/사업명)",
            "type": "array",
            "description": "Rows whose title, business name or classification contains any keyword (case-insensitive). With exactly one keyword it is also sent to the API as a server-side filter.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "agencies": {
            "title": "Agencies (기관명)",
            "type": "array",
            "description": "Keep rows whose notice, demand or order agency name contains any of these (e.g. 조달청, 서울특별시).",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "region": {
            "title": "Region (지역)",
            "type": "string",
            "description": "Participation-restricted region for bids/awards (참가제한지역명, e.g. 서울) or agency location for plans (기관소재지명). Sent to the API."
          },
          "days_back": {
            "title": "Days back (조회 기간, 일)",
            "minimum": 1,
            "maximum": 365,
            "type": "integer",
            "description": "Bids/awards registered in the last N days. Use 30+ for insights.",
            "default": 7
          },
          "open_only": {
            "title": "Open bids only (마감 전 공고만)",
            "type": "boolean",
            "description": "bids mode: drop notices whose bid deadline has passed.",
            "default": true
          },
          "plans_days_back": {
            "title": "Plans posted in the last N days",
            "minimum": 1,
            "maximum": 365,
            "type": "integer",
            "description": "plans/insights: order plans posted (게시) in the last N days.",
            "default": 90
          },
          "months_ahead": {
            "title": "Order months ahead (발주 예정 개월)",
            "minimum": 0,
            "maximum": 24,
            "type": "integer",
            "description": "plans/insights: order months from this month up to N months ahead.",
            "default": 6
          },
          "include_pipeline": {
            "title": "Include upcoming pipeline (insights)",
            "type": "boolean",
            "description": "insights: also fetch order plans and output pipeline rows.",
            "default": true
          },
          "include_records": {
            "title": "Include raw records (insights)",
            "type": "boolean",
            "description": "insights: also output the award and plan rows behind the statistics (charged as records).",
            "default": false
          },
          "min_sample": {
            "title": "Minimum awards per group",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "insights: smallest number of awards for an agency × category statistics row.",
            "default": 3
          },
          "top_n": {
            "title": "Top winners",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "insights: size of the top-winner leaderboard.",
            "default": 20
          },
          "max_results": {
            "title": "Max records",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Maximum bid/award/plan rows output per run.",
            "default": 200
          },
          "max_api_calls": {
            "title": "Max API calls",
            "minimum": 1,
            "maximum": 900,
            "type": "integer",
            "description": "Upper bound on live 나라장터 API calls this run (cached pages are free). The official quota is per operation per day.",
            "default": 30
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}