Skip to main content

Earthquake is a simple tool for getting earthquake data. It returns the earthquake data for the past hour.

Project description

Worldwide Earthquakes API

Earthquake is a simple tool for getting earthquake data. It returns the earthquake data for the past hour.

Build Status Code Climate Prod Ready

This is a Python API Wrapper for the Worldwide Earthquakes API


Installation

pip install apiverve-worldwideearthquakes

Configuration

Before using the earthquake API client, you have to setup your account and obtain your API Key.
You can get it by signing up at https://apiverve.com


Usage

The Worldwide Earthquakes API documentation is found here: https://docs.apiverve.com/api/earthquake.
You can find parameters, example responses, and status codes documented here.

Setup

# Import the client module
from apiverve_worldwideearthquakes.apiClient import EarthquakeAPIClient

# Initialize the client with your APIVerve API key
api = EarthquakeAPIClient("[YOUR_API_KEY]")

Perform Request

Using the API client, you can perform requests to the API.

Define Query
This API does not require a Query
Simple Request
# Make a request to the API
result = api.execute()

# Print the result
print(result)
Example Response
{
  "status": "ok",
  "error": null,
  "data": {
    "earthquakes_LastUpdated": 1725181203,
    "earthquakes_LastHour": 9,
    "earthquakes": [
      {
        "mag": 3.5,
        "place": "31 km NE of Seeley Lake, Montana",
        "time": 1725180427137,
        "status": "reviewed",
        "tsunami": 0,
        "sig": 188,
        "net": "us",
        "types": ",origin,phase-data,",
        "nst": 34,
        "dmin": 0.441,
        "rms": 0.43,
        "gap": 52,
        "magType": "ml",
        "type": "earthquake",
        "title": "M 3.5 - 31 km NE of Seeley Lake, Montana",
        "coordinates": [
          -113.1597,
          47.3504
        ]
      },
      {
        "mag": 1.7,
        "place": "35 km SSE of Denali National Park, Alaska",
        "time": 1725180060840,
        "status": "automatic",
        "tsunami": 0,
        "sig": 44,
        "net": "ak",
        "types": ",origin,phase-data,",
        "rms": 0.44,
        "magType": "ml",
        "type": "earthquake",
        "title": "M 1.7 - 35 km SSE of Denali National Park, Alaska",
        "coordinates": [
          -151.3884,
          63.2649
        ]
      },
      {
        "mag": 1.65,
        "place": "24 km E of Maricopa, CA",
        "time": 1725179864060,
        "status": "automatic",
        "tsunami": 0,
        "sig": 42,
        "net": "ci",
        "types": ",nearby-cities,origin,phase-data,scitech-link,",
        "nst": 44,
        "dmin": 0.0519,
        "rms": 0.25,
        "gap": 39,
        "magType": "ml",
        "type": "earthquake",
        "title": "M 1.7 - 24 km E of Maricopa, CA",
        "coordinates": [
          -119.1373333,
          35.0863333
        ]
      },
      {
        "mag": 1.7,
        "place": "55 km SW of Karluk, Alaska",
        "time": 1725178752780,
        "status": "automatic",
        "tsunami": 0,
        "sig": 44,
        "net": "ak",
        "types": ",origin,phase-data,",
        "rms": 0.1,
        "magType": "ml",
        "type": "earthquake",
        "title": "M 1.7 - 55 km SW of Karluk, Alaska",
        "coordinates": [
          -155.1242,
          57.2289
        ]
      },
      {
        "mag": 1.29,
        "place": "2 km ENE of The Geysers, CA",
        "time": 1725178615560,
        "status": "automatic",
        "tsunami": 0,
        "sig": 26,
        "net": "nc",
        "types": ",nearby-cities,origin,phase-data,scitech-link,",
        "nst": 16,
        "dmin": 0.004639,
        "rms": 0.02,
        "gap": 86,
        "magType": "md",
        "type": "earthquake",
        "title": "M 1.3 - 2 km ENE of The Geysers, CA",
        "coordinates": [
          -122.731666564941,
          38.7856674194336
        ]
      },
      {
        "mag": 0.6,
        "place": "10 km ENE of Goldfield, Nevada",
        "time": 1725178373409,
        "status": "automatic",
        "tsunami": 0,
        "sig": 6,
        "net": "nn",
        "types": ",origin,phase-data,",
        "nst": 8,
        "dmin": 0.566,
        "rms": 0.1218,
        "gap": 178.65000000000003,
        "magType": "ml",
        "type": "earthquake",
        "title": "M 0.6 - 10 km ENE of Goldfield, Nevada",
        "coordinates": [
          -117.1233,
          37.7492
        ]
      },
      {
        "mag": 0.46,
        "place": "9 km SW of Idyllwild, CA",
        "time": 1725177904710,
        "status": "automatic",
        "tsunami": 0,
        "sig": 3,
        "net": "ci",
        "types": ",nearby-cities,origin,phase-data,scitech-link,",
        "nst": 30,
        "dmin": 0.06759,
        "rms": 0.13,
        "gap": 74,
        "magType": "ml",
        "type": "earthquake",
        "title": "M 0.5 - 9 km SW of Idyllwild, CA",
        "coordinates": [
          -116.788,
          33.6831667
        ]
      },
      {
        "mag": 0.69,
        "place": "6 km ENE of Desert Hot Springs, CA",
        "time": 1725177853710,
        "status": "automatic",
        "tsunami": 0,
        "sig": 7,
        "net": "ci",
        "types": ",nearby-cities,origin,phase-data,scitech-link,",
        "nst": 35,
        "dmin": 0.04555,
        "rms": 0.14,
        "gap": 67,
        "magType": "ml",
        "type": "earthquake",
        "title": "M 0.7 - 6 km ENE of Desert Hot Springs, CA",
        "coordinates": [
          -116.4411667,
          33.9775
        ]
      },
      {
        "mag": 2.1,
        "place": "10 km NNW of Fritz Creek, Alaska",
        "time": 1725177706119,
        "status": "automatic",
        "tsunami": 0,
        "sig": 68,
        "net": "ak",
        "types": ",origin,phase-data,",
        "rms": 0.33,
        "magType": "ml",
        "type": "earthquake",
        "title": "M 2.1 - 10 km NNW of Fritz Creek, Alaska",
        "coordinates": [
          -151.3974,
          59.8151
        ]
      }
    ]
  },
  "code": 200
}

