Die USB IDs API stellt alle bekannten IDs, die in USB-Geräten verwendet werden, und menschenlesbare Namen für Hersteller-IDs (VID) und Produkt-IDs (PID) im JSON-Format bereit.
Die Datenbank basiert auf dem öffentlichen USB ID Repository von Stephen J. Gowdy.
Die API ermöglicht das Filtern nach bestimmten VIDs und PIDs.
Dies kann beispielsweise in Verbindung mit der neuen WebUSB API nützlich sein.
Auf dieser Seite finden Sie nähere Informationen und Beispiele zur USB IDs API.
The USB IDs API provides all known IDs used in USB devices with human-readable names for vendor IDs (VID) and product IDs (PID) in JSON format.
The database is based on the public USB ID Repository by Stephen J. Gowdy.
The API allows filtering for specific VIDs and PIDs.
This can be useful for example in conjunction with the new WebUSB API.
On this page you will find more information and some examples about the USB IDs API.
API documentation
- Version: 1.0.0 (2024/06/10)
- Author: Sebastian Lang
- URL: apps.sebastianlang.net/usb-ids
- Request methods: GET, POST
- Response: JSON format (UTF-8)
Response example
{
"version": "2024.03.18",
"date": "2024-03-18 20:34:02",
"vendors": [
{
"id": "1209",
"name": "Generic",
"devices": [
{
"id": "0001",
"name": "pid.codes Test PID"
},
...
]
},
...
]
}
Filters
To get a specific device or list of devices you can add VID and PID filters to the request.
The request can be:
- a single VID or PID
- a list of multiple VIDs or PIDs
- a specific pair of VID and PID
as well as each combination of them.
If the request contains a list of multiple VIDs all PIDs will be filtered independently like a request without VID.
All VIDs and PIDs need to be in HEX format with 4 digits!
GET request
GET request filters are part of the URL. They are specified as query string/parameter.
// single VID/PID
vid=(VID)
pid=(PID)
// list of VIDs/PIDs
vid[]=(VID 1)&vid[]=(VID 2)&...
pid[]=(PID 1)&pid[]=(PID 2)&...
Examples for GET request filters:
// all devices with vendor ID 0x1209
apps.sebastianlang.net/usb-ids?vid=1209
// all devices with product ID 0x0001
apps.sebastianlang.net/usb-ids?pid=0001
// a specific device with VID 0x1209 and PID 0x0001
apps.sebastianlang.net/usb-ids?vid=1209&pid=0001
// two devices (0x0001, 0x0002) from the same vendor 0x1209
apps.sebastianlang.net/usb-ids?vid=1209&pid[]=0001&pid[]=0002
POST request
POST request filters are part of the body data. They need to be in JSON format as single object or list of objects.
// single object
{
"vid": "(VID)",
"pid": "(PID)"
}
// list of objects
[
{
"vid": "(VID)",
"pid": "(PID)"
},
{
"vid": "(VID)",
"pid": [
"(PID 1)",
"(PID 2)",
...
]
},
{
"vid": [
"(VID 1)",
"(VID 2)",
...
]
},
...
]
Examples for POST request filters:
// all devices with vendor ID 0x1209
{
"vid": "1209"
}
// all devices with product ID 0x0001
{
"pid": "0001"
}
// a specific device with VID 0x1209 and PID 0x0001
{
"vid": "1209",
"pid": "0001"
}
// two devices (0x0001, 0x0002) from the same vendor 0x1209
{
"vid": "1209",
"pid": [
"0001",
"0002"
]
}
// all devices with vendor ID 0x1209 or 0x1234
{
"vid": [
"1209",
"1234"
]
}
// multiple filters in one requests
[
{
"vid": "1209",
"pid": "0001"
},
{
"vid": "1234",
"pid": "0000"
},
{
"vid": [
"2341",
"0403"
]
}
]