{"uid":"cap_QcqXfEr46IF5DKdZRkrGX","slug":"spain-traffic-incidents-api-16ed45b1","name":"Spain Traffic Incidents API","description":"Active traffic incidents on Spanish roads from the DGT: roadworks, accidents, queues, closures, adverse weather..., with road, kilometre point, province, municipality, coordinates and start time; filter by province, road and cause.","url":"https://api.vextorium.com/v1/spain-traffic-incidents?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method","bodyType","body"],"properties":{"body":{"required":[],"properties":{"road":{"type":"string"},"cause":{"type":"string"},"limit":{"type":"integer"},"province":{"type":"string"}}},"type":{"type":"string","const":"http"},"method":{"enum":["POST"],"type":"string"},"bodyType":{"enum":["json","form-data","text"],"type":"string"}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":["object","null"],"properties":{"total":{"type":["number","null"]},"source":{"type":["string","null"]},"by_cause":{"type":["object","null"],"properties":{"works":{"type":["number","null"]},"road damage":{"type":["number","null"]},"adverse weather":{"type":["number","null"]},"stopped vehicle":{"type":["number","null"]}}},"incidents":{"type":["array","null"],"items":{"type":["null","object"],"properties":{"km":{"type":["null","string"]},"lat":{"type":["null","number"]},"lon":{"type":["null","number"]},"road":{"type":["null","string"]},"type":{"type":["null","string"]},"cause":{"type":["null","string"]},"lanes":{"type":["null","string"]},"since":{"type":["null","string"]},"province":{"type":["null","string"]},"severity":{},"community":{"type":["null","string"]},"direction":{"type":["null","string"]},"municipality":{"type":["null","string"]}}}}}}}}}},"responseSchema":{"type":"json","example":{"total":48,"source":"DGT, Spanish National Traffic Access Point (DATEX II)","by_cause":{"works":17,"road damage":2,"adverse weather":3,"stopped vehicle":26},"incidents":[{"km":"37.0","lat":40.335796,"lon":-3.6228495,"road":"M-50","type":"RoadOrCarriagewayOrLaneManagement","cause":"obras","lanes":"leftLane","since":"2026-07-10T10:55:00.000+02:00","province":"Madrid","severity":null,"community":"Madrid, Comunidad de","direction":"northEastBound","municipality":"Madrid"},{"km":"38.0","lat":40.331955,"lon":-3.6335533,"road":"M-50","type":"RoadOrCarriagewayOrLaneManagement","cause":"obras","lanes":"_extended","since":"2026-07-10T10:55:00.000+02:00","province":"Madrid","severity":null,"community":"Madrid, Comunidad de","direction":"westBound","municipality":"Madrid"}]}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.003","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"registry","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.003/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.003","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.003","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_-tXgeK_I8qSwm-FdyKsiH","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.003","costPer":"request","priority":0,"asset":null,"unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Returns real-time road traffic incidents in Spain from the official DGT DATEX II feed, filterable by road, province, and cause.","exampleAgentPrompt":"Can you pull up current traffic incidents on the M-50 road in Madrid province from the Spanish DGT feed, and show me what's causing the disruptions?","exampleUseCases":[{"title":"Motorway congestion check before driving","prompt":"I'm about to drive from Madrid to Toledo — are there any active traffic incidents or roadworks on the A-42 in Madrid province right now?"},{"title":"Province-wide incident monitoring dashboard","prompt":"Give me a full breakdown of all current traffic incidents in Barcelona province, grouped by cause, so I can see how bad the situation is across the region."},{"title":"Adverse weather road safety alert","prompt":"Are there any road incidents caused by adverse weather conditions anywhere in Spain right now? I want to know which roads and provinces are affected."}],"resultDescription":"A JSON object containing the total number of active incidents, the data source (DGT DATEX II), a summary breakdown of incidents by cause (works, road damage, adverse weather, stopped vehicle), and a list of individual incident records each with road identifier, kilometer marker, latitude/longitude, type, cause, affected lanes, direction, severity, province, municipality, autonomous community, and timestamp.","failureModes":["Missing required 'input' wrapper object returns validation error","Invalid cause or road values may return empty incident list rather than an error","DGT upstream data feed may be temporarily unavailable causing no results or stale data","Province name misspellings may return empty results without indication of the error","Exceeding rate limits or insufficient USDC balance returns payment/authorization error"],"whenToPreferThis":"Choose this endpoint when you need real-time, official Spanish road traffic incident data sourced directly from the DGT DATEX II national access point. It is the authoritative source for Spain-specific incidents with precise geolocation, affected lane info, and cause classification. Prefer this over generic mapping APIs when you need structured, filterable incident data for Spain and want to pay per-call in USDC without a subscription.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-11T18:51:58.202Z","isFirstParty":false,"canonicalSlug":"spain-traffic-incidents-api-16ed45b1"}