मुख्य सामग्री पर जाएँ
Skillpedia
API और सर्वर (backend)260k · #578

har-derived-api-client

यह क्या करती है

यह स्किल आपके AI को ब्राउज़र के उपयोग के दौरान किसी वेबसाइट की नेटवर्क गतिविधि देखने और उस रिकॉर्ड से एक सरल क्लाइंट बनाने देती है, जो साइट का डेटा सीधे माँगता है। यह उन डेवलपर्स के लिए है जिन्हें बिना पब्लिक API वाली साइट को स्वचालित करना है।

कब इस्तेमाल करें

  • ✓जब आपको ऐसी वेबसाइट के लिए क्लाइंट चाहिए जिसका पब्लिक API नहीं है, पर जो डेटा JSON में लोड करती है।
  • ✓जब आपका AI एक ही ब्राउज़र चरण कई बार दोहराने वाला हो और सीधा अनुरोध तेज़ होगा।
  • ✓जब आप वेबसाइट के autocomplete या search फ़ीचर को स्वचालित करना चाहें।

Skill का लिंक

https://github.com/NousResearch/hermes-agent/blob/main/optional-skills/web-development/har-derived-api-client/SKILL.md

इसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।

कैसे इस्तेमाल करें

सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।

पेस्ट करने के लिए तैयार मैसेज

इस skill से मेरी मदद करो: https://github.com/NousResearch/hermes-agent/blob/main/optional-skills/web-development/har-derived-api-client/SKILL.md इस लिंक की SKILL.md फ़ाइल पढ़ो और मेरे काम में उसके निर्देशों का पालन करो।
क्या आप चाहते हैं कि आपका AI ऐसी skills खुद ढूँढे?मुफ़्त Skillpedia MCP इंस्टॉल करें: बस एक लाइन, और हर काम से पहले यह 15,000+ skills में खोजता है।1 मिनट में इंस्टॉल करें →

AI से क्या माँगें: उदाहरण

“इस साइट की लिस्टिंग सीधे खोजने वाला एक छोटा क्लाइंट बनाइए, ताकि मुझे हर बार पेज पर क्लिक न करना पड़े।”

हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।

यह कैसे काम करती है

स्किल ब्राउज़र के नेटवर्क ट्रैफ़िक को HAR फ़ाइल में रिकॉर्ड करती है, फिर पेज जो endpoints इस्तेमाल करता है उन्हें निकालती है। आपका AI उन अनुरोधों को सादे HTTP टूल से दोबारा भेजता है और आपका पहले से मौजूद लॉगिन सत्र साथ ले जाता है।

तकनीकी सामग्री (मूल SKILL.md)

लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।

HAR-Derived API Client

Drive a website once with a real browser while recording its network traffic to a HAR file, then distill that HAR into the site's private JSON API so you can call it directly with plain HTTP — far cheaper and faster than browser-controlling the page on every request. Credit: trick by Jared Longster, popularized by Dax (thdxr). This captures and replays; it does NOT bypass auth, solve CAPTCHAs, or defeat bot-detection — if the site needs a logged-in session, you carry its headers/cookies forward, you don't forge them.

The scripts are stdlib-plus-Playwright: capture needs Playwright, derivation is pure stdlib, replay needs only requests/httpx (or curl).

Covers every Hermes browser pathway: the default local Chromium that browser_exec drives, plus the cloud/remote backends (Browserbase, Browser-Use, Firecrawl) and any /browser connect CDP endpoint. There are two capture scripts — one for a browser you launch, one for a browser you attach to over CDP — because HAR recording works differently in each case (see How to Run).

When to Use

  • "Build a CLI/client for <website>" — derive its API instead of scripting clicks.
  • "This site has no public API but the page clearly fetches JSON."
  • You're about to loop browser_exec navigations for the same query repeatedly — stop and derive the endpoint once.
  • Reverse-engineering an autocomplete, search, feed, or checkout XHR.
  • You captured a session on a cloud backend (Browserbase / Browser-Use / Firecrawl) or via /browser connect and want the API without re-renting the browser.

Prerequisites

  • Playwright + a browser binary (capture step only):
    • pip install playwright then playwright install chromium --no-shell
    • (If a system Playwright already has browsers under ~/.cache/ms-playwright, reuse it.)
  • requests or httpx for the replay step (stdlib urllib also works).
  • No API keys. Any keys/tokens the client needs are the ones the HAR captured.
  • For the CDP path (har_capture_cdp.py): a reachable CDP endpoint. On Hermes, run /browser connect to print the active endpoint, or read BROWSER_CDP_URL / browser.cdp_url in config. Cloud backends expose it as cdpUrl/connectUrl.

How to Run

