Early Previewv1.0.0

API Documentation

Semantic search API for browser automation tasks. Query with natural language, get back step-by-step instructions with exact selectors your agent can execute.

Early Preview — API is subject to change

This API is in early preview. Endpoints, response formats, and behavior may change without notice. We currently have a limited set of mapped actions. No authentication or rate limits are enforced yet.

Quick Start

Search for any browser task in one API call.

Try it now
1curl -s -X POST https://api.agentmaps.dev/search \ 2 -H "Content-Type: application/json" \ 3 -d '{ 4 "query": "send a message on LinkedIn", 5 "website": "linkedin.com", 6 "response_format": "normal" 7 }' | jq

No API key required. No setup. Just send a POST request and get back executable steps.

Base URL

BASE_URL = https://api.agentmaps.dev

API Reference

GET/

Health check endpoint. Verify the API is running.

Response — 200 OK
1{ 2 "service": "AgentMap API", 3 "version": "1.0.0", 4 "status": "running" 5}

Request Body

Content-Type: application/json

ParameterTypeRequiredDefaultDescription
querystringRequiredNatural language search query. E.g. "send a message on LinkedIn"
websitestringOptionalnullFilter results by website domain. E.g. "linkedin.com"
response_formatstringOptional"normal"Detail level: "text", "normal", or "full"
match_countnumberOptional3Maximum number of results to return (1–10 recommended)
match_thresholdnumberOptional0.7Cosine similarity threshold (0.0–1.0). Lower values return more results.

Response

200 OK — Search Results
1{ 2 "query": "send a message on LinkedIn", 3 "website": "linkedin.com", 4 "response_format": "normal", 5 "results": [ 6 { 7 "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", 8 "website": "linkedin.com", 9 "title": "Send Direct Message to LinkedIn Connection", 10 "similarity": 0.8542, 11 "total_steps": 6, 12 "steps": [ 13 { 14 "step": 1, 15 "action": "goto", 16 "description": "Navigate to https://linkedin.com/messaging", 17 "deterministic": true, 18 "selector": {} 19 }, 20 { 21 "step": 2, 22 "action": "click", 23 "description": "Click \"Compose a new message\"", 24 "deterministic": true, 25 "selector": { 26 "aria": "role=button name=\"Compose a new message\"" 27 } 28 }, 29 { 30 "step": 3, 31 "action": "fill", 32 "description": "Fill \"Enter message recipients\" with {recipient_name}", 33 "deterministic": true, 34 "selector": { 35 "aria": "role=combobox name=\"Enter message recipients\"" 36 } 37 } 38 ], 39 "variables": [ 40 { 41 "step": 3, 42 "field": "Enter message recipients", 43 "template": "{recipient_name}", 44 "example": "john_doe" 45 }, 46 { 47 "step": 5, 48 "field": "Write a message", 49 "template": "{message_content}", 50 "example": "Hello!" 51 } 52 ] 53 } 54 ], 55 "count": 1 56}

Error Responses

400Bad Request
{ "error": "Query is required" }
404No Results
{ "results": [], "suggestion": "..." }

Response Detail Levels

"text"— Minimal, for display only
text format
1{ 2 "step": 2, 3 "description": "Click \"Compose a new message\"", 4 "deterministic": true 5}
"normal"Recommended— Includes action + ARIA selector
normal format (default)
1{ 2 "step": 2, 3 "action": "click", 4 "description": "Click \"Compose a new message\"", 5 "deterministic": true, 6 "selector": { 7 "aria": "role=button name=\"Compose a new message\"" 8 } 9}
"full"— Complete trace data for debugging
full format
1{ 2 "step": 2, 3 "action": "click", 4 "description": "Click \"Compose a new message\"", 5 "deterministic": true, 6 "selector": { 7 "raw": "internal:role=button[name=\"Compose a new message\"s]", 8 "aria": "role=button name=\"Compose a new message\"", 9 "name": "Compose a new message", 10 "role": "button" 11 }, 12 "element": { 13 "tag": "button", 14 "class": "msg-form__send-btn" 15 }, 16 "url_before": "https://www.linkedin.com/messaging/", 17 "url_after": "https://www.linkedin.com/messaging/" 18}

