Displacement AI API Documentation
Programmatic REST JSON APIs and token-light Markdown negotiation for querying all 32 O*NET / BLS AI workforce exposure benchmarks and computing audited displacement vs. augmentation assessments. Free, public, stateless, and requires no API key.
Public & Keyless
All read and scoring endpoints are open with zero API key or OAuth setup required. Responses are deterministic and stateless — no user profiles are persisted.
Path-Versioned (/api/v1/)
Canonical endpoints live under /api/v1/ with X-API-Version: 1.0 and X-Model-Version: DAI-2026.4. Breaking schema changes ship only under a new major path with at least 90 days of RFC 8594 Deprecation and Sunset headers.
120 req / min
Every API response advertises standard RFC RateLimit-Policy and RateLimit headers (plus Retry-After on HTTP 429) so automated agents can self-throttle cleanly.
1. List & Filter Benchmark Occupations
GET /api/v1/occupationsReturns the 32 O*NET / BLS benchmark occupations with observed vs. theoretical AI exposure, automation share, entry-level squeeze index, median wage, employment scale, 2030 outlook, and task-level lists.
| Query Param | Allowed Values | Description |
|---|---|---|
| sector | software-data, clerical-admin, finance-legal, customer-ops, creative-media, healthcare, education, skilled-trades | Filter by occupational sector. |
| regime | displacement-pressure, role-compression, augmentation-leverage, structurally-resilient | Filter by risk regime. |
| q | string | Case-insensitive search across title, SOC code, and summary. |
| sort / order | observedExposure, theoreticalExposure, automationShare, entryLevelSqueeze, medianWageUsd, usEmploymentK, outlook2030Pct · asc|desc | Sort order (default observedExposure desc). |
curl -sS "https://displacement.ai/api/v1/occupations?sector=software-data&sort=observedExposure&order=desc"
2. Compute Audited Risk Assessment
GET / POST /api/v1/assessEvaluates a customized work profile under DAI-2026.4 and returns composite displacement pressure, augmentation leverage, hiring pipeline risk, a 6-factor score audit breakdown, a 2025–2030 task allocation curve, and a tailored adaptation plan.
# Quick GET assessment
curl -sS "https://displacement.ai/api/v1/assess?occupation=paralegals&seniority=entry&aiAdoption=adhoc"
# Full custom task-mix POST assessment
curl -sS -X POST "https://displacement.ai/api/v1/assess" \
-H "Content-Type: application/json" \
-d '{
"occupationId": "software-developers",
"seniority": "entry",
"routineDigitalPct": 62,
"judgmentInterpersonalPct": 36,
"physicalOnsitePct": 2,
"aiAdoption": "adhoc",
"regulatoryFriction": "low",
"orgSize": "startup"
}'3. Markdown Content Negotiation (acceptmarkdown.com)
Accept: text/markdownEvery human-facing page on Displacement AI — including /, /occupations/[id], /calculator, /research/[slug], /methodology, and /docs — honors HTTP Accept: text/markdown with Content-Type: text/markdown; charset=utf-8 and Vary: Accept. Nonexistent paths return HTTP 404 with a structured Markdown error body linking to /llms.txt and /docs.
curl -sS -i -H "Accept: text/markdown" "https://displacement.ai/" curl -sS -i -H "Accept: text/markdown" "https://displacement.ai/occupations/software-developers"
4. Structured Error Responses (RFC 9457)
application/problem+jsonInvalid parameters, unknown occupation IDs, malformed JSON, unsupported HTTP methods, and unknown /api/* paths never return HTML error pages. Every failure returns a machine-readable RFC 9457 JSON object with a stable code, human message, and actionable resolution hint.
| Error Code | HTTP | Cause & Resolution |
|---|---|---|
| unknown_occupation | 400 | The supplied occupation slug does not match one of the 32 benchmark O*NET roles. Resolution: Query GET /api/v1/occupations to retrieve valid occupation IDs. |
| invalid_parameter | 400 | A query or JSON body parameter (seniority, aiAdoption, orgSize, regulatoryFriction, or task %) failed validation. Resolution: Use the allowed enum values or numeric range [0, 100] reported in error.details. |
| invalid_sector | 400 | The sector filter passed to /api/v1/occupations is not one of the 8 recognized sector IDs. Resolution: Use software-data, clerical-admin, finance-legal, customer-ops, creative-media, healthcare, education, or skilled-trades. |
| invalid_json | 400 | The POST /api/v1/assess request body could not be parsed as valid JSON. Resolution: Send a valid JSON object with Content-Type: application/json. |
| endpoint_not_found | 404 | No API endpoint matches the requested /api/* path. Resolution: Consult /openapi.json or /docs for valid v1 paths (/api/v1/occupations, /api/v1/assess). |
| method_not_allowed | 405 | The HTTP method is unsupported on the target endpoint. Resolution: Inspect the Allow response header and retry with GET or POST. |