Scripts under this skill's scripts/, invoked through the terminal tool. Pick the capturer by pathway — this is the part that trips people up:

Browser pathway How Hermes reaches it Capturer
Local Chromium (default browser_exec browser) launched locally har_capture.py
Browserbase / Browser-Use / Firecrawl (cloud) CDP (cdpUrl) har_capture_cdp.py
/browser connect <url> / BROWSER_CDP_URL CDP har_capture_cdp.py

Rule of thumb: if Hermes launched the browser, use har_capture.py; if it connected to one over CDP, use har_capture_cdp.py. har_capture.py uses Playwright's record_har_path, which only works on a locally-owned context. har_capture_cdp.py attaches with connect_over_cdp() and assembles the HAR from page.on("request"/"response") events, because record_har_path is unavailable on a connected browser.

Then, for either path:

  • har_to_client.py — filters the HAR to XHR/fetch/JSON, groups by endpoint, and prints params, headers, bodies, and replay hints (User-Agent / cookie / auth).

Resolve paths against this skill's directory. Canonical loop:

# 1a. Capture, LOCAL browser (Hermes launched it)
python3 scripts/har_capture.py "https://SITE/" out.har \
  --action "fill:input[name=search]:my query" --action "sleep:3" --wait 2

# 1b. Capture, CDP browser (cloud backend or /browser connect)
#     get the endpoint from /browser connect or BROWSER_CDP_URL
python3 scripts/har_capture_cdp.py "ws://HOST/devtools/browser/..." out.har \
  --goto "https://SITE/" --action "fill:input[name=search]:my query" \
  --action "sleep:3" --wait 2

# 2. Derive — read the endpoints out of the HAR
python3 scripts/har_to_client.py out.har --host SITE --max-body 400

# 3. Replay — write a tiny client from the printed endpoint (see Procedure)

Quick Reference

har_capture.py <url> <out.har> [--wait S] [--headed] [--action SPEC ...]
  action SPEC:  fill:SELECTOR:TEXT | press:SELECTOR:KEY | click:SELECTOR
                goto:URL | sleep:SECONDS      (run in order after page load)
  use when Hermes LAUNCHED the browser (local browser_exec default)

har_capture_cdp.py <cdp_url> <out.har> [--goto URL] [--wait S] [--action SPEC ...]
  sa
अक्सर पूछे जाने वाले सवाल

क्या यह लॉगिन या CAPTCHA पार कर देता है?

नहीं। स्किल कहती है कि यह प्रमाणीकरण बायपास नहीं करती, CAPTCHA हल नहीं करती या बॉट पहचान को नहीं हराती।

यह किन ब्राउज़रों के साथ काम करता है?

स्किल स्थानीय Chromium ब्राउज़र और क्लाउड या रिमोट ब्राउज़र बैकएंड कवर करती है, दो capture scripts के साथ।

capture चलाने के लिए क्या चाहिए?

Capture के लिए Playwright चाहिए, और derivation तथा replay के चरणों के लिए केवल standard Python या curl।

जानकारी

लेखक का मूल विवरण

Record a site's XHR into a HAR, derive an HTTP client.

repo: NousResearch/hermes-agent

लोकप्रियता

GitHub स्टार
260k
रैंकिंग में स्थान
#578
लाइसेंस
MIT
अपडेट की गई
2/11/2026

क्या यह skill काम की है?

0

लॉग इन करें वोट करने के लिए।

कमेंट

  • …

इस repository की और skills

agent-merge-conflict-arbiter

260k

दो एजेंट्स की branches के बीच git merge conflict को एक निष्पक्ष तीसरे पक्ष के रूप में सुलझाती है और रिपॉज़िटरी के लिए एक merged नतीजा बनाती है।

कोडिंगसामान्य कोडिंग

antigravity-cli

260k

Antigravity कमांड-लाइन टूल को इंस्टॉल करने, अपडेट करने और उसकी दिक्कतें सुलझाने में मार्गदर्शन देती है, जिसमें प्लगइन, साइन-इन और sandbox शामिल हैं।

कोडिंगडिप्लॉय और क्लाउड (DevOps)

blackbox

260k

आपके एजेंट को कोडिंग काम Blackbox AI कमांड-लाइन टूल को सौंपने देती है, जो कई AI मॉडल चलाकर सबसे अच्छा नतीजा चुनता है।

कोडिंगसामान्य कोडिंग

dynamic-workflow

260k

आपके एजेंट को बड़े बैच के एक जैसे कामों को सेव की गई स्क्रिप्ट के रूप में चलाना सिखाती है, ताकि मुख्य बातचीत में केवल जांचे गए नतीजे लौटें।

AI और एजेंटएजेंट

मिलती-जुलती skills