{"openapi":"3.1.0","info":{"title":"USGS Earthquakes over Airnode","version":"1.0.0","description":"The USGS earthquake catalogue: every seismic event the Advanced National Seismic System has located, worldwide rather than American despite who runs it, from the last few minutes back through the historical record. This Airnode wraps its FDSN event service, so a consumer receives what the catalogue said at a moment with a signature saying this Airnode read it then.\n\nThat matters more here than it looks. An earthquake's magnitude and location are revised as more stations report: an event is first located automatically within minutes and reviewed by a seismologist afterwards, and the reviewed figure is often not the automatic one. So a response is what USGS believed at that time, the status field says which of the two it was, and asking again tomorrow is a legitimately different answer for the same event.\n\nThe format parameter is required rather than defaulted. The service answers QuakeML XML when nothing asks otherwise, and passing geojson is what produces the response this document describes.\n\nData source: U.S. Geological Survey Earthquake Hazards Program (https://earthquake.usgs.gov). USGS-produced data is in the public domain and may be reused commercially; USGS asks to be acknowledged, which this document does. USGS does not endorse, and is not affiliated with, API3, AirnodeHub or this Airnode.\n\nEvery response carries an EIP-191 signature from the Airnode that served it, so the data can be attributed back to its source rather than trusted on reputation."},"servers":[{"url":"http://airnode-usgs.fly.dev"}],"paths":{"/":{"get":{"operationId":"getDocumentation","summary":"This document.","description":"Describes the operations this Airnode serves and how to verify what it returns. Free.","responses":{"200":{"description":"An OpenAPI document describing this Airnode.","content":{"application/json":{"schema":{"type":"object"}}}}}},"post":{"operationId":"performRequest","summary":"Perform an operation and attest to the response.","requestBody":{"required":true,"content":{"application/json":{"schema":{"oneOf":[{"title":"queryEvents","type":"object","required":["operation","parameters"],"additionalProperties":false,"properties":{"operation":{"const":"queryEvents","description":"Earthquakes matching a time, place, magnitude and depth."},"parameters":{"type":"object","additionalProperties":false,"required":["format"],"properties":{"format":{"description":"Pass geojson. The service defaults to QuakeML XML and ignores what a client says it accepts, so this is the only thing that produces the response described here. The others come back as the text they are rather than as anything this document promises.","type":"string","enum":["csv","geojson","kml","quakeml","text","xml"]},"eventid":{"description":"One event by its id, which is what an earlier response's id field carries. Everything else is ignored alongside it, and this is how an event is re-read later to see whether its magnitude was revised.","type":"string","examples":["us6000tjl2"]},"starttime":{"description":"Events at or after this time, as YYYY-MM-DD or a full ISO 8601 timestamp in UTC. Omitted, thirty days ago.","type":"string"},"endtime":{"description":"Events at or before this time, same format. Omitted, now.","type":"string"},"updatedafter":{"description":"Only events whose record has changed since this time, same format. This is how revisions are found without re-reading the catalogue.","type":"string"},"minmagnitude":{"description":"Events at or above this magnitude. Around 4.5 is roughly what is felt, 6 is where damage starts.","type":"number"},"maxmagnitude":{"description":"Events at or below this magnitude.","type":"number"},"mindepth":{"description":"Events at or below this depth, in kilometres. Can be negative, since an event can be located above sea level.","type":"number"},"maxdepth":{"description":"Events at or above this depth, in kilometres.","type":"number"},"latitude":{"description":"Centre of a radius search, in degrees. Wants longitude and maxradiuskm with it.","type":"number","minimum":-90,"maximum":90},"longitude":{"description":"Centre of a radius search, in degrees.","type":"number","minimum":-180,"maximum":180},"maxradiuskm":{"description":"How far from that centre to search, in kilometres.","type":"number","minimum":0,"maximum":20001.6},"minlatitude":{"description":"Southern edge of a box search, in degrees. All four edges go together, and a box cannot be combined with a radius.","type":"number","minimum":-90,"maximum":90},"maxlatitude":{"description":"Northern edge of a box search, in degrees.","type":"number","minimum":-90,"maximum":90},"minlongitude":{"description":"Western edge of a box search, in degrees.","type":"number","minimum":-360,"maximum":360},"maxlongitude":{"description":"Eastern edge of a box search, in degrees.","type":"number","minimum":-360,"maximum":360},"alertlevel":{"description":"Only events USGS has given this PAGER alert level, which runs green to red in order of expected losses. A filter on this is the closest thing here to a search for events that mattered.","type":"string","enum":["green","yellow","orange","red"]},"eventtype":{"description":"Only events of this kind. The application operation lists them, and the catalogue is not only earthquakes.","type":"string","examples":["earthquake","quarry blast","explosion"]},"reviewstatus":{"description":"Which events to include. Reviewed means a seismologist has been over it, which is the figure worth relying on.","type":"string","enum":["automatic","reviewed","all"]},"catalog":{"description":"Only events from this contributing catalogue. The application operation lists them.","type":"string","examples":["us","ak"]},"limit":{"description":"How many events to return.","type":"integer","minimum":1,"maximum":20000},"offset":{"description":"How many events to skip, which is how the next page is asked for.","type":"integer","minimum":1},"orderby":{"description":"Which order to answer in, by when or by how large. time leads with the newest.","type":"string","enum":["time","time-asc","magnitude","magnitude-asc"],"default":"time"}}}}},{"title":"countEvents","type":"object","required":["operation","parameters"],"additionalProperties":false,"properties":{"operation":{"const":"countEvents","description":"How many earthquakes a search would return.","x-airnode-returns":{"count":"integer","maxAllowed":"integer"}},"parameters":{"type":"object","additionalProperties":false,"required":["format"],"properties":{"format":{"description":"Pass geojson. Without it this answers a bare number as plain text rather than the object described here.","type":"string","enum":["geojson","text","xml"]},"starttime":{"description":"Events at or after this time, as YYYY-MM-DD or a full ISO 8601 timestamp in UTC. Omitted, thirty days ago.","type":"string"},"endtime":{"description":"Events at or before this time, same format.","type":"string"},"minmagnitude":{"description":"Events at or above this magnitude.","type":"number"},"maxmagnitude":{"description":"Events at or below this magnitude.","type":"number"},"latitude":{"description":"Centre of a radius search, in degrees.","type":"number","minimum":-90,"maximum":90},"longitude":{"description":"Centre of a radius search, in degrees.","type":"number","minimum":-180,"maximum":180},"maxradiuskm":{"description":"How far from that centre to search, in kilometres.","type":"number","minimum":0,"maximum":20001.6},"minlatitude":{"description":"Southern edge of a box search, in degrees.","type":"number","minimum":-90,"maximum":90},"maxlatitude":{"description":"Northern edge of a box search, in degrees.","type":"number","minimum":-90,"maximum":90},"minlongitude":{"description":"Western edge of a box search, in degrees.","type":"number","minimum":-360,"maximum":360},"maxlongitude":{"description":"Eastern edge of a box search, in degrees.","type":"number","minimum":-360,"maximum":360},"alertlevel":{"description":"Only events at this PAGER alert level, which runs green to red in order of expected losses.","type":"string","enum":["green","yellow","orange","red"]},"eventtype":{"description":"Only events of this kind.","type":"string","examples":["earthquake"]}}}}},{"title":"getApplication","type":"object","required":["operation","parameters"],"additionalProperties":false,"properties":{"operation":{"const":"getApplication","description":"The vocabularies the filters are written in.","x-airnode-returns":{"catalogs":"array","contributors":"array","producttypes":"array","eventtypes":"array","magnitudetypes":"array"}},"parameters":{"type":"object","additionalProperties":false,"required":[],"properties":{}}}}]}}}},"responses":{"200":{"description":"The upstream response and the attestation over it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Attestation"}}}},"400":{"description":"The operation exists but the parameters are missing, unknown or malformed."},"404":{"description":"No such operation."},"502":{"description":"The upstream API could not be reached or refused the request."}}}}},"components":{"schemas":{"Attestation":{"type":"object","required":["airnode","requestHash","timestamp","data","signature"],"properties":{"airnode":{"type":"string","description":"The address whose signature attests to this response."},"requestHash":{"type":"string","description":"Identifies the request this response answers."},"timestamp":{"type":"string","description":"Unix seconds at which the response was signed."},"data":{"description":"The upstream response body: the JSON value when it parses as JSON, the text as received otherwise."},"signature":{"type":"string","description":"The attestation itself."}}}}},"x-airnode":{"address":"0x5aF744115e2577513D878D4263Db73b3E77E7630","version":"0.1.0","attestation":{"scheme":"eip191-secp256k1","digest":"keccak256(abi.encodePacked(bytes32 requestHash, uint256 timestamp, bytes dataBytes))","dataBytes":"UTF-8 of data, or of its compact JSON when data is not a string","requestHash":"keccak256(utf8(JSON.stringify([operation, parameterEntriesSortedByName]))), where an object value is itself entries sorted by name, at any depth, and an array keeps its order","verify":"Recover the signer of the signature over the digest and check it equals the address above."}}}