har-derived-api-client

Record browser XHR traffic to HAR files and derive replayable HTTP API clients.

Updated Sep 10, 2026
One-click install
npx skills add https://github.com/loteiron/ZeusAgent --skill har-derived-api-client-loteiron
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: har-derived-api-client
Source: https://github.com/loteiron/ZeusAgent/tree/main/optional-skills/web-development/har-derived-api-client
Command: npx skills add https://github.com/loteiron/ZeusAgent --skill har-derived-api-client-loteiron

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires playwright, requests, httpx, and includes scripts (resource) components.

What problem does it solve? Many websites have no public API, forcing you to drive a real browser for every request, which is slow and expensive. This Skill captures a site's network traffic once and distills it into the private JSON API so you can call it directly with plain HTTP. ## Core Features & Use Cases - HAR Capture: Record network traffic with Playwright from a locally launched browser or attach over CDP to cloud backends like Browserbase, Browser-Use, and Firecrawl. - API Derivation: Filter the HAR to XHR/fetch/JSON traffic, group requests by endpoint, and print query params, headers, request bodies, and replay hints such as the browser User-Agent. - Use Case: You need to repeatedly query a site's autocomplete search. Capture one session, derive the underlying JSON endpoint, then replay it with a small Python requests client — no browser in the loop. ## Quick Start Ask the agent to capture the target site's network traffic with the HAR capture script, derive the API endpoints from the HAR file, and write a small HTTP client that replays the discovered endpoint.

Frequently Asked Questions about har-derived-api-client

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I reverse-engineer a website's private API?▼

Record the site's network traffic to a HAR file with Playwright while performing the target interaction, then run the derivation script to filter XHR/fetch/JSON entries. It prints each endpoint's method, path template, query params, headers, and body so you can replay it with plain HTTP.

How to capture HAR files from Browserbase or cloud browsers?▼

Use the CDP capture script, which attaches to the remote browser with Playwright's connect_over_cdp and assembles the HAR from request/response events. Playwright's record_har_path only works on locally launched contexts, so cloud backends like Browserbase, Browser-Use, and Firecrawl require the CDP approach.

Why does my derived API client get a 403 error?▼

Many sites reject default library User-Agents like python-requests. Copy the browser User-Agent from the derivation's replay hints into your client, and resend captured Cookie or Authorization headers if the endpoint is session-gated.

Can I capture HAR from a browser connected over CDP?▼

Yes, the CDP capture script connects to any reachable Chrome DevTools Protocol endpoint and builds the HAR from network events. It does not close the browser afterward, since the browser is owned by the remote backend.

What are the limitations of HAR-based API derivation?▼

It captures and replays traffic but does not bypass authentication, solve CAPTCHAs, or defeat bot detection. Server-rendered pages with no XHR produce no derivable endpoints, and captured credentials expire, requiring re-capture when requests start returning 401.