{
  "id": 13949844,
  "title": "Japan Earthquake API — Free JMA JSON with Magnitude, Intensity and Depth",
  "url": "https://urgent.news/2026/10/12/japan-earthquake-api-free-jma-json-with-magnitude-intensity-and-depth",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-10-12T12:12:10.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/atu_ino_ed473db24d76d234a/japan-earthquake-api-free-jma-json-with-magnitude-intensity-and-depth-156o"
  },
  "original_language": "en",
  "account": "The Japan Meteorological Agency (JMA) provides free access to earthquake data through a JSON feed. This feed does not require an API key and returns recent earthquake records, sorted with the newest entries first. Each record contains various details such as hypocentre coordinates and earthquake magnitude.\n\nThe hypocentre coordinates are not stored in separate fields like latitude, longitude, or depth. Instead, they are concatenated into a single string, referred to as \"cod.\" The cod string includes latitude, longitude, and depth values, separated by \"+\" and \"-\" signs. Understanding the coordinate format is crucial for accurately parsing the data.\n\nTo extract the latitude, longitude, and depth from the cod string, a regex pattern is used. The pattern captures three groups of values: latitude, longitude, and depth. The depth value is multiplied by -1 to account for the upward-positive sign convention used by JMA. This conversion is necessary as the depth values represent meters with positive values indicating an upward direction.\n\nAnother important aspect to consider is the earthquake intensity. The intensity is represented by a string value and can go beyond a value of 7. JMA uses the \"maxi\" field to indicate the intensity level, ranging from 1 to 7. However, the scale also includes values like \"5-\", \"5+\", \"6-\", and \"6+\", which may not be accurately represented as numerical integers. Therefore, it is essential to use an explicit ordering rather than numerical comparison when dealing with intensity values.\n\nSome records may lack intensity information, indicating that these quakes occurred outside Japan's observation network. Additionally, certain earthquake records may not have a magnitude value, and in such cases, it is advisable to treat the absence of magnitude as zero during processing.\n\nTo simplify the parsing process, a free MCP (Message Control Protocol) server is available. By making a request to the server with specific parameters, such as minimum magnitude and the desired limit of records, users can receive parsed earthquake data. The MCP server returns a structured response containing metadata, data gaps (if any), and an array of earthquake records with parsed latitude, longitude, depth, magnitude, and intensity values.",
  "summary": "Japan sits on four tectonic plates, so earthquake data matters — and the authoritative source is the Japan Meteorological Agency (JMA, 気象庁) , not USGS. The JMA publishes a free JSON feed with no API key. The catch is that the hypocentre coordinates are not stored in fields named lat , lon , or depth . This post shows the shape of the data, the one field that trips everyone up, and a free MCP…",
  "key_points": [
    "Japan Meteorological Agency offers free JSON earthquake data feed",
    "Hypocentre coordinates stored in concatenated cod string",
    "Intensity values may exceed 7, use explicit ordering"
  ],
  "editors_take": null,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}