har-to-api
Installation
SKILL.md
HAR → API
Turn a website's hidden XHR/fetch traffic into a callable API — then keep the numbers it returns traceable and reproducible.
Two halves:
| Half | Scripts | What it does |
|---|---|---|
| Capture (one-time per site) | parse_har → gen_openapi → gen_client |
Record traffic once, derive an OpenAPI spec + a Python client |
| Fetch (every run) | discover → fetch |
Map the response to named facts, pull them with provenance, snapshot them |
The second half is what makes this usable for research rather than one-off
scraping. Any number that reaches a document should be able to answer three
questions — where did you come from, when, and can I get you again — and
fetch.py makes those answers structural rather than remembered.