Skip to main content

Developer Documentation

Comprehensive earthquake and seismology reference for researchers, emergency planners, and the general public. Covers recent and historical earthquakes, tectonic plates, fault lines, magnitude scales, country seismic profiles, case studies, interactive tools, glossary, and in-depth guides. 15 languages supported.

Quick Start

curl -s "https://quakefyi.com/api/v1/earthquakes/"

API Endpoints

Method Endpoint Description
GET /api/v1/countries/ Countries with seismic data
GET /api/v1/plates/ Tectonic plates
GET /api/v1/faults/ Fault lines
GET /api/v1/earthquakes/ Recent earthquakes
GET /api/v1/historical/ Historical earthquakes
GET /api/v1/glossary/ Seismology glossary
GET /api/v1/guides/ Guide articles
GET /api/v1/case-studies/ Case studies
GET /api/v1/yearly-summaries/ Yearly summaries
GET /api/v1/faqs/ FAQs
GET /api/v1/stats/ Site statistics
GET /api/v1/cities/ Cities with nearby earthquake data
GET /api/v1/cities/{slug}/ City detail
GET /api/v1/cities/nearest/?lat={lat}&lon={lon} Nearest city to coordinates
GET /api/v1/earthquakes/nearby/?lat={lat}&lon={lon} Nearby earthquakes
GET /api/v1/my-location/ GeoIP location detection
GET /api/v1/search/?q={query} Search across all content
GET /api/recent/ Recent earthquakes feed
GET /api/live-feed/ Live earthquake feed

URL Patterns

Use these patterns to construct URLs programmatically:

/earthquakes/today/ Earthquakes today (e.g. /earthquakes/today/)
/earthquakes/this-week/ Earthquakes this week (e.g. /earthquakes/this-week/)
/earthquakes/this-month/ Earthquakes this month (e.g. /earthquakes/this-month/)
/earthquakes/{year}/ Earthquakes by year (e.g. /earthquakes/2025/)
/earthquake/{slug}/ Earthquake detail (e.g. /earthquake/2011-tohoku/)
/country/ Countries with seismic data (e.g. /country/)
/country/{slug}/ Country seismic profile (e.g. /country/japan/)
/plate/ Tectonic plates (e.g. /plate/)
/plate/{slug}/ Plate detail (e.g. /plate/pacific/)
/fault/ Fault lines (e.g. /fault/)
/fault/{slug}/ Fault detail (e.g. /fault/san-andreas/)
/magnitude/ Magnitude scale reference (e.g. /magnitude/)
/magnitude/{level}/ Magnitude level detail (e.g. /magnitude/7/)
/case-studies/ Earthquake case studies (e.g. /case-studies/)
/glossary/ Seismology glossary (e.g. /glossary/)
/glossary/{slug}/ Glossary term detail (e.g. /glossary/epicenter/)
/guides/ In-depth guides (e.g. /guides/)
/guides/{slug}/ Guide detail (e.g. /guides/earthquake-preparedness/)
/tools/ Interactive tools (e.g. /tools/)
/tools/seismic-risk-checker/ Seismic risk checker (e.g. /tools/seismic-risk-checker/)
/tools/earthquake-calculator/ Earthquake energy calculator (e.g. /tools/earthquake-calculator/)
/tools/earthquake-comparison/ Compare earthquakes (e.g. /tools/earthquake-comparison/)
/tools/tsunami-risk-estimator/ Tsunami risk estimator (e.g. /tools/tsunami-risk-estimator/)
/tools/building-safety-checker/ Building safety checker (e.g. /tools/building-safety-checker/)
/tools/emergency-kit-builder/ Emergency kit builder (e.g. /tools/emergency-kit-builder/)
/search/ Search earthquakes, faults, glossary (e.g. /search/?q=tohoku)
/nearby/{city-slug}-{country-iso2}/ Earthquakes near a city (e.g. /nearby/seoul-kr/)
/nearby/compare/{city-a}-vs-{city-b}/ City seismic risk comparison (e.g. /nearby/compare/lima-vs-tokyo/)
/near-me/ Browser geolocation redirect to nearest city
/alerts/subscribe/ Subscribe to earthquake alerts (POST, JSON)

Response Format

All endpoints return JSON with pagination:

Example JSON response
{
  "count": 636,
  "next": "https://example.com/api/v1/items/?page=2",
  "previous": null,
  "results": [
    {"slug": "example", "name": "Example Item", "...": "..."}
  ]
}

OpenAPI Specification

Full API schema available as OpenAPI 3.1.0 JSON. Import into Swagger UI, Postman, or any OpenAPI-compatible tool.

SDK Packages

PyPI
pip install quakefyi

Earthquake seismic data and tectonic plates API client

Embed Widget

Embed data cards on your site: https://widget.quakefyi.com
npm install quakefyi-embed

Format Support

  • Markdown endpoints: Append .md to any page URL for LLM-friendly markdown output.
  • Internationalization: Content available in 14 languages: ko, ja, zh-hans, es, fr, de, pt, ru, vi, tr, ar, hi, th, id.