GET /api/v1/
What this API is, where to start, and the daily allowance
Parámetros: ninguno
Todo lo que muestran las páginas, en JSON y con el mismo aparato: gratuita, sin autenticación y de solo lectura.
Envíe peticiones GET a https://quiescence.eu/humantoll/api/v1/. Cada respuesta lleva su estado, escenario, ejecución, versión de metodología y de datos, métricas, las fuentes que hay detrás con sus licencias, la licencia con la que puede reutilizarse la respuesta, advertencias y una cita. Hasta que se publique una ejecución validada, las cifras se retienen y cada respuesta lo dice.
Todavía no se ha publicado ninguna cifra. La API responde con el registro —productos, listas de materiales, materiales, conflictos, países, canales, escenarios, fuentes— y cada cifra es null, con la razón al lado.
GET /api/v1/ — qué es la API, sus puntos de acceso y la cuota diariaGET /api/v1/product/croissant — un producto: las dos métricas por las dos vías, su lista de materiales y la cadena que alcanzaGET /api/v1/compare?a=electric-car&b=petrol-car — dos productos extraídos juntos: el intervalo de su cocienteGET /api/v1/spend?category=07&amount=250 — 250 € de gasto de los hogares de la UE en transporteGET /api/v1/openapi.json — esta API como documento OpenAPI 3.1value es null y range_only es true).citation de la respuesta: HumanToll <año>, ejecución <id>, metodología v<versión>. <URL de la página>Las mismas claves en todos los puntos de acceso. Nunca falta una clave; si no tiene valor es null, y withheld dice por qué.
statusscenario · runmethodology_version · data_versionmetricsdatarecords de las versiones de los editores y results que calculó la ejecución.withheldsourceslicencecaveats · citationCada cifra es un objeto: value (la estimación central, o null cuando el grado es INDICATIVE), low y high (los percentiles 5 y 95 de 2.000 extracciones), confidence (HIGH, MEDIUM, LOW o INDICATIVE), range_only y unit. La construye la misma función que escribe cada cifra en las páginas, así que la API no puede mostrar un número que las páginas rechazarían.
Todos GET. El escenario, donde se aplica, es uno de S-MAX (por defecto), S-EVID, S-RES, S-ARMS y S-CONS. Un parámetro desconocido se rechaza por su nombre.
GET /api/v1/What this API is, where to start, and the daily allowance
Parámetros: ninguno
GET /api/v1/productsThe product catalogue; with a published run, each product's deaths per unit and per kg
Parámetros:
tier — semi_finished or finished. semi_finished · finishedcategory — A product category code, as each product's `category.code` gives it. sort — name, toll (deaths per kg on the material route), confidence or complete. name · toll · confidence · completescenario — The attribution scenario. The default is the published default (S-MAX). S-MAX · S-EVID · S-RES · S-ARMS · S-CONSGET /api/v1/product/{slug}One product: both routes and both metrics, the bill of materials and the chain it reaches
Parámetros:
slug (obligatorio) — The product's permanent slug, as in its page's address. scenario — The attribution scenario. The default is the published default (S-MAX). S-MAX · S-EVID · S-RES · S-ARMS · S-CONSGET /api/v1/product/{slug}/contributionsWhat carries one figure: its breakdown by material, country, conflict, channel or industry
Parámetros:
slug (obligatorio) — The product's permanent slug, as in its page's address. metric — deaths or injuries. deaths · injuriesmethod — material (the route through the bill of materials) or mrio (per €1,000). material · mriotype — One breakdown; all of the route's when absent. material · country · conflict · channel · sectorscenario — The attribution scenario. The default is the published default (S-MAX). S-MAX · S-EVID · S-RES · S-ARMS · S-CONSGET /api/v1/product/{slug}/explainThe audit trail of one figure: every stage, each summing to the headline
Parámetros:
slug (obligatorio) — The product's permanent slug, as in its page's address. metric — deaths or injuries. deaths · injuriesscenario — The attribution scenario. The default is the published default (S-MAX). S-MAX · S-EVID · S-RES · S-ARMS · S-CONSGET /api/v1/compareTwo products drawn together: the interval of their ratio, and a verdict only where it holds
Parámetros:
a (obligatorio) — The first product's slug. b (obligatorio) — The second product's slug. metric — deaths or injuries. deaths · injuriesscenario — The attribution scenario. The default is the published default (S-MAX). S-MAX · S-EVID · S-RES · S-ARMS · S-CONSGET /api/v1/spendEU households' spending on each consumption category: the harm in €amount, grouped against all spending
Parámetros:
category — A COICOP 2018 category code; all of them when absent. amount — Euros spent; every figure and its interval scale with it. scenario — The attribution scenario. The default is the published default (S-MAX). S-MAX · S-EVID · S-RES · S-ARMS · S-CONSGET /api/v1/material/{slug}A raw material: who produces it, which products use it, and what it carries in a run
Parámetros:
slug (obligatorio) — The material's permanent slug, as in its page's address. scenario — The attribution scenario. The default is the published default (S-MAX). S-MAX · S-EVID · S-RES · S-ARMS · S-CONSGET /api/v1/conflict/{slug}A scored conflict: the deaths UCDP counted, the model's attribution, and the products it reaches
Parámetros:
slug (obligatorio) — The conflict's permanent slug, as in its page's address. scenario — The attribution scenario. The default is the published default (S-MAX). S-MAX · S-EVID · S-RES · S-ARMS · S-CONSGET /api/v1/country/{iso3}A country: the harm counted there, and the products it reaches
Parámetros:
iso3 (obligatorio) — ISO 3166-1 alpha-3, in either case. scenario — The attribution scenario. The default is the published default (S-MAX). S-MAX · S-EVID · S-RES · S-ARMS · S-CONSGET /api/v1/channel/{code}A harm channel: what it counts, how it is attributed, and what it reaches
Parámetros:
code (obligatorio) — C1 conflict · C2 work · C3 deprivation · C4 exposure. scenario — The attribution scenario. The default is the published default (S-MAX). S-MAX · S-EVID · S-RES · S-ARMS · S-CONSGET /api/v1/scenariosThe five attribution scenarios and their parameters
Parámetros: ninguno
GET /api/v1/runsThe published runs; none while figures are withheld
Parámetros: ninguno
GET /api/v1/runs/{id}One published run and the verdict of each validation gate
Parámetros:
id (obligatorio) — The run id a figure's citation names. GET /api/v1/methodologyThe versions of the methodology
Parámetros: ninguno
GET /api/v1/sourcesThe source register: every source, its licence, and the basis it is used on
Parámetros: ninguno
GET /api/v1/searchFind a product, material, conflict, country or channel
Parámetros:
q (obligatorio) — Two to 64 characters. GET /api/v1/openapi.jsonThis API as an OpenAPI 3.1 document, generated from the route table
Parámetros: ninguno
Códigos de estado reales y una sola forma: {"ok": false, "error": {"code", "message", "detail"}}. El código es estable; detail nombra el parámetro y lo que acepta.
400401404405429500503100 peticiones al día desde una misma dirección, que se renuevan a las 00:00 UTC; cada respuesta dice cuántas quedan (X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset). El documento OpenAPI no cuenta.
No se guarda ninguna dirección. El recuento se lleva bajo un hash con sal; la sal se genera cada día y se destruye, con los recuentos, cuando termina el día.
HumanToll es un proyecto de investigación, no un servicio comercial. Para un acceso avanzado a la API, contáctenos en info@quiescence.eu. info@quiescence.eu
Para una investigación que necesite más que la cuota diaria, se emite una clave a petición y sin coste: escriba a info@quiescence.eu explicando el trabajo y cuánto necesita. Envíe la clave como Authorization: Bearer <clave> (o X-API-Key); la cuota se cuenta entonces por clave en lugar de por dirección, y cada respuesta dice cuánto queda.
Una clave se muestra una sola vez, al emitirse, y HumanToll solo guarda su huella. Una clave perdida se revoca y se sustituye: no hay nada que recuperar. Una clave que no es válida se rechaza con 401. Envíela en una cabecera, nunca en la URL: las URL quedan registradas.
Cualquier origen puede leer la API (Access-Control-Allow-Origin: *). No se establece ninguna cookie, ni hace falta.