# libusb/hidapi

A Simple cross-platform library for communicating with HID devices

Repository: https://github.com/libusb/hidapi
Canonical: https://ross.abutalabs.com/products/libusb-hidapi
Homepage: https://libusb.info/hidapi/
Language: C
License: NOASSERTION
License Family: other
Topics: usb, usb-hid, bluetooth, hidapi, hid, hidraw, hidapi-library, android, bsd, c, i2c, linux, macos, spi, windows
Last push: 2026-08-14T11:16:33+00:00

## Health v2 (maintenance only)
Score: 66/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 97, release rhythm 8, longevity 100
- inputs: {"age_days": 2647, "days_push": 19, "days_rel": 472, "gap_med": null, "n_releases_24m": 1}
- flags: no_license
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 2261, forks 474 (observed 2026-08-28T04:06:31.809327+00:00)

## What it is
HIDAPI is a cross-platform C library for communicating with USB and Bluetooth HID-class devices on Windows, Linux, FreeBSD, macOS, and Android. It offers multiple backends (hid.dll, hidraw, libusb, IOHidManager) and can be built as a shared library or embedded via a single source file and header.

## Use cases
- read input reports from a custom USB HID device
- communicate with a Bluetooth HID gamepad from a desktop app
- send feature reports to an HID sensor on Linux
- enumerate HID devices on macOS and Windows portably
- build a userspace tool to configure an HID keyboard
- access HID devices on Android without root

## When to choose
- you need a single API to talk to HID devices across Windows, Linux, macOS, and BSD
- you want a small C library you can embed directly in your source tree
- you need both USB and Bluetooth HID support
- you are writing userspace HID tooling without writing kernel drivers

## When to avoid
- you need generic USB (non-HID) device communication - use libusb instead
- you need high-level input event handling for keyboards/mice in a GUI app - use your platform's input framework
- you need serial or bulk transfers outside the HID class

## Facets
- artifact type: library
- maturity: stable
- function: sdk, developer-tools
- domain: hardware, cross-platform, developer-tools
- platform: windows, bsd, cpp, c
- tags: hid, usb-hid, bluetooth, hidraw, libusb, device-communication, c-library, linux, macos, android

## Member repositories
- libusb/hidapi (main) score 66

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:06:31.809327+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T02:42:33.366684+00:00, confidence not recorded.
  - readme: https://github.com/libusb/hidapi (fetched 2026-08-28T04:06:31.809327+00:00, sha 842aa462e1c8)
  - homepage: https://libusb.info/hidapi/ (fetched 2026-08-29T10:23:06.818731+00:00, sha 36dab92148ae)
- Data as of 2026-08-30T08:39:29.467469+00:00.
