{
  "openapi": "3.0.1",
  "info": {
    "title": "Ekiten Japan Business Directory Scraper",
    "description": "Scrape Japanese local businesses from Ekiten (エキテン): salons, clinics, dentists, restaurants, schools, shops and services in all 47 prefectures. Names, addresses, phone numbers, ratings, reviews, hours, prices, payment methods and websites by category, city or station. No API key needed.",
    "version": "0.0",
    "x-build-id": "BRxLN2KwkPYfxtEYu"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/piquno~ekiten-japan-business-directory-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-piquno-ekiten-japan-business-directory-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/piquno~ekiten-japan-business-directory-scraper/runs": {
      "post": {
        "operationId": "runs-sync-piquno-ekiten-japan-business-directory-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/piquno~ekiten-japan-business-directory-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-piquno-ekiten-japan-business-directory-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",
        "required": [
          "prefecture"
        ],
        "properties": {
          "genres": {
            "title": "Sub-genres",
            "type": "array",
            "description": "Ekiten sub-genres to crawl, as 4-digit codes (e.g. 0201 = 美容室・ヘアサロン hair salons, 0210 = 整体院, 0612 = 歯科, 0105 = 居酒屋, 0602 = 内科) or Japanese names (partial matches are fine, e.g. 美容室, 整体, ラーメン). Leave empty to crawl every sub-genre of the Category below. The full list of 252 codes is in the README.",
            "items": {
              "type": "string"
            }
          },
          "category": {
            "title": "Category (when Sub-genres is empty)",
            "enum": [
              "",
              "relax",
              "beauty",
              "school",
              "lesson",
              "dental",
              "clinic",
              "food",
              "store",
              "leisure",
              "recycle",
              "pet",
              "life",
              "professional",
              "event"
            ],
            "type": "string",
            "description": "One of Ekiten's 14 top-level categories. Used only when Sub-genres is empty: every sub-genre of the category is crawled.",
            "default": ""
          },
          "prefecture": {
            "title": "Prefecture",
            "enum": [
              "hokkaido",
              "aomori",
              "iwate",
              "miyagi",
              "akita",
              "yamagata",
              "fukushima",
              "ibaraki",
              "tochigi",
              "gunma",
              "saitama",
              "chiba",
              "tokyo",
              "kanagawa",
              "niigata",
              "toyama",
              "ishikawa",
              "fukui",
              "yamanashi",
              "nagano",
              "gifu",
              "shizuoka",
              "aichi",
              "mie",
              "shiga",
              "kyoto",
              "osaka",
              "hyogo",
              "nara",
              "wakayama",
              "tottori",
              "shimane",
              "okayama",
              "hiroshima",
              "yamaguchi",
              "tokushima",
              "kagawa",
              "ehime",
              "kochi",
              "fukuoka",
              "saga",
              "nagasaki",
              "kumamoto",
              "oita",
              "miyazaki",
              "kagoshima",
              "okinawa"
            ],
            "type": "string",
            "description": "Which prefecture to crawl. Ignored when Start URLs are given.",
            "default": "tokyo"
          },
          "city": {
            "title": "City / ward filter",
            "type": "string",
            "description": "Optional. Restrict to one municipality inside the prefecture, by Japanese name (e.g. 新宿区, 横浜市西区, 札幌市) or 5-digit JIS code (e.g. 13104). Partial name matches are fine and may select several municipalities."
          },
          "station": {
            "title": "Station filter",
            "type": "string",
            "description": "Optional. Instead of a city, crawl businesses listed near one station, by Japanese name (e.g. 新宿駅, 渋谷) or Ekiten station id. Takes precedence over the city filter."
          },
          "startUrls": {
            "title": "Start URLs",
            "type": "array",
            "description": "Optional. Your own Ekiten listing URLs, e.g. https://www.ekiten.jp/g0201/a13104/ (sub-genre × city) or https://www.ekiten.jp/g0105/st5569/ (sub-genre × station). Each is paginated automatically. Overrides the fields above.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "maxResults": {
            "title": "Max businesses",
            "minimum": 1,
            "type": "integer",
            "description": "Stop after this many unique businesses. Each business is one dataset item and one billable result.",
            "default": 100
          },
          "includeDetails": {
            "title": "Scrape detail pages",
            "type": "boolean",
            "description": "Also open every business page for phone number, postal code, GPS coordinates, weekly hours, closed days, website, payment methods, parking, coupons, menus and more. One extra request per business, same price per result.",
            "default": false
          },
          "includeReviews": {
            "title": "Include reviews",
            "type": "boolean",
            "description": "Add the reviews shown on the business page (date, rating, author nickname, text; typically the 2-3 most recent). Turns on detail-page scraping.",
            "default": false
          },
          "requestDelaySecs": {
            "title": "Delay between requests (s)",
            "minimum": 0,
            "maximum": 30,
            "type": "number",
            "description": "Pause after each successful request. Ekiten answers HTTP 202 (empty page) when one IP or session goes too fast; those are retried with backoff automatically.",
            "default": 1
          },
          "maxConcurrency": {
            "title": "Max concurrency",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Parallel requests. 3 is a safe default with Apify Proxy.",
            "default": 3
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Apify residential proxies in Japan (the default) pass Ekiten cleanly with no retries. Datacenter proxies also work but Ekiten blocks most datacenter IPs (HTTP 403), so runs get slow and a few businesses may miss detail data.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ],
              "apifyProxyCountry": "JP"
            }
          }
        }
      },
      "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}