{
  "openapi": "3.0.1",
  "info": {
    "title": "Japan Bear Sightings (クマ出没情報) - Open Data Scraper",
    "description": "Bear sighting, trace and injury reports in Japan (ツキノワグマ/ヒグマ) from prefectural and city open data: Akita KumaDAS, Ishikawa, Sapporo, Kyoto, Kamisunagawa, Yamaguchi. Date, place, coordinates, type, cubs. CC BY / PDL sources only. Unofficial; not affiliated with any publisher.",
    "version": "0.1",
    "x-build-id": "KzB84Z7scj9UKEjlo"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/jpopendata~japan-bear-sightings/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-jpopendata-japan-bear-sightings",
        "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/jpopendata~japan-bear-sightings/runs": {
      "post": {
        "operationId": "runs-sync-jpopendata-japan-bear-sightings",
        "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/jpopendata~japan-bear-sightings/run-sync": {
      "post": {
        "operationId": "run-sync-jpopendata-japan-bear-sightings",
        "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": {
          "daysBack": {
            "title": "Days back",
            "minimum": 0,
            "maximum": 36500,
            "type": "integer",
            "description": "Reports dated on or after today (Japan time) minus this many days. 0 = no lower limit (all history: Kyoto from 2009, Sapporo from 2017, Akita from April 2022 ...). Ignored when \"Date from\" is set. Note: publishers update with a delay — Akita monthly (data to the end of the previous month), Sapporo once a year, Yamaguchi and Kamisunagawa during the season.",
            "default": 30
          },
          "dateFrom": {
            "title": "Date from (optional)",
            "type": "string",
            "description": "Optional. First day, YYYY-MM-DD, e.g. \"2025-04-01\". Also accepted: 2025/4/1, 20250401, 2025年4月1日, 令和7年4月1日, and \"2025-04\" for a whole month. Overrides Days back.",
            "default": ""
          },
          "dateTo": {
            "title": "Date to (optional)",
            "type": "string",
            "description": "Optional. Last day, YYYY-MM-DD, e.g. \"2025-11-30\" (\"2025-11\" = to the end of November). Empty = today.",
            "default": ""
          },
          "sources": {
            "title": "Sources",
            "type": "array",
            "description": "Which publishers to read, one per line: akita (秋田県 クマダス, monthly, from 2022-04), ishikawa (石川県, 2019-2025), sapporo (札幌市, one file per year, from 2017), kyoto (京都府, archive FY2009-2018), kamisunagawa (上砂川町, from FY2024), yamaguchi (山口県 police reports, from 2023). Japanese names work too (秋田, 札幌 ...). Empty = all six.",
            "default": [
              "akita",
              "ishikawa",
              "sapporo",
              "kyoto",
              "kamisunagawa",
              "yamaguchi"
            ],
            "items": {
              "type": "string"
            }
          },
          "prefectures": {
            "title": "Prefectures (optional)",
            "type": "array",
            "description": "Optional. Keep only these prefectures, one per line: Akita, Ishikawa, Hokkaido, Kyoto, Yamaguchi (English or Japanese names such as 秋田県, or JIS codes such as 05). Other prefectures are valid input but have no source in this Actor yet (a warning says so). Empty = all.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "municipalities": {
            "title": "Municipalities (optional)",
            "type": "array",
            "description": "Optional. Keep only these cities / towns, in Japanese as the publishers write them, one per line: \"秋田市\", \"鹿角市\", \"北秋田市\", \"加賀市\", \"山口市\", \"札幌市\" (all wards) or \"札幌市南区\" (one ward). The 市/町/村 ending is optional (\"秋田\" = \"秋田市\"). Romanized names match nothing. Empty = all.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "types": {
            "title": "Report types (optional)",
            "type": "array",
            "description": "Optional. Keep only these report types, one per line: sighting (目撃), trace (痕跡: droppings, footprints, feeding or claw marks), injury (人身被害: a person hurt), capture (捕獲・駆除: caught or culled), other (e.g. only heard). Japanese labels work too. Empty = all.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "maxItems": {
            "title": "Max records",
            "minimum": 1,
            "maximum": 200000,
            "type": "integer",
            "description": "Maximum records stored, newest first, all sources together (1..200000). Volumes swing with the season: Akita alone published 5,810 reports for October 2025 but about 100 for September 2026. Each stored record is charged.",
            "default": 200
          },
          "maxRequests": {
            "title": "Max requests",
            "minimum": 5,
            "maximum": 300,
            "type": "integer",
            "description": "Hard limit on HTTP requests to the catalogues for the whole run (5..300). A full-history run of all six sources needs about 30 (one CSV per year per source plus one catalogue page per source); the Quick start needs about 7.",
            "default": 80
          },
          "proxyConfiguration": {
            "title": "Proxy for Akita, Sapporo, Kyoto, Kamisunagawa and Yamaguchi",
            "type": "object",
            "description": "Optional proxy for the catalogues that answer Apify's servers directly. Default: no proxy. If you set one, one sticky session (one IP) is kept per catalogue for the whole run, never rotation.",
            "default": {
              "useApifyProxy": false
            }
          },
          "residentialProxyConfiguration": {
            "title": "Proxy for Ishikawa",
            "type": "object",
            "description": "Proxy for the Ishikawa open-data catalogue (いしかわオープンデータカタログ), which refuses Apify's datacenter IPs (HTTP 403, checked 2026-10-13). Default: Apify RESIDENTIAL proxies, country JP — billed by Apify as proxy traffic (one catalogue page is about 50 KB, a CSV 20-550 KB). One sticky session for the whole run; only a refused first request is retried once on a fresh session. Without it, the Ishikawa source is reported as refused and the other sources still run.",
            "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
                  },
                  "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}