quakefyi
Python API client for quakefyi.com -- the comprehensive earthquake and seismology database covering earthquakes, tectonic plates, fault lines, historical events, and yearly summaries. Access seismic data, magnitude records, and geological case studies through a free REST API, CLI, or MCP server for AI assistants.
QuakeFYI catalogs earthquake events with magnitude, depth, location data, tectonic plate boundaries, and fault classifications -- built for developers, geoscientists, and educators who need structured seismological data.
Explore earthquakes at quakefyi.com -- browse seismic events, tectonic plates, and fault lines.
Table of Contents
- Install
- Quick Start
- What You Can Do
- Command-Line Interface
- MCP Server (Claude, Cursor, Windsurf)
- REST API Client
- API Reference
- Learn More About Earthquakes
- Geo FYI Family
- FYIPedia Developer Tools
- License
Install
pip install quakefyi # Core (zero deps)
pip install "quakefyi[cli]" # + Command-line interface
pip install "quakefyi[mcp]" # + MCP server for AI assistants
pip install "quakefyi[api]" # + HTTP client for quakefyi.com API
pip install "quakefyi[all]" # Everything
Quick Start
from quakefyi.api import QuakeFYI
with QuakeFYI() as api:
# List earthquakes in the database
earthquakes = api.list_earthquakes()
# Get detailed info for a specific earthquake event
event = api.get_earthquake("2011-tohoku")
# Browse tectonic plates
plates = api.list_plates()
pacific = api.get_plate("pacific-plate")
# Search across all seismological content
results = api.search("San Andreas")
What You Can Do
Earthquake Data and Magnitude Scales
Earthquake magnitude quantifies the energy released at the source. The moment magnitude scale (Mw) has replaced the older Richter scale (ML) for most scientific and engineering purposes because it does not saturate at high magnitudes. A magnitude increase of 1.0 represents roughly 31.6 times more energy released.
| Magnitude (Mw) | Classification | Effects | Approximate Annual Frequency |
|---|---|---|---|
| < 2.0 | Micro | Not felt, recorded by instruments | ~1,300,000 |
| 2.0 -- 3.9 | Minor | Often felt, rarely causes damage | ~130,000 |
| 4.0 -- 4.9 | Light | Noticeable shaking, minor damage | ~13,000 |
| 5.0 -- 5.9 | Moderate | Can cause damage to weak structures | ~1,300 |
| 6.0 -- 6.9 | Strong | Destructive in populated areas | ~130 |
| 7.0 -- 7.9 | Major | Serious damage over large areas | ~15 |
| 8.0+ | Great | Devastating, can trigger tsunamis | ~1 |
from quakefyi.api import QuakeFYI
# Retrieve earthquake data with magnitude, depth, and location
with QuakeFYI() as api:
quake = api.get_earthquake("2011-tohoku")
print(quake["name"]) # 2011 Tohoku earthquake
print(quake) # Full event data including magnitude and coordinates
# Browse yearly summaries of seismic activity
summaries = api.list_yearly_summaries()
Learn more: Browse Earthquakes · Glossary · Guides
Tectonic Plates and Boundaries
Earth's lithosphere is divided into major and minor tectonic plates that float on the semi-fluid asthenosphere. Plate boundaries are where most earthquakes occur. There are three boundary types: divergent (plates move apart), convergent (plates collide), and transform (plates slide past each other).
| Plate | Type | Area (million km2) | Notable Boundary |
|---|---|---|---|
| Pacific | Oceanic | 103.3 | Ring of Fire (subduction zones) |
| North American | Continental + Oceanic | 75.9 | San Andreas Fault (transform) |
| Eurasian | Continental + Oceanic | 67.8 | Himalayas (convergent) |
| African | Continental + Oceanic | 61.3 | East African Rift (divergent) |
| Antarctic | Continental + Oceanic | 60.9 | Mid-ocean ridges |
| Indo-Australian | Continental + Oceanic | 58.9 | Sunda megathrust |
| South American | Continental + Oceanic | 43.6 | Andes subduction zone |
from quakefyi.api import QuakeFYI
# Explore tectonic plates and their boundaries
with QuakeFYI() as api:
plates = api.list_plates()
pacific = api.get_plate("pacific-plate")
# Browse by country to see regional seismic risk
countries = api.list_countries()
japan = api.get_country("japan")
Learn more: Tectonic Plates · Countries · API Docs
Fault Lines and Seismic Zones
A fault is a fracture in the Earth's crust along which blocks of rock have moved relative to each other. Faults are classified by the direction of movement: normal faults (extensional), reverse/thrust faults (compressional), and strike-slip faults (lateral).
| Fault Type | Movement | Tectonic Setting | Example |
|---|---|---|---|
| Normal | Hanging wall drops | Divergent boundary, rifting | Basin and Range, USA |
| Reverse (Thrust) | Hanging wall rises | Convergent boundary, compression | Himalayan frontal thrust |
| Strike-slip | Lateral sliding | Transform boundary | San Andreas Fault |
| Oblique-slip | Combined vertical + lateral | Complex tectonic zones | Alpine Fault, New Zealand |
from quakefyi.api import QuakeFYI
# Explore fault lines and their classifications
with QuakeFYI() as api:
faults = api.list_faults()
san_andreas = api.get_fault("san-andreas-fault")
# Access seismology glossary terms
glossary = api.list_glossary()
term = api.get_term("epicenter")
Learn more: Fault Lines · Glossary · FAQs
Historical Earthquakes and Case Studies
Historical earthquakes provide critical data for understanding seismic hazard and improving building codes. The deadliest recorded earthquake was the 1556 Shaanxi earthquake in China, which killed an estimated 830,000 people. The strongest instrumentally recorded earthquake was the 1960 Valdivia earthquake in Chile at Mw 9.5.
from quakefyi.api import QuakeFYI
# Explore historical earthquakes and case studies
with QuakeFYI() as api:
historical = api.list_historical()
case_studies = api.list_case_studies()
study = api.get_case_study("1906-san-francisco")
# Read expert guides on seismology topics
guides = api.list_guides()
Learn more: Historical Earthquakes · Case Studies · Guides
Command-Line Interface
pip install "quakefyi[cli]"
# Search for earthquakes
quakefyi search "Tohoku 2011"
# Output is JSON for easy piping
quakefyi search "magnitude 9" | jq '.results[0]'
MCP Server (Claude, Cursor, Windsurf)
Add earthquake data tools to any AI assistant that supports Model Context Protocol.
pip install "quakefyi[mcp]"
Add to your claude_desktop_config.json:
{
"mcpServers": {
"quakefyi": {
"command": "python",
"args": ["-m", "quakefyi.mcp_server"]
}
}
}
Available tools: search_quakefyi
REST API Client
from quakefyi.api import QuakeFYI
with QuakeFYI() as api:
# List endpoints
earthquakes = api.list_earthquakes()
plates = api.list_plates()
faults = api.list_faults()
historical = api.list_historical()
glossary = api.list_glossary()
guides = api.list_guides()
# Detail endpoints
quake = api.get_earthquake("2011-tohoku")
plate = api.get_plate("pacific-plate")
# Search
results = api.search("tsunami")
API Reference
| Method | Description |
|---|---|
list_earthquakes(**params) |
List all earthquakes |
get_earthquake(slug) |
Get earthquake detail |
list_plates(**params) |
List all tectonic plates |
get_plate(slug) |
Get plate detail |
list_faults(**params) |
List all fault lines |
get_fault(slug) |
Get fault detail |
list_historical(**params) |
List historical earthquakes |
get_historical(slug) |
Get historical earthquake detail |
list_case_studies(**params) |
List all case studies |
get_case_study(slug) |
Get case study detail |
list_yearly_summaries(**params) |
List yearly summaries |
get_yearly_summary(slug) |
Get yearly summary detail |
list_countries(**params) |
List all countries |
get_country(slug) |
Get country detail |
list_glossary(**params) |
List glossary terms |
get_term(slug) |
Get glossary term detail |
list_guides(**params) |
List all guides |
get_guide(slug) |
Get guide detail |
list_faqs(**params) |
List all FAQs |
get_faq(slug) |
Get FAQ detail |
search(query) |
Search across all content |
Full API documentation at quakefyi.com/developers/.
Learn More About Earthquakes
- Browse: Earthquakes · Tectonic Plates · Faults
- Guides: Glossary · Guides
- API: REST API Docs · OpenAPI Spec
Geo FYI Family
Part of the FYIPedia open-source developer tools ecosystem -- geography, distance, elevation, and natural events.
| Package | PyPI | Description |
|---|---|---|
| distancefyi | PyPI | Haversine distance & travel times -- distancefyi.com |
| mountainfyi | PyPI | Mountains, peaks, elevation, climbing routes -- mountainfyi.com |
| quakefyi | PyPI | Earthquakes, seismic data, tectonic plates -- quakefyi.com |
| zipfyi | PyPI | ZIP/postal codes, geocoding, area lookup -- zipfyi.com |
FYIPedia Developer Tools
| Package | PyPI | npm | Description |
|---|---|---|---|
| colorfyi | PyPI | npm | Color conversion, WCAG contrast, harmonies -- colorfyi.com |
| emojifyi | PyPI | npm | Emoji encoding & metadata -- emojifyi.com |
| symbolfyi | PyPI | npm | Symbol encoding in 11 formats -- symbolfyi.com |
| unicodefyi | PyPI | npm | Unicode lookup with 17 encodings -- unicodefyi.com |
| fontfyi | PyPI | npm | Google Fonts metadata & CSS -- fontfyi.com |
| distancefyi | PyPI | npm | Haversine distance & travel times -- distancefyi.com |
| timefyi | PyPI | npm | Timezone ops & business hours -- timefyi.com |
| namefyi | PyPI | npm | Korean romanization & Five Elements -- namefyi.com |
| unitfyi | PyPI | npm | Unit conversion, 220 units -- unitfyi.com |
| holidayfyi | PyPI | npm | Holiday dates & Easter calculation -- holidayfyi.com |
| quakefyi | PyPI | -- | Earthquakes, seismic data, tectonic plates -- quakefyi.com |
| cocktailfyi | PyPI | -- | Cocktail ABV, calories, flavor -- cocktailfyi.com |
| fyipedia | PyPI | -- | Unified CLI for all FYI tools -- fyipedia.com |
License
MIT
Metadata
Release files for quakefyi 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| quakefyi-0.1.1.tar.gz | 640.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| quakefyi-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 649.8 kB
Release files / quakefyi-0.1.1.tar.gz
| Download URL | quakefyi-0.1.1.tar.gz |
|---|---|
| Size | 640.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
450623af1b7a3d61beea080f71d4510397de1879626ed1ac4d73f8300a4e92d8
|
|
BLAKE2b-256 checksum How to use checksums |
5f2421b488f5a77851777ff4a82533f052857c153631dbc998907968ccc43c82
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.10.11 {"installer":{"name":"uv","version":"0.10.11","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / quakefyi-0.1.1-py3-none-any.whl
| Download URL | quakefyi-0.1.1-py3-none-any.whl |
|---|---|
| Size | 9.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ab56c3dddfc00d29acfb86c227182ce38856bd211f94c70d7744ef3ca9a26441
|
|
BLAKE2b-256 checksum How to use checksums |
ae442cba27cf35b427c4d72f1145213a40cd874f56155a4cefc723fced75e91d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.10.11 {"installer":{"name":"uv","version":"0.10.11","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|