/api/hazard/earthquake/1 क्रेडिटभूकंप की घटनाएँ
United States Geological Survey की FDSN भूकंप सेवा के लिए पास-थ्रू प्रॉक्सी। यह पुराने और लगभग रीयल-टाइम भूकंपों का डेटा सेट है, कोई ज्योतिषीय गणना नहीं; यह यहाँ इसलिए है कि मेदिनी ज्योतिष और घटनाओं के मिलान का काम घटनाएँ और कुंडली डेटा, दोनों एक ही API से ले सके। हर क्वेरी पैरामीटर बिना बदले USGS को भेजा जाता है, इसलिए FDSN के सभी पैरामीटर काम करते हैं: ISO 8601 में `starttime` और `endtime` (डिफ़ॉल्ट: पिछले तीस दिन), `minlatitude`/`maxlatitude`/`minlongitude`/`maxlongitude` से आयताकार क्षेत्र, या `latitude`/`longitude` के साथ `maxradius` या `maxradiuskm` से वृत्ताकार क्षेत्र, `minmagnitude`/`maxmagnitude`, `mindepth`/`maxdepth`, `minsig`/`maxsig`, PAGER `alertlevel`, `eventtype`, `reviewstatus`, अधिकतम 20000 तक `limit`, `offset` और `orderby`। उत्तर USGS का GeoJSON FeatureCollection है, ठीक वैसा जैसा USGS देता है: नतीजों के `count` वाला `metadata` ऑब्जेक्ट, और `features` सूची, जिसकी हर प्रविष्टि में `geometry` ([देशांतर, अक्षांश, km में गहराई]) और `properties` ऑब्जेक्ट होता है — तीव्रता, जगह का विवरण, epoch-मिलीसेकंड में `time`, महसूस होने की रिपोर्टें, Mercalli और Community तीव्रता, महत्व, सुनामी फ़्लैग और USGS पर घटना के पेज का URL। `format` पैरामीटर अनदेखा होता है और हमेशा geojson ही रहता है। USGS तक न पहुँच पाने पर एंडपॉइंट 503 लौटाता है।
https://api.occultapi.com/api/hazard/earthquake/ऑथेंटिकेशन
अपनी कुंजी X-API-Key हेडर में भेजें। कुंजी सिर्फ़ सर्वर पर रखने की चीज़ है — इसे कभी ब्राउज़र के JavaScript या मोबाइल ऐप में न डालें।
X-API-Key: yt_live_a1b2c3d4_…क्वेरी पैरामीटर (42)
ये URL में भेजे जाते हैं। जिन पर ज़रूरी न लिखा हो, वे सब वैकल्पिक हैं, और इन्हें साथ में इस्तेमाल कर सकते हैं — पहले फ़िल्टर, फिर पेज, फिर क्रम।
| पैरामीटर | टाइप | उदाहरण | क्या करता है | |
|---|---|---|---|---|
| alertlevel | string | green | किसी विशेष PAGER चेतावनी स्तर वाली घटनाओं तक सीमित करेंइनमें से एक: green, orange, red, yellow | |
| catalog | string | — | किसी विशेष कैटलॉग की घटनाओं तक सीमित करें | |
| contributor | string | — | किसी विशेष योगदानकर्ता की दी गई घटनाओं तक सीमित करें | |
| endtime | string | 2024-12-31 | समय सीमा का अंत (ISO8601)। डिफ़ॉल्ट: वर्तमान समय ISO तारीख़, या तारीख़-समय। यह तारीख़ भी शामिल होती है। | |
| eventid | string | — | ID से कोई एक घटना चुनें (इससे includeallorigins और includeallmagnitudes अपने-आप लागू हो जाते हैं) फ़्री-फ़ॉर्म USGS घटना ID (जैसे 'us7000abcd'। इसे चुनने पर includeallorigins और includeallmagnitudes अपने-आप लागू हो जाते हैं। बिना बदले आगे भेजा जाता है। | |
| eventtype | string | — | किसी विशेष प्रकार की घटनाओं तक सीमित करें (जैसे 'earthquake' भूकंप के अलावा बाकी घटनाएँ हटा देता है) | |
| includeallmagnitudes | boolean | — | हर घटना की सभी तीव्रताएँ शामिल करें (डिफ़ॉल्ट: false) | |
| includeallorigins | boolean | — | हर घटना के सभी उद्गम शामिल करें (डिफ़ॉल्ट: false) | |
| includearrivals | boolean | — | फ़ेज़ आगमन शामिल करें (डिफ़ॉल्ट: false, अभी लागू नहीं) | |
| includedeleted | string | — | हटाई गई घटनाएँ शामिल करें (डिफ़ॉल्ट: false)। केवल हटाई गई घटनाएँ लौटाने के लिए 'only' इस्तेमाल करें एंडपॉइंट के अपने पैरामीटर विवरण में इसे बूलियन या 'only' बताया गया है (“हटाई गई घटनाएँ शामिल करें (डिफ़ॉल्ट: false)। केवल हटाई गई घटनाएँ लौटाने के लिए 'only' इस्तेमाल करें”। यहाँ कोई जाँच नहीं होती - वैल्यू सीधे USGS को जाती है, और जाँच वहीं होती है। इनमें से एक: true, false, only | |
| includesuperseded | boolean | — | पुराने, बदले जा चुके उत्पाद (superseded products) भी शामिल करें (डिफ़ॉल्ट: false)। केवल eventid के साथ काम करता है | |
| latitude | number | 26.9124 | वृत्ताकार खोज के केंद्र का अक्षांश [-90, 90]। साथ में देशांतर और maxradius/maxradiuskm भी ज़रूरी हैं वृत्ताकार खोज का केंद्र, देशांतर और maxradiuskm के साथ इस्तेमाल होता है। | |
| limit | integer | 20 | लौटाई जाने वाली घटनाओं की अधिकतम संख्या [1, 20000] प्रति पेज कितने रिकॉर्ड लौटाने हैं। | |
| longitude | number | 75.7873 | वृत्ताकार खोज के केंद्र का देशांतर [-180, 180] | |
| maxalertlevel | string | green | केवल वे घटनाएँ जिनका PAGER चेतावनी स्तर इस वैल्यू से कम या बराबर (≤) होइनमें से एक: green, orange, red, yellow | |
| maxcdi | number | — | अधिकतम Community Determined Intensity (DYFI) [0, 12] | |
| maxdepth | number | — | km में अधिकतम गहराई [-100, 1000] | |
| maxgap | number | — | अंशों में अधिकतम दिगंशीय अंतराल [0, 360] | |
| maxlatitude | number | — | आयताकार क्षेत्र की उत्तरी सीमा [-90, 90] | |
| maxlongitude | number | — | आयताकार क्षेत्र की पूर्वी सीमा [-360, 360] | |
| maxmagnitude | number | 9 | अधिकतम तीव्रता | |
| maxmmi | number | — | अधिकतम Modified Mercalli Intensity (ShakeMap) [0, 12] | |
| maxradius | number | — | केंद्र बिंदु से अंशों में अधिकतम त्रिज्या [0, 180]। इसे और maxradiuskm को एक साथ नहीं भेज सकते | |
| maxradiuskm | number | 500 | केंद्र बिंदु से km में अधिकतम त्रिज्या [0, 20001.6]। इसे और maxradius को एक साथ नहीं भेज सकते अक्षांश/देशांतर के आसपास किलोमीटर में खोज त्रिज्या। | |
| maxsig | integer | — | अधिकतम महत्व | |
| minalertlevel | string | green | केवल वे घटनाएँ जिनका PAGER चेतावनी स्तर इस वैल्यू से ज़्यादा या बराबर (≥) होइनमें से एक: green, orange, red, yellow | |
| mincdi | number | — | न्यूनतम Community Determined Intensity (DYFI) | |
| mindepth | number | — | km में न्यूनतम गहराई [-100, 1000] | |
| minfelt | integer | — | DYFI उत्तरों की न्यूनतम संख्या [1, ∞] | |
| mingap | number | — | अंशों में न्यूनतम दिगंशीय अंतराल [0, 360] | |
| minlatitude | number | — | आयताकार क्षेत्र की दक्षिणी सीमा [-90, 90] | |
| minlongitude | number | — | आयताकार क्षेत्र की पश्चिमी सीमा [-360, 360]। minlongitude < -180 या maxlongitude > 180 देकर आयत अंतरराष्ट्रीय तिथि रेखा (date line) के पार भी जा सकता है | |
| minmagnitude | number | 6 | न्यूनतम तीव्रता रिक्टर तीव्रता की निचली सीमा। 6 या उससे ज़्यादा तीव्रता वाला भूकंप बड़ा माना जाता है। | |
| minsig | integer | — | न्यूनतम महत्व | |
| nodata | integer | 204 | कोई डेटा न मिलने पर लौटाया जाने वाला HTTP स्टेटस कोड (204 या 404)इनमें से एक: 204, 404 | |
| offset | integer | 0 | इस क्रम संख्या से नतीजे लौटाएँ (गिनती 1 से, 1-based) पेजिंग के लिए कितने रिकॉर्ड छोड़ने हैं। | |
| orderby | string | magnitude | नतीजों को किस फ़ील्ड के हिसाब से क्रम में रखना हैइनमें से एक: magnitude, magnitude-asc, time, time-asc | |
| productcode | string | — | इस उत्पाद कोड से जुड़ी घटना लौटाएँ फ़्री-फ़ॉर्म USGS उत्पाद कोड। बिना बदले आगे भेजा जाता है। | |
| producttype | string | — | इस उत्पाद प्रकार वाली घटनाओं तक सीमित करें (जैसे moment-tensor, focal-mechanism, shakemap, losspager, dyfi) | |
| reviewstatus | string | automatic | किसी विशेष समीक्षा स्थिति वाली घटनाओं तक सीमित करेंइनमें से एक: automatic, reviewed | |
| starttime | string | 2024-01-01 | समय सीमा का आरंभ (ISO8601, जैसे 2022-01-01 या 2022-01-01T00:00:00)। डिफ़ॉल्ट: अभी - 30 दिन ISO तारीख़, या तारीख़-समय। यह तारीख़ भी शामिल होती है। | |
| updatedafter | string | — | इस समय के बाद अपडेट हुई घटनाओं तक सीमित करें (ISO8601) फ़ॉर्मैट की शर्त। ISO 8601। बिना बदले USGS को आगे भेजा जाता है। |
उदाहरण अनुरोध
curl "https://api.occultapi.com/api/hazard/earthquake/" \
-H "X-API-Key: $OCCULT_API_KEY"उत्तर
{
"_truncated": true,
"_note": "Response shortened for the catalogue.",
"preview": "{\"type\": \"FeatureCollection\", \"metadata\": {\"generated\": 1788775941000, \"url\": \"https://earthquake.usgs.gov/fdsnws/event/1/query?format=geojson\", \"title\": \"USGS Earthquakes\", \"status\": 200, \"api\": \"2.7.0\", \"count\": 10949}, \"features\": [{\"type\": \"Feature\", \"properties\": {\"mag\": 1.3, \"place\": \"78 km WNW of Tyonek, Alaska\", \"time\": 1788775260489, \"updated\": 1788775310002, \"tz\": null, \"url\": \"https://earthquake.usgs.gov/earthquakes/eventpage/aka2026rsrmqf\", \"detail\": \"https://earthquake.usgs.gov/fdsnws/event/1/query?eventid=aka2026rsrmqf&format=geojson\", \"felt\": null, \"cdi\": null, \"mmi\": null, \"alert\": null, \"status\": \"automatic\", \"tsunami\": 0, \"sig\": 26, \"net\": \"ak\", \"code\": \"a2026rsrmqf\", \"ids\": \",aka2026rsrmqf,\", \"sources\": \",ak,\", \"types\": \",origin,phase-data,\", \"nst\": 17, \"dmin\": 0, \"rms\": 0.3, \"gap\": 92, \"magType\": \"ml\", \"type\": \"earthquake\", \"title\": \"M 1.3 - 78 km WNW of Tyonek, Alaska\"}, \"geometry\": {\"type\": \"Point\", \"coordinates\": [-152.516, 61.307, 4.2]}, \"id\": \"aka2026rsrmqf\"}, {\"type\": \"Feature\", \"properties\": {\"mag\": 2.2, \"place\": \"36 km W of Happy Valley, Alaska\", \"time\": 1788774950719, \"updated\": 1788775176753, \"tz\": null, \"url\": \"https://earthquake.usgs.gov/earthquakes/eventpage/aka2026rsridv\", \"detail\": \"https://earthquake.usgs.gov/fdsnws/event/1/query?eventid=aka2026rsridv&format=geojson\", \"felt\": null, \"cdi\": null, \"mmi\": null, \"alert\": null, \"status\": \"automatic\", \"tsunami\": 0, \"sig\": 74, \"net\": \"ak\", \"code\": \"a2026rsridv\", \"ids\": \",aka2026rsridv,\", \"sources\": \",ak,\", \"types\": \",origin,phase-data,\", \"nst\": 68, \"dmin\": 0.3, \"rms\": 0.6, \"gap\": 53, \"magType\": \"ml\", \"type\": \"earthquake\", \"title\": \"M 2.2 - 36 km W of Happy Valley, Alaska\"}, \"geometry\": {\"type\": \"Point\", \"coordinates\": [-152.39, 59.98, 79.6]}, \"id\": \"aka2026rsridv\"}, {\"type\": \"Feature\", \"properties\": {\"mag\": 1.7, \"place\": \"28 km NNW of Pāhala, Hawaii\", \"time\": 1788774479410, \"updated\": 1788774689400, \"tz\": null, \"url\": \"https://earthquake.usgs.gov/earthquakes/eventpage/hv75030377\", \"detail\": \"https://earthquake.usgs.gov/fdsnws/event/1/query?eventid=hv75030377&format=geojson\", \"felt\": null, \"cdi\": null, \"mmi\": null, \"alert\": null, \"status\": \"automatic\", \"tsunami\": 0, \"sig\": 44, \"net\": \"hv\", \"code\": \"75030377\", \"ids\": \",hv75030377,\", \"sources\": \",hv,\", \"types\": \",origin,phase-data,\", \"nst\": 17, \"dmin\": 0.0364, \"rms\": 0.200000003, \"gap\": 68, \"magType\": \"md\", \"type\": \"earthquake\", \"title\": \"M 1.7 - 28 km NNW of Pāhala, Hawaii\"}, \"geometry\": {\"type\": \"Point\", \"coordinates\": [-155.594665527344, 19.4323329925537, 37.8300018310547]}, \"id\": \"hv75030377\"}, {\"type\": \"Feature\", \"properties\": {\"mag\": 0.7, \"place\": \"6 km WNW of Cobb, CA\", \"time\": 1788774330340, \"updated\": 1788775642619, \"tz\": null, \"url\": \"https://earthquake.usgs.gov/earthquakes/eventpage/nc75431077\", \"detail\": \"https://earthquake.usgs.gov/fdsnws/event/1/query?eventid=nc75431077&format=geojson\", \"felt\": null, \"cdi\": null, \"mmi\": null, \"alert\": null, \"status\": \"automatic\", \"tsunami\": 0, \"sig\": 8, \"net\": \"nc\", \"code\": \"75431077\", \"ids\": \",nc75431077,\", \"sources\": \",nc,\", \"types\": \",nearby-cities,origin,phase-data,scitech-link,\", \"nst\": 8, \"dmin\": 0.002696, \"rms\": 0.01, \"gap\": 122, \"magType\": \"md\", \"type\": \"earthquake\", \"title\": \"M 0.7 - 6 km WNW of Cobb, CA\"}, \"geometry\": {\"type\": \"Point\", \"coordinates\": [-122.793663024902, 38.8376655578613, 1.87999999523163]}, \"id\": \"nc75431077\"}, {\"type\": \"Feature\", \"properties\": {\"mag\": 1.5, \"place\": \"29 km W of Toyah, Texas\", \"time\": 1788773169470, \"updated\": 1788773302767, \"tz\": null, \"url\": \"https://earthquake.usgs.gov/earthquakes/eventpage/tx2026rpuovc\", \"detail\": \"https://earthquake.usgs.gov/fdsnws/event/1/query?eventid=tx2026rpuovc&format=geojson\", \"felt\": null, \"cdi\": null, \"mmi\": null, \"alert\": null, \"status\": \"automatic\", \"tsunami\": 0, \"sig\": 35, \"net\": \"tx\", \"code\": \"2026rpuovc\", \"ids\": \",tx2026rpuovc,\", \"sources\": \",tx,\", \"types\": \",origin,phase-data,\", \"nst\": 5, \"dmin\": 0.2, \"rms\": 1.2, \"gap\": 215, \"magType\": \"ml\", \"type\": \"earthquake\", \"title\": \"M 1."
}ऊपर वाले अनुरोध से ही की गई असली कॉल का उत्तर। नतीजे data के अंदर हैं।
त्रुटियाँ
कुंजी और क्रेडिट की जाँच से आई त्रुटियाँ { "error": "…", "message": "<code>", "is_error": true } रूप में आती हैं। लोगों को error दिखाएँ और कोड में message देखकर फ़ैसला करें। पूरी सूची त्रुटि संदर्भ में है।