/api/hazard/plane-crashes/1 créditoAccidentes aéreos
Un conjunto de datos almacenado de accidentes de aviación, con un relato escrito de cada uno, que se remonta a la década de 1920. Es un registro histórico de eventos y no un cálculo astrológico, y se ofrece junto a los endpoints de cartas para que la hora y el lugar de un accidente se puedan pasar directamente a una carta. Filtra con `country`, `region`, `aircraft`, `operator`, `crash_cause`, `flight_phase` y `flight_type`, todos por coincidencia parcial (subcadena) y sin distinguir mayúsculas y minúsculas, con `start_date` y `end_date` sobre la fecha del accidente, y con `min_fatalities`. `sort` admite 'newest' (por defecto), 'oldest', 'name_asc' y 'name_desc' sobre el tipo de aeronave, y 'fatalities_desc' o 'fatalities_asc'. La paginación usa `page` y `itemsPerPage`: cincuenta por página por defecto y hasta quinientos. La respuesta es una estructura paginada con `count`, `next`, `previous` y `results`. Cada resultado incluye la fecha y una cadena de hora local, el tipo de aeronave y el operador, la fase de vuelo y el tipo de vuelo, una clasificación del lugar del accidente y una ubicación en texto libre, el país y la región, la latitud y la longitud, el número de víctimas mortales de la tripulación, de los pasajeros, de otras personas y el total, la `crash_cause` indicada y un párrafo `circumstances` que describe lo ocurrido.
https://api.occultapi.com/api/hazard/plane-crashes/Autenticación
Envía tu clave en la cabecera X-API-Key. La clave es una credencial de servidor: nunca la pongas en el JavaScript del navegador ni en una app móvil.
X-API-Key: yt_live_a1b2c3d4_…Parámetros de consulta (13)
Van en la URL. Son opcionales salvo que se indique lo contrario y se pueden combinar: primero se filtra, luego se pagina y al final se ordena.
| Parámetro | Tipo | Ejemplo | Para qué sirve | |
|---|---|---|---|---|
| aircraft | string | — | Filtrar por aeronave (contiene, sin distinguir mayúsculas y minúsculas) FORMATO LIBRE; coincidencia de subcadena `icontains` sin distinguir mayúsculas y minúsculas sobre el tipo de aeronave. | |
| country | string | — | Filtrar por país (contiene, sin distinguir mayúsculas y minúsculas) | |
| crash_cause | string | — | Filtrar por causa del accidente (contiene, sin distinguir mayúsculas y minúsculas) | |
| end_date | string | — | Filtrar por fecha final (YYYY-MM-DD) Restricción de FORMATO: 'YYYY-MM-DD'. Se compara con `date__lte`. | |
| flight_phase | string | — | Filtrar por fase de vuelo (contiene, sin distinguir mayúsculas y minúsculas) | |
| flight_type | string | — | Filtrar por tipo de vuelo (contiene, sin distinguir mayúsculas y minúsculas) | |
| itemsPerPage | integer | — | Número de elementos por página | |
| min_fatalities | integer | — | Filtrar por número mínimo total de víctimas mortales | |
| operator | string | — | Filtrar por operador (contiene, sin distinguir mayúsculas y minúsculas) FORMATO LIBRE; coincidencia de subcadena `icontains` sin distinguir mayúsculas y minúsculas sobre el operador/aerolínea. | |
| page | integer | — | Número de página | |
| region | string | — | Filtrar por región (contiene, sin distinguir mayúsculas y minúsculas) | |
| sort | string | — | Orden: 'newest' (por defecto), 'oldest', 'name_asc' (aeronave A-Z), 'name_desc' (Z-A), 'fatalities_desc' (primero las de más víctimas mortales) o 'fatalities_asc' (primero las de menos) No distingue mayúsculas y minúsculas; sin espacios al principio ni al final. Valor por defecto: 'newest'. 'name_asc'/'name_desc' ordenan por AERONAVE (name_field='aircraft'), no por el nombre de una persona. Los valores no reconocidos vuelven sin aviso a 'newest'. uno de: newest, oldest, name_asc, name_desc, fatalities_desc, fatalities_asc | |
| start_date | string | — | Filtrar por fecha inicial (YYYY-MM-DD) Restricción de FORMATO: 'YYYY-MM-DD'. Se compara con `date__gte`. |
Ejemplo de solicitud
curl "https://api.occultapi.com/api/hazard/plane-crashes/" \
-H "X-API-Key: $OCCULT_API_KEY"Respuesta
{
"_truncated": true,
"_note": "Response shortened for the catalogue.",
"preview": "{\"count\": 100, \"next\": \"https://api.occultapi.com/api/hazard/plane-crashes/?page=2\", \"previous\": null, \"results\": [{\"id\": 100, \"date\": \"1926-09-29\", \"time\": \"23:55:00\", \"aircraft\": \"Farman F.60 Goliath\", \"operator\": \"French Air Force - Armée de l'Air\", \"flight_phase\": \"Flight\", \"flight_type\": \"Training\", \"crash_site\": \"Plain, Valley\", \"crash_location\": \"Bonneval Eure-et-Loir\", \"country\": \"France\", \"region\": \"Europe\", \"latitude\": 48.18118, \"longitude\": 1.386218, \"crew_fatalities\": 5, \"pax_fatalities\": 0, \"other_fatalities\": 0, \"total_fatalities\": 5, \"circumstances\": \"The crew was performing a night training flight on behalf of the 3rd Squadron of the 22nd regiment based in Chartres. While flying in the region of Bonneval, some 20 km south of Chartres, the aircraft caught fire. The pilot reduced his altitude and attempted an emergency landing. From a height of 50 meters, the aircraft stalled and crashed in a huge explosion. All five occupants were killed. Crew: Lt Jules Gindre, pilot, Sgt Pierre Pacaud, navigator, Sgt Roger Duchatelle, navigator, Sgt Raymond Rigault, mechanic, Pvt Jean Frémont, radio.\", \"crash_cause\": \"Technical failure\"}, {\"id\": 99, \"date\": \"1926-09-21\", \"time\": \"11:45:00\", \"aircraft\": \"De Havilland DH.4\", \"operator\": \"United States Army Air Corps - USAAC\", \"flight_phase\": \"Takeoff (climb)\", \"flight_type\": \"Military\", \"crash_site\": \"Airport (less than 10 km from airport)\", \"crash_location\": \"Kenley AFB Surrey\", \"country\": \"United Kingdom\", \"region\": \"Europe\", \"latitude\": 51.32609, \"longitude\": -0.101269, \"crew_fatalities\": 0, \"pax_fatalities\": 1, \"other_fatalities\": null, \"total_fatalities\": 1, \"circumstances\": \"Shortly after takeoff from RAF Kenley, while climbing, the engine failed. The aircraft stalled and crashed into trees, bursting into flames. The aircraft was destroyed and both occupants were seriously injured. The pilot died from his injuries five days later. The aircraft was based at RAF Kenley and operated on behalf of the US Embassy in London. Crew: Maj Clarence Leonard Tinker. Passenger: Cdr Robert Andrew Burg. †\", \"crash_cause\": \"Technical failure\"}, {\"id\": 98, \"date\": \"1926-09-16\", \"time\": \"20:20:00\", \"aircraft\": \"De Havilland DH.4\", \"operator\": \"Robertson Aircraft Corporation\", \"flight_phase\": \"Flight\", \"flight_type\": \"Postal (mail)\", \"crash_site\": \"Plain, Valley\", \"crash_location\": \"Ottawa Illinois\", \"country\": \"United States of America\", \"region\": \"North America\", \"latitude\": 41.346844, \"longitude\": -88.842645, \"crew_fatalities\": 0, \"pax_fatalities\": 0, \"other_fatalities\": 0, \"total_fatalities\": 0, \"circumstances\": \"The pilot Charles Lindbergh was performing a mail flight from Peoria to Chicago. En route, weather conditions worsened and he lost his orientation. Few minutes later, fuel exhausted and he eventually took the decision to bail out and abandoned the aircraft that crashed in a corn field. While the aircraft was destroyed, the aviator was unhurt.\", \"crash_cause\": \"Technical failure\"}, {\"id\": 97, \"date\": \"1926-08-20\", \"time\": \"16:05:00\", \"aircraft\": \"Hanriot HD.1\", \"operator\": \"Swiss Air Force\", \"flight_phase\": \"Flight\", \"flight_type\": \"Training\", \"crash_site\": \"Airport (less than 10 km from airport)\", \"crash_location\": \"Basel-Sternenfeld Basel City\", \"country\": \"Switzerland\", \"region\": \"Europe\", \"latitude\": 47.555943, \"longitude\": 7.588639, \"crew_fatalities\": 1, \"pax_fatalities\": 0, \"other_fatalities\": 0, \"total_fatalities\": 1, \"circumstances\": \"The pilot was performing a training flight at Basel-Sternenfeld Airport. While completing manoeuvre, he lost control of the aircraft that entered a dive and crashed near the airfield. The pilot was killed.\", \"crash_cause\": \"Human factor\"}, {\"id\": 96, \"date\": \"1926-08-18\", \"time\": \"14:30:00\", \"aircraft\": \"Blériot 155\", \"operator\": \"Air Union France\", \"flight_phase\": \"Flight\", \"flight_type\": \"Scheduled Revenue Flight\", \"crash_site\": \"Plain, Valley\", \"crash_location\": \"Ashford Kent\", \"country\": \"United Kingdom\", \"region\": \"Europe\", \"latitude\": 51.1493"
}Obtenida de una llamada real con la solicitud de arriba, tal cual. Los resultados van dentro de data.
Errores
Los errores de control de uso devuelven { "error": "…", "message": "<code>", "is_error": true }. Muestra error al usuario y usa message para decidir qué hace tu código. Consulta la referencia de errores.