Usage Guide

How It Works

1

Search

Query the API with natural language describing the task you want to automate

2

Parse

Read the steps, identify deterministic vs non-deterministic, note required variables

3

Execute

Run each step using the action type and ARIA selector from the response

4

Verify

Confirm the automation succeeded by checking the page state after execution

Deterministic vs Non-Deterministic Steps

Each step in the response has a deterministic flag that tells your agent how to handle it.

deterministic: true

Predictable steps. Execute directly using the ARIA selector from the API — no snapshot needed.

Examples: navigating to a URL, clicking a specific button, filling a named input field, pressing a key.

deterministic: false

Context-dependent steps. Take a snapshot first to see available options, then pick the right element.

Examples: selecting from search results, clicking dynamic content, choosing from a list of options.

Variables

Steps that require user input use template variables like {recipient_name}. The variables array in the response tells you which steps need input and provides example values.

Variables in response
1"variables": [ 2 { 3 "step": 3, 4 "field": "Enter message recipients", 5 "template": "{recipient_name}", 6 "example": "john_doe" 7 }, 8 { 9 "step": 5, 10 "field": "Write a message", 11 "template": "{message_content}", 12 "example": "Hello!" 13 } 14]

Replace template variables with actual values when executing the corresponding step. The example field shows what kind of value is expected.

Action Types

Each step has an action field. Here's how each maps to browser automation commands:

ActionDescriptionARIA Selector
gotoNavigate to a URLNot used — use the URL from description
clickClick an elementrole=button name="Submit"
fillType into an input fieldrole=textbox name="Email"
selectChoose from a dropdownrole=combobox name="State"
keyboardPressPress a keyboard keyNot used — key from description
scrollScroll the pageNot used — direction from description

Full Examples

Send a LinkedIn Message

Step 1 — Search for the task
1curl -s -X POST https://api.agentmaps.dev/search \ 2 -H "Content-Type: application/json" \ 3 -d '{ 4 "query": "send linkedin message", 5 "website": "linkedin.com", 6 "response_format": "normal", 7 "match_threshold": 0.5 8 }' | jq

Then execute each step from the response one at a time with your automation tool (e.g. Playwright, Puppeteer, agent-browser):

Step 2 — Execute steps sequentially
1# Step 1: Navigate (deterministic — use URL directly) 2agent-browser open https://linkedin.com/messaging 3 4# Step 2: Click "Compose" (deterministic — use ARIA selector) 5agent-browser find role button click --name "Compose a new message" 6 7# Step 3: Fill recipient (deterministic — use ARIA selector + variable) 8agent-browser find role combobox fill "John Doe" --name "Enter message recipients" 9 10# Step 4: Select from results (NON-DETERMINISTIC — snapshot first!) 11agent-browser snapshot 12# Output: - option "John Doe • 1st" [ref=e1] 13# - option "John Smith • 2nd" [ref=e2] 14agent-browser click @e1 15 16# Step 5: Fill message (deterministic — use ARIA selector + variable) 17agent-browser find role textbox fill "Hey, wanted to connect!" --name "Write a message" 18 19# Step 6: Click Send (deterministic) 20agent-browser find role button click --name "Send"

Create a LinkedIn Post

Search + Execute
1# Search 2curl -s -X POST https://api.agentmaps.dev/search \ 3 -H "Content-Type: application/json" \ 4 -d '{"query": "create post linkedin", "website": "linkedin.com"}' | jq 5 6# Execute (all steps deterministic) 7agent-browser open https://linkedin.com/feed 8agent-browser find role link click --name "Start a post" 9agent-browser find role textbox fill "Excited about our new launch!" --name "Text editor for creating content" 10agent-browser find role button click --name "Post"

Python Integration