Customer Support

Need any assistance? Get in touch with Customer Support.


Updates

Stay up to date by following @apiverveHQ on Twitter.


Legal

All usage of the APIVerve website, API, and services is subject to the APIVerve Terms of Service and all legal documents and agreements.


License

Licensed under the The MIT License (MIT)

Copyright (©) 2024 APIVerve, and Evlar LLC

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

apiverve_worldwideearthquakes-1.1.5.tar.gz (8.6 kB view details)

Uploaded Source

Built Distribution

File details

Details for the file apiverve_worldwideearthquakes-1.1.5.tar.gz.

File metadata

File hashes

Hashes for apiverve_worldwideearthquakes-1.1.5.tar.gz
Algorithm Hash digest
SHA256 cf7fe187e456da2db45f379a36cc7d6dc4a661ce1a83e48c2caf6a1ba8e34016
MD5 9050089809eff0f3e0a10fb5b05ea491
BLAKE2b-256 43dbcdd22b2888120859bbc48c4e26cda4546e58674bbeeafe5234ff521aaf2a

See more details on using hashes here.

File details

Details for the file apiverve_worldwideearthquakes-1.1.5-py3-none-any.whl.

File metadata

File hashes

Hashes for apiverve_worldwideearthquakes-1.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 a4496da55255e350d470004de0f97397107d9514d860f310b979ecf666e6e5ed
MD5 b75620800e61dd807b6f0860de36b516
BLAKE2b-256 4a0642533810e67a3a21e4f3c7b963d48872aeab5335b61de6c3b1a5f1d58c21

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page