You're viewing the legacy docs. They are deprecated as of May 18, 2016.
Go to current docs

Firebase Open Data Sets

Earthquake Open Data Sets

Get information on earthquakes anywhere on Earth in realtime!

Firebase Open Data Sets are deprecated and will be shut down on March 30th, 2016.


You can view the realtime public earthquake data in the App Dashboard.

Live Example

We've used this open data set to create an a map of the world's earthquakes which updates in realtime.

View source of this map.

Data Structure

Earthquake data is organized by continent and magnitude. If you wanted to get realtime updates about magnitude 6 earthquakes in Asia, you would look in /by_continent/asia/6.

    by_continent: {
        $continent: {                   // List of continents
            $magnitude: {               // Magnitudes -1 through 10
                $earthquake: {
                    alert: String,      // Alert status (green, orange, red)
                    cdi: Number,        // The maximum reported intensity for the event
                    code: String,       // A unique code for this event.
                    dmin: Number,       // Horizontal distance from the epicenter to the nearest station (in degrees).
                    felt: Number,       // The total number of felt reports submitted to the DYFI? system
                    gap: Number,        // The largest azimuthal gap between azimuthally adjacent stations (in degrees).
                    location: {         // The location of the event.
                        lat: Number,    // The event latitude
                        lng: Number     // The event longitude
                    mag: Number,        // The event magnitude
                    magType: String,    // The method or algorithm used to calculate the preferred magnitude for the event.
                    mmi: Number,        // The maximum estimated instrumental intensity for the event.
                    net: String,        // The ID of a data contributor.
                    place: String       // A human readable description of named geographic region near to the event.
                    rms: Number,        // The root-mean-square (RMS) travel time residual, in sec, using all weights.
                    sig: Number,        // A number describing how significant the event is.
                    time: Number,       // The time when the event occured
                    tsunami: Boolean,   // This flag is set to "1" for large events in oceanic regions and "0" otherwise.
                    type: String,       // Type of seismic event. (“earthquake”, “quarry”)
                    updated: Number,    // The time when this event was last updated
                    url: String         // A Link to USGS Event Page for event.

Example Code

Retrieve all magnitude 6 earthquakes in Asia:

var earthquakeRef = new Firebase("");

earthquakeRef.child("asia/6").on("child_added", showEarthquake);

function showEarthquake(snapshot) {
    var earthquake = snapshot.val();
    console.log("Mag " + earthquake.mag + " at " +;

Data Source

Earthquake data is provided by