A universal API integration framework for Home Assistant 2025.11+ where each "device" represents one API endpoint. Configure and trigger API calls with responses stored as entity states and attributes.
Compatibility: The minimum supported Home Assistant version is 2025.11. Integration-specific triggers and conditions require Home Assistant 2026.7 or later, as noted in those sections.
HAAPI turns any HTTP API into Home Assistant devices, without YAML. Each endpoint you add becomes a device with:
- a Trigger button that makes the call,
- a Request sensor showing what will be sent, and
- a Response sensor whose state is the HTTP status, with the body and headers as attributes.
URLs, headers and bodies accept Jinja2 templates, and it supports Basic, Bearer and API-key auth. For automations there are HAAPI triggers ("call succeeded", "JSON field changed"…), conditions, and a haapi.request action that returns the response directly to the next step.
HAAPI is listed in the Home Assistant Marketplace (formerly HACS, built into Home Assistant since 2026.11).
- Go to Settings → Marketplace (or use the button above)
- Search for HAAPI and open it
- Click Download
- Restart Home Assistant
- Go to Settings → Devices & services → Add integration and search for HAAPI
On Home Assistant versions before 2026.11, do the same from HACS instead.
If HAAPI doesn't appear in the search, add it as a custom repository: open the three-dot menu in the Marketplace (or HACS), select Custom repositories, add https://github.com/Nasawa/HAAPI with the type Integration, then download it as above.
- Copy the
custom_components/haapifolder to your Home Assistantconfig/custom_components/directory - Restart Home Assistant
Setup has two parts: create a HAAPI instance once, then add an endpoint to it. This walkthrough uses the free Cat Facts API, so you don't need any credentials.
1. Create an instance. Go to Settings → Devices & services → Add integration, search for HAAPI, give it a name (for example "My APIs") and submit. An instance is just a container for endpoints; most setups need only one.
2. Add an endpoint. On the HAAPI integration page, click the gear icon (Configure) next to your instance and choose Add New Endpoint.
Enter Endpoint Name Cat Facts and URL https://catfact.ninja/fact, leave the method on GET, and submit. On the next screen, leave Authentication Type on none and submit again.
3. Make the call. Open the new Cat Facts device and press Trigger. The Response sensor changes to 200, and the fact itself is in its response_body attribute.
That's it. Every option on those forms is explained in the configuration reference.
The Trigger button is handy for dashboards and testing. In automations, use the haapi.request action instead: it waits for the call and hands you the response in the same step.
actions: - action: haapi.request target: entity_id: button.cat_facts_trigger response_variable: cat_fact - action: notify.persistent_notification data: message: "{{ (cat_fact.body | from_json).fact }}"
- Configuration reference: every endpoint field, authentication types, and the entities each endpoint creates
- Automations: HAAPI triggers, conditions, and the
haapi.requestaction (per-callvariablesandbody) - Examples and templates: POST bodies, dynamic URLs, parsing JSON, input helpers
- Troubleshooting: debug logging and common problems
- Development: tests, demo setup, translations, and releases
Pull requests and issues are welcome — HAAPI is a community-open MIT project. If HAAPI is useful to you, help make it better: file a bug, suggest a feature, improve the docs, or send a fix. You don't need permission to get started.
- Found a bug or have an idea? Open an issue — clear reports and feature requests are genuinely appreciated.
- Want to send a change? Fork the repo, create a branch, and open a PR. Small, focused PRs are easiest to review and merge.
- Running the tests and building locally: see the development guide. In short:
pip install -r requirements_test.txtthenpython -m pytest -q. Every PR runs the same checks in CI — pytest, hassfest, and HACS validation — so you can see exactly what will run before you push. - Translations are especially welcome: the non-English strings are community-reviewable, and native-speaker corrections are exactly the kind of contribution this project wants.
New contributors are welcome regardless of experience level. If something's unclear, open an issue and ask.
HAAPI was created by Christopher (@Nasawa) together with Claw, his AI partner — Christopher owning the idea, design, and direction, and Claw doing much of the implementation under that direction. We credit it this way because that's how it was honestly built, not to fence it off.
HAAPI is open to everyone. Made here, built for the whole Home Assistant community: it's MIT-licensed, and your issues, ideas, and pull requests are genuinely wanted (see Contributing). The origin story and the open door are both true at once — knowing who started it takes nothing away from its being yours to use, fork, and improve.
HAAPI is dogfooded daily in the authors' own homes — it runs real routines, not just the Cat Facts API demo.
This project is licensed under the MIT License.




