Live traffic data for England's motorways and major A-roads - journey times, traffic flow, and sensor site metadata (WebTRIS).
This is a community listing. If you own this API, you can request ownership.
npm install omnistream-sdkimport { OmniClient } from "omnistream-sdk";
const omni = new OmniClient({ token: process.env.OMNI_KEY! });
// One key reaches every API on the marketplace.
const data = await omni.call("highwaysengland/Areas_Get");One install, one key - the same client calls every API on the marketplace.
Returns list of areas
Returns details of selected area
Get Site DailyQuality
Get Site OverallQuality
Gets the daily report.
/**
* HighwaysEnglandAPI - generated by OmniStream from Highways England API's OpenAPI spec.
* One typed method per endpoint. A single Omni key reaches the API.
*/
const DEFAULT_BASE = "https://grid.skinvaults.online/v1/proxy/highwaysengland";
export class HighwaysEnglandAPIError extends Error {
status: number;
code?: string;
constructor(status: number, code: string | undefined, message?: string) {
super(message || `HighwaysEnglandAPI error ${status}`);
this.name = "HighwaysEnglandAPIError";
this.status = status;
this.code = code;
}
}
export interface HighwaysEnglandAPIOptions {
baseUrl?: string;
fetch?: typeof fetch;
timeoutMs?: number;
}
export class HighwaysEnglandAPI {
/** @param token Your OmniStream key (one key for every API). */
constructor(private token: string, private opts: HighwaysEnglandAPIOptions = {}) {
if (!token) throw new Error("HighwaysEnglandAPI: token is required");
}
rateLimit: { remainingMinute?: number; remainingDay?: number } | null = null;
private async _request(method: string, path: string, { params, body }: { params?: Record<string, unknown>; body?: unknown } = {}): Promise<any> {
const f = this.opts.fetch ?? globalThis.fetch;
const url = new URL((this.opts.baseUrl ?? DEFAULT_BASE).replace(/\/+$/, "") + path);
if (params) for (const [k, v] of Object.entries(params)) if (v != null) url.searchParams.set(k, String(v));
const headers: Record<string, string> = { "x-omni-key": this.token };
if (body !== undefined) headers["content-type"] = "application/json";
const res = await f(url, { method, headers, body: body !== undefined ? JSON.stringify(body) : undefined });
this.rateLimit = {
remainingMinute: Number(res.headers.get("x-ratelimit-remaining-minute")) || undefined,
remainingDay: Number(res.headers.get("x-ratelimit-remaining-day")) || undefined,
};
const data = await res.json().catch(() => ({}));
if (!res.ok) throw new HighwaysEnglandAPIError(res.status, data?.error?.code, data?.error?.message);
return data.data ?? data;
}
/** Returns list of areas */
areasGet(params: { "version": string }): Promise<any> {
return this._request("GET", "/v{version}/areas", { params });
}
/** Returns details of selected area */
getvVersionAreasAreaIds(params: { "area_Ids": string; "version": string }): Promise<any> {
return this._request("GET", "/v{version}/areas/{area_Ids}", { params });
}
/** Get Site DailyQuality */
qualityGetDailyDataQualityForSite(params: { "siteId": string; "start_date": string; "end_date": string; "version": string }): Promise<any> {
return this._request("GET", "/v{version}/quality/daily", { params });
}
/** Get Site OverallQuality */
qualityGetOverallDataQualityForSites(params: { "sites": string; "start_date": string; "end_date": string; "version": string }): Promise<any> {
return this._request("GET", "/v{version}/quality/overall", { params });
}
/** Gets the daily report. */
reportsIndex(params: { "report_type": string; "sites": string; "start_date": string; "end_date": string; "page": number; "page_size": number; "version": string; "reportSubTypeId"?: number }): Promise<any> {
return this._request("GET", "/v{version}/reports/{report_type}", { params });
}
/** Gets the daily report. */
getvVersionReportsStartDateToEndDateReport(params: { "report_type": string; "sites": string; "start_date": string; "end_date": string; "page": number; "page_size": number; "version": string; "reportSubTypeId"?: number }): Promise<any> {
return this._request("GET", "/v{version}/reports/{start_date}/to/{end_date}/{report_type}", { params });
}
/** Get a list of sites */
sitesIndex(params: { "version": string }): Promise<any> {
return this._request("GET", "/v{version}/sites", { params });
}
/** Get selected sites */
getvVersionSitesSiteIds(params: { "site_Ids": string; "version": string }): Promise<any> {
return this._request("GET", "/v{version}/sites/{site_Ids}", { params });
}
/** Return list of site types */
siteTypesIndex(params: { "version": string }): Promise<any> {
return this._request("GET", "/v{version}/sitetypes", { params });
}
/** Returns the layer metadata for the LayerId specified. */
siteTypesGetSitesForPublicFacingAPI(params: { "siteType_Id": number; "version": string }): Promise<any> {
return this._request("GET", "/v{version}/sitetypes/{siteType_Id}/sites", { params });
}
}
export default HighwaysEnglandAPI;
No reviews yet. Be the first to rate this API.
No. Highways England API is included with your Omni key, so a single OmniStream key is enough to start calling it. There is no separate signup with the provider and no second key to manage.
Live traffic data for England's motorways and major A-roads - journey times, traffic flow, and sensor site metadata (WebTRIS). It exposes 10 endpoints over GET, including GET /v{version}/areas, GET /v{version}/areas/{area_Ids}, GET /v{version}/quality/daily.
Install the OmniStream SDK for your language and call Highways England API through it. The client is generated from this API's OpenAPI spec, so parameters and responses are fully typed, and the same client also calls every other API in the marketplace.
You can start on the free plan. OmniStream charges for the unified SDK, key storage and proxy rather than for Highways England API itself.
Zippopotam Postal Codes: Free, keyless place lookup by postal code for 60+ countries - returns place names, state, latitude and longitude.
Gets the daily report.
Get a list of sites
Get selected sites
Return list of site types
Returns the layer metadata for the LayerId specified.