{
  "openapi": "3.0.1",
  "info": {
    "title": "Korea Business Licenses: Restaurants, Salons, Online Sellers",
    "description": "New and closed businesses in South Korea from the official local license registry: restaurants, beauty salons, online sellers and large stores, with English names, addresses, phone and GPS.",
    "version": "0.1",
    "x-build-id": "exQeYHJzp3G2tspg9"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/cm504~korea-local-business-licenses/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-cm504-korea-local-business-licenses",
        "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-local-business-licenses/runs": {
      "post": {
        "operationId": "runs-sync-cm504-korea-local-business-licenses",
        "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-local-business-licenses/run-sync": {
      "post": {
        "operationId": "run-sync-cm504-korea-local-business-licenses",
        "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 do",
            "enum": [
              "new_licenses",
              "search",
              "closures"
            ],
            "type": "string",
            "description": "new_licenses = businesses licensed in the last N days, newest first (B2B lead feed of newly opened restaurants, salons, online shops). search = the whole registry, all years, by name, address, region, category, status or license date range. closures = businesses whose status changed to closed (or temporarily closed / cancelled) in the last N days.",
            "default": "new_licenses"
          },
          "businessTypes": {
            "title": "Business types",
            "type": "array",
            "description": "One or more license types: general_restaurants (일반음식점: Korean, Chinese, Japanese, cafes, fried chicken, BBQ, pubs), beauty_salons (미용업: hair, skin care, nail, makeup), ecommerce_businesses (통신판매업: online shops and mail-order sellers, slowest source, about 30 s per 100 records), large_scale_retail_stores (대규모점포: hypermarkets, department stores, malls, SSM).",
            "items": {
              "type": "string",
              "enum": [
                "general_restaurants",
                "beauty_salons",
                "ecommerce_businesses",
                "large_scale_retail_stores"
              ],
              "enumTitles": [
                "Restaurants (일반음식점, 2.3M records)",
                "Beauty salons: hair, skin, nail, makeup (미용업, 460K)",
                "Online sellers / mail-order businesses (통신판매업, 3.1M)",
                "Large stores: hypermarkets, department stores, malls, SSM (대규모점포, 4K)"
              ]
            },
            "default": [
              "general_restaurants",
              "beauty_salons"
            ]
          },
          "daysBack": {
            "title": "Days back",
            "minimum": 1,
            "maximum": 365,
            "type": "integer",
            "description": "New licenses and closures modes: look back this many days from today (1-365), e.g. 7 for a weekly feed. Ignored when Since is set. The source is updated daily and runs about 2 days behind, so keep at least 3-7 days.",
            "default": 7
          },
          "since": {
            "title": "Since (license or closure date)",
            "type": "string",
            "description": "Start date YYYY-MM-DD, e.g. 2026-11-01. New licenses and search: licensed on or after this date. Closures: closed on or after this date. Overrides Days back."
          },
          "until": {
            "title": "Until",
            "type": "string",
            "description": "End date YYYY-MM-DD, inclusive, e.g. 2026-11-30. Empty = up to today."
          },
          "regions": {
            "title": "Regions",
            "type": "array",
            "description": "Provinces, cities, counties or districts in English or Korean: Seoul, Gyeonggi-do, Busan, Jeju, Gangnam-gu, Suwon-si, Haeundae-gu, Seoul Mapo-gu, 서울 마포구, 제주. Add the province for names used in several provinces (Seoul Jung-gu). A 7-digit local government code also works. 1-3 districts are fastest. Empty = all of South Korea.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "nameContains": {
            "title": "Business name contains (Korean or as registered)",
            "type": "string",
            "description": "Registered business name contains this text, usually Korean: 스타벅스 (Starbucks), 이마트 (E-Mart), 백화점 (department store), 헤어 (hair), 치킨 (chicken), or Latin as registered, e.g. GS THE FRESH. Filtered at the source, so it is fast. Empty = any name.",
            "default": ""
          },
          "addressContains": {
            "title": "Road address contains (Korean)",
            "type": "string",
            "description": "Road address contains this Korean text, e.g. 테헤란로 (Teheran-ro), 강남대로 (Gangnam-daero), 해운대. Filtered at the source except for online sellers (matched on fetched records only). Empty = any address.",
            "default": ""
          },
          "categories": {
            "title": "Categories",
            "type": "array",
            "description": "Keep only these categories, English or Korean, partial match: restaurants Korean, Chinese, Japanese, Cafe, Fried chicken, Korean BBQ, Raw fish, 한식; salons Hair salon, Nail salon, Skin care, Makeup; online sellers Health and food, General online mall, Clothing; large stores Hypermarket, Department store, Shopping mall. Applied after fetching, so rare categories need more pages.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "status": {
            "title": "Business status (new licenses and search)",
            "enum": [
              "open",
              "any",
              "temporarily_closed",
              "closed",
              "cancelled"
            ],
            "type": "string",
            "description": "New licenses and search modes: open (default), any, temporarily_closed, closed or cancelled. Closures mode uses Closure statuses instead.",
            "default": "open"
          },
          "closureStatuses": {
            "title": "Closure statuses (closures mode)",
            "type": "array",
            "description": "Closures mode: which status changes to return: closed (폐업), temporarily_closed (휴업), cancelled (license cancelled or deregistered). Restaurants and beauty salons only report closed; online sellers and large stores also report the other two.",
            "items": {
              "type": "string",
              "enum": [
                "closed",
                "temporarily_closed",
                "cancelled"
              ],
              "enumTitles": [
                "Closed (폐업)",
                "Temporarily closed (휴업)",
                "License cancelled / revoked (취소·말소)"
              ]
            },
            "default": [
              "closed"
            ]
          },
          "onlyNew": {
            "title": "Only records not delivered before",
            "type": "boolean",
            "description": "For scheduled monitoring: skip businesses already returned by a previous run with the same Monitor name and mode, so each daily run delivers only new leads or new closures.",
            "default": false
          },
          "monitorName": {
            "title": "Monitor name",
            "type": "string",
            "description": "Name of the 'only new' memory, so different schedules keep separate lists, e.g. gangnam-restaurants or gyeonggi-health-sellers.",
            "default": "default"
          },
          "translateToEnglish": {
            "title": "English business names",
            "type": "boolean",
            "description": "Add English business names (nameEn) by Claude (Anthropic): brands in their official English, other names translated or romanized. Addresses, regions, categories and statuses are always in English by fixed rules. Korean originals are always included.",
            "default": true
          },
          "maxItems": {
            "title": "Maximum results",
            "minimum": 1,
            "type": "integer",
            "description": "Stop after this many records, shared evenly across the chosen business types, e.g. 10 for a test, 500 for a weekly lead list. The source API is slow (3-30 s per 100 records). Charged per record.",
            "default": 10
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}