search.py
1import requests 2 3response = requests.post( 4 "https://api.agentmaps.dev/search", 5 json={ 6 "query": "follow a company on LinkedIn", 7 "website": "linkedin.com", 8 "response_format": "full", 9 "match_threshold": 0.5 10 } 11) 12 13data = response.json() 14for result in data["results"]: 15 print(f"Task: {result['title']} (similarity: {result['similarity']:.2f})") 16 for step in result["steps"]: 17 print(f" Step {step['step']}: [{step['action']}] {step['description']}") 18 if step.get("selector", {}).get("aria"): 19 print(f" Selector: {step['selector']['aria']}") 20 for var in result.get("variables", []): 21 print(f" Variable: {var['template']} (e.g. \"{var['example']}\")")

Similarity Scores

Results include a similarity score (0.0–1.0) indicating how well the task matches your query.

0.9 – 1.0

Excellent

0.7 – 0.9

Good

0.5 – 0.7

Moderate

< 0.5

Weak

Tip: Use match_threshold: 0.5 instead of the default 0.7 for broader results.

Supported Websites

We currently have a limited set of mapped actions. More websites and tasks are being added regularly.

WebsiteStatusAvailable Tasks
linkedin.comLiveSend messages, create posts, send connection requests, follow companies, scroll feed & comment
reddit.comComing SoonVote on posts, comment, join communities, create posts
x.comComing SoonPost tweets, like, retweet, follow users, send DMs
facebook.comComing SoonCreate posts, comment, react, send messages, join groups
web.telegram.orgComing SoonSend messages, create groups, share media, manage channels

Best Practices

1

Execute steps one at a time

Do NOT batch all commands into a script. Execute one step, observe the result, then proceed. This is critical for handling dynamic page changes.

2

Use ARIA selectors for deterministic steps

Trust the selectors from the API response. They are captured from real browser traces and map directly to elements on the page.

3

Snapshot only for non-deterministic steps

When a step is marked deterministic: false, take a page snapshot first to see available options, then choose the right element by reference.

4

Use lower thresholds for broader search

Start with match_threshold: 0.5 instead of the default 0.7 to find more potential matches. You can always filter by similarity score after.

5

Replace variables with real values

Check the variables array in the response. Replace template placeholders like {recipient_name} with actual values before executing fill/type steps.

6

User must be logged in

The API returns steps that assume the user is already authenticated on the target website. Ensure the browser session is logged in before executing.

Troubleshooting

No results found?

  • Lower match_threshold to 0.4 or 0.3
  • Try rephrasing your query (e.g. "message someone on linkedin" instead of "DM on linkedin")
  • Remove the website filter to search across all sites

Element not found during execution?

  • Website UI may have changed — take a snapshot to see current page state
  • Try using response_format: "full" for more selector options
  • Ensure the user is logged in and on the correct page

Website not mapped?

We currently support a limited set of websites. The API will return a helpful message indicating which websites are available. More are being added — check back soon.

Claude Agent Skill

Drop a single file into your project and give any Claude-powered agent the ability to search Agent Maps and execute browser automations — no extra code needed.

What is a Skill file?

A SKILL.md file teaches Claude agents how to use Agent Maps end-to-end. It contains the full API reference, ARIA selector mapping, step-by-step execution patterns for deterministic and non-deterministic steps, variable handling, and real-world examples (send LinkedIn message, create post, follow company). Place it in your project root and Claude will automatically pick it up.

How to install

  1. Download SKILL.md using the button below
  2. Place it in your project root (alongside your package.json)
  3. Your Claude agent will now know how to search Agent Maps and execute browser tasks

Works with Claude Code, Claude Desktop (via MCP), and any agent using the Claude API with tool use.

What your agent will be able to do

Search tasks

Query Agent Maps API with natural language to find automation steps

Execute actions

Run each step using ARIA selectors with agent-browser or Playwright

Handle variables

Replace template fields with real values and manage dynamic steps

Frequently Asked Questions

Common questions about the Agent Maps API and browser automation.

Start building

The API is live and free during early preview. No signup, no API key just start making requests.