{
  "openapi": "3.0.1",
  "info": {
    "title": "Korea Wholesale Market Auctions & Daily Food Prices (aT)",
    "description": "Real-time auction results from South Korea's 32 public wholesale markets (fruit, vegetables, imports by origin country) and daily wholesale/retail prices for produce, meat and seafood, in English.",
    "version": "0.1",
    "x-build-id": "SeTchMkEW8w8Kxy3v"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/cm504~korea-produce-prices/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-cm504-korea-produce-prices",
        "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/cm504~korea-produce-prices/runs": {
      "post": {
        "operationId": "runs-sync-cm504-korea-produce-prices",
        "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/cm504~korea-produce-prices/run-sync": {
      "post": {
        "operationId": "run-sync-cm504-korea-produce-prices",
        "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": "What to get",
            "enum": [
              "auctions",
              "daily_prices"
            ],
            "type": "string",
            "description": "auctions = winning bids at South Korea's 32 public wholesale markets (Seoul Garak, Gangseo, Busan...), mostly fruit, vegetables and mushrooms incl. imports by origin country, as per-day summaries or individual trades; feed keeps ~30 days. daily_prices = aT's daily wholesale and retail price survey of ~110 items (produce, rice, Hanwoo beef, pork, chicken, eggs, seafood) in 30+ cities, up to one year per run.",
            "default": "auctions"
          },
          "products": {
            "title": "Products (auctions)",
            "type": "array",
            "description": "Auctions only. English or Korean names, e.g. apple, napa cabbage, cherries, bananas, kiwifruit, oranges, mandarin, strawberries, shiitake, 사과, 배추; a category such as fruits, vegetables or mushrooms; or product codes like 06/01. Leave empty for all products (about 100,000 trades a day, ~30 s per day; max 3 days).",
            "default": [
              "apple"
            ],
            "items": {
              "type": "string"
            }
          },
          "date": {
            "title": "Settlement date (auctions)",
            "type": "string",
            "description": "Auctions only. latest = most recent settlement date with matching trades (may still be in progress; night auctions settle on the next day), latest_complete = most recent date before today (Korea time), or a date YYYY-MM-DD. The auction feed keeps about the last 30 days. Ignored when dateFrom/dateTo are set.",
            "default": "latest"
          },
          "dateFrom": {
            "title": "From date",
            "type": "string",
            "description": "YYYY-MM-DD. Auctions: start of a range instead of a single date (max 31 days; max 3 days without products). Daily prices: start of the survey range (default: 7 days before the end date; max one year)."
          },
          "dateTo": {
            "title": "To date",
            "type": "string",
            "description": "YYYY-MM-DD, end of the range. Default: today (Korea time)."
          },
          "output": {
            "title": "Auction output",
            "enum": [
              "summary",
              "trades"
            ],
            "type": "string",
            "description": "Auctions only. summary = one row per settlement date and group with volume-weighted average, median, min and max price per kg in KRW, volume and import share. trades = individual winning bids (price per package, package kg, quantity, origin), newest first.",
            "default": "summary"
          },
          "groupBy": {
            "title": "Group summaries by (auctions)",
            "type": "array",
            "description": "Auction summaries only. Rows are always per settlement date and product; add variety, market, origin (country for imports, province for Korean produce) and/or package size. Example: [\"product\", \"origin\"] compares import origins.",
            "items": {
              "type": "string",
              "enum": [
                "product",
                "variety",
                "market",
                "origin",
                "package"
              ],
              "enumTitles": [
                "Product",
                "Variety",
                "Wholesale market",
                "Origin (country, or province for domestic)",
                "Package size"
              ]
            },
            "default": [
              "product",
              "market"
            ]
          },
          "markets": {
            "title": "Wholesale markets (auctions)",
            "type": "array",
            "description": "Auctions only, optional. English or Korean market names or codes, e.g. Seoul Garak (가락, 110001), Seoul Gangseo, Busan Eomgung, Daegu Bukbu, Gwangju Gakhwa. Empty = all 32 public wholesale markets.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "originCountries": {
            "title": "Origin countries (auctions)",
            "type": "array",
            "description": "Auctions only, optional. Country names or ISO codes (United States, US, Chile, CL, New Zealand, China, Philippines, Peru, Australia...), 'imported' for all imports, or 'domestic' for Korean produce. Empty = all origins.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "importedOnly": {
            "title": "Imported produce only (auctions)",
            "type": "boolean",
            "description": "Auctions only. Keep only trades whose origin is a foreign country (imported fruit, vegetables etc.).",
            "default": false
          },
          "items": {
            "title": "Items (daily prices)",
            "type": "array",
            "description": "Daily prices only. English or Korean item names or codes, e.g. apple, napa cabbage, onion, garlic, rice, beef, pork, chicken, eggs, mackerel, squid, 사과, or 400/411. Up to 30 items.",
            "default": [
              "apple"
            ],
            "items": {
              "type": "string"
            }
          },
          "priceType": {
            "title": "Price type (daily prices)",
            "enum": [
              "all",
              "wholesale",
              "retail",
              "eco"
            ],
            "type": "string",
            "description": "Daily prices only. wholesale = intermediate wholesaler selling price at wholesale markets, retail = retail outlets (markets, supermarkets, hypermarkets), eco = eco-friendly / organic retail, all = all three.",
            "default": "all"
          },
          "regions": {
            "title": "Cities / regions (daily prices)",
            "type": "array",
            "description": "Daily prices only, optional. Cities in English or Korean, e.g. Seoul, Busan, Daegu, Gwangju, Daejeon, Jeju. Empty = all surveyed cities.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "latestOnly": {
            "title": "Latest survey day only (daily prices)",
            "type": "boolean",
            "description": "Daily prices only. Keep only the most recent survey date in the range for each item (e.g. today's or the last weekday's prices).",
            "default": false
          },
          "aggregate": {
            "title": "Summarize across markets (daily prices)",
            "type": "boolean",
            "description": "Daily prices only. One row per date, price type, item, variety, grade and unit with average, median, min and max over all markets surveyed, plus aT's national average for livestock.",
            "default": false
          },
          "onlyNew": {
            "title": "Only items not delivered before",
            "type": "boolean",
            "description": "For scheduled monitoring of individual auction trades (output: trades) or daily prices: skip records already returned by a previous run with the same monitor name. Summaries are always recomputed.",
            "default": false
          },
          "monitorName": {
            "title": "Monitor name",
            "type": "string",
            "description": "Keeps separate 'only new' memories for different schedules, e.g. garak-cherries. Use one name per set of filters.",
            "default": "default"
          },
          "maxItems": {
            "title": "Maximum results",
            "minimum": 1,
            "type": "integer",
            "description": "Stop after this many results (records you pay for). Default 20.",
            "default": 20
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}