harpa-grid

Automate web browsers, scrape pages, search the web, and run AI prompts on live websites via HARPA AI Grid REST API

3,891 stars

Best use case

harpa-grid is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Automate web browsers, scrape pages, search the web, and run AI prompts on live websites via HARPA AI Grid REST API

Teams using harpa-grid should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/harpa-ai/SKILL.md --create-dirs "https://raw.githubusercontent.com/openclaw/skills/main/skills/alxsharuk/harpa-ai/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/harpa-ai/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How harpa-grid Compares

Feature / Agentharpa-gridStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Automate web browsers, scrape pages, search the web, and run AI prompts on live websites via HARPA AI Grid REST API

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

Related Guides

SKILL.md Source

# HARPA Grid — Browser Automation API

HARPA Grid lets you orchestrate real web browsers remotely. You can scrape pages, search the web, run built-in or custom AI commands, and send AI prompts with full page context — all through a single REST endpoint.

## Prerequisites

The user **must** have:
1. **HARPA AI Chrome Extension** installed from https://harpa.ai
2. **At least one active Node** — a browser with HARPA running (configured in the extension's AUTOMATE tab)
3. **A HARPA API key** — obtained from the HARPA extension AUTOMATE tab. The key is provided as the `HARPA_API_KEY` environment variable.

If the user hasn't set up HARPA yet, direct them to: https://harpa.ai/grid/browser-automation-node-setup

## API Reference

**Endpoint:** `POST https://api.harpa.ai/api/v1/grid`
**Auth:** `Authorization: Bearer $HARPA_API_KEY`
**Content-Type:** `application/json`

Full reference: https://harpa.ai/grid/grid-rest-api-reference

---

## Actions

### 1. Scrape a Web Page

Extract full page content (as markdown) or specific elements via CSS/XPath/text selectors.

**Full page scrape:**

```bash
curl -s -X POST https://api.harpa.ai/api/v1/grid \
  -H "Authorization: Bearer $HARPA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "action": "scrape",
    "url": "https://example.com",
    "timeout": 15000
  }'
```

**Targeted element scrape (grab):**

```bash
curl -s -X POST https://api.harpa.ai/api/v1/grid \
  -H "Authorization: Bearer $HARPA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "action": "scrape",
    "url": "https://example.com/products",
    "grab": [
      {
        "selector": ".product-title",
        "selectorType": "css",
        "at": "all",
        "take": "innerText",
        "label": "titles"
      },
      {
        "selector": ".product-price",
        "selectorType": "css",
        "at": "all",
        "take": "innerText",
        "label": "prices"
      }
    ],
    "timeout": 15000
  }'
```

**Grab fields:**

| Field | Required | Default | Values |
|-------|----------|---------|--------|
| selector | yes | — | CSS (`.class`, `#id`), XPath (`//h2`), or text content |
| selectorType | no | auto | `auto`, `css`, `xpath`, `text` |
| at | no | first | `all`, `first`, `last`, or a number |
| take | no | innerText | `innerText`, `textContent`, `innerHTML`, `outerHTML`, `href`, `value`, `id`, `className`, `attributes`, `styles`, `[attrName]`, `(styleName)` |
| label | no | data | Custom label for extracted data |

### 2. Search the Web (SERP)

Perform a web search. Supports operators like `site:`, `intitle:`.

```bash
curl -s -X POST https://api.harpa.ai/api/v1/grid \
  -H "Authorization: Bearer $HARPA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "action": "serp",
    "query": "OpenClaw AI agent framework",
    "timeout": 15000
  }'
```

### 3. Run an AI Command

Execute one of 100+ built-in HARPA commands or a custom automation on a target page.

```bash
curl -s -X POST https://api.harpa.ai/api/v1/grid \
  -H "Authorization: Bearer $HARPA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "action": "command",
    "url": "https://example.com/article",
    "name": "Extract data",
    "inputs": "List all headings with their word counts",
    "connection": "HARPA AI",
    "resultParam": "message",
    "timeout": 30000
  }'
```

- `name` — command name (e.g. `"Summary"`, `"Extract data"`, or any custom command)
- `inputs` — pre-filled user inputs for multi-step commands
- `resultParam` — HARPA parameter to return as result (default: `"message"`)
- `connection` — AI model to use (e.g. `"HARPA AI"`, `"gpt-4o"`, `"claude-3.5-sonnet"`)

### 4. Run an AI Prompt

Send a custom AI prompt with page context. Use `{{page}}` to inject the page content.

```bash
curl -s -X POST https://api.harpa.ai/api/v1/grid \
  -H "Authorization: Bearer $HARPA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "action": "prompt",
    "url": "https://example.com",
    "prompt": "Analyze the current page and extract all contact information. Webpage: {{page}}",
    "connection": "CHAT AUTO",
    "timeout": 30000
  }'
```

---

## Common Parameters

| Parameter | Required | Default | Description |
|-----------|----------|---------|-------------|
| action | yes | — | `scrape`, `serp`, `command`, or `prompt` |
| url | no | — | Target page URL (ignored by `serp`) |
| node | no | — | Node ID (`"r2d2"`), multiple (`"r2d2 c3po"`), first N (`"5"`), or all (`"*"`) |
| timeout | no | 300000 | Max wait time in ms (max 5 minutes) |
| resultsWebhook | no | — | URL to POST results to asynchronously (retained 30 days) |
| connection | no | — | AI model for `command`/`prompt` actions |

## Node Targeting

- Omit `node` to use the default node
- `"node": "mynode"` — target a specific node by ID
- `"node": "node1 node2"` — target multiple nodes
- `"node": "3"` — use first 3 available nodes
- `"node": "*"` — broadcast to all nodes

## Async Results via Webhook

Set `resultsWebhook` to receive results asynchronously. The action stays alive for up to 30 days, useful when target nodes are temporarily offline.

```json
{
  "action": "scrape",
  "url": "https://example.com",
  "resultsWebhook": "https://your-server.com/webhook",
  "timeout": 15000
}
```

## Tips

- Scraping behind-login pages works because HARPA runs inside a real browser session with the user's cookies and auth state.
- Use the `grab` array with multiple selectors to extract structured data in a single request.
- For long-running AI commands, increase `timeout` (max 300000ms / 5 min) or use `resultsWebhook`.
- The `{{page}}` variable in prompts injects the full page content — use it to give AI context about the current page.

Related Skills

gridclash

3891
from openclaw/skills

Battle in Grid Clash - join 8-agent grid battles. Fetch equipment data to choose the best weapon, armor, and tier. Use when user wants to participate in Grid Clash battles.

hashgrid-connect

3891
from openclaw/skills

Goal-based matching network for AI agents. Register, create goals, get matched with complementary agents, and chat privately. Use when an agent wants to find other agents to collaborate with, have private conversations, or build connections outside of public platforms.

openmm-grid-trading

3891
from openclaw/skills

Create and manage grid trading strategies with OpenMM. Automated buy/sell around center price.

gridtrx

3891
from openclaw/skills

Double-entry, full-cycle accounting suite built for AI agents. Converts bank CSVs, OFX, and QBO files into balanced, auditable books — balance sheet, income statement, general ledger, trial balance. All data stays in a single local SQLite file.

---

3891
from openclaw/skills

name: article-factory-wechat

Content & Documentation

humanizer

3891
from openclaw/skills

Remove signs of AI-generated writing from text. Use when editing or reviewing text to make it sound more natural and human-written. Based on Wikipedia's comprehensive "Signs of AI writing" guide. Detects and fixes patterns including: inflated symbolism, promotional language, superficial -ing analyses, vague attributions, em dash overuse, rule of three, AI vocabulary words, negative parallelisms, and excessive conjunctive phrases.

Content & Documentation

find-skills

3891
from openclaw/skills

Helps users discover and install agent skills when they ask questions like "how do I do X", "find a skill for X", "is there a skill that can...", or express interest in extending capabilities. This skill should be used when the user is looking for functionality that might exist as an installable skill.

General Utilities

tavily-search

3891
from openclaw/skills

Use Tavily API for real-time web search and content extraction. Use when: user needs real-time web search results, research, or current information from the web. Requires Tavily API key.

Data & Research

baidu-search

3891
from openclaw/skills

Search the web using Baidu AI Search Engine (BDSE). Use for live information, documentation, or research topics.

Data & Research

agent-autonomy-kit

3891
from openclaw/skills

Stop waiting for prompts. Keep working.

Workflow & Productivity

Meeting Prep

3891
from openclaw/skills

Never walk into a meeting unprepared again. Your agent researches all attendees before calendar events—pulling LinkedIn profiles, recent company news, mutual connections, and conversation starters. Generates a briefing doc with talking points, icebreakers, and context so you show up informed and confident. Triggered automatically before meetings or on-demand. Configure research depth, advance timing, and output format. Walking into meetings blind is amateur hour—missed connections, generic small talk, zero leverage. Use when setting up meeting intelligence, researching specific attendees, generating pre-meeting briefs, or automating your prep workflow.

Workflow & Productivity

self-improvement

3891
from openclaw/skills

Captures learnings, errors, and corrections to enable continuous improvement. Use when: (1) A command or operation fails unexpectedly, (2) User corrects Claude ('No, that's wrong...', 'Actually...'), (3) User requests a capability that doesn't exist, (4) An external API or tool fails, (5) Claude realizes its knowledge is outdated or incorrect, (6) A better approach is discovered for a recurring task. Also review learnings before major tasks.

Agent Intelligence & Learning