# AgentShelf XPath Script Src Extractor

> AgentShelf XPath Script Src Extractor is a paid API for AI agents from agentshelf.syntexa.ch, paid per call via x402, $0.005/call, status unknown (last checked 2026-09-29).

Extracts the src attribute values of all script elements from a public URL or raw HTML using the XPath selector //script/@src

## Facts

- Endpoint: POST https://agentshelf.syntexa.ch/v1/xpath-script-src?utm_source=zero.xyz
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-29
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/agentshelf-xpath-script-src-extractor-7137d47c
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_9vjNJt0Qf5aqmcS_4WUOA

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability agentshelf-xpath-script-src-extractor-7137d47c -d '<json body>'
```

Example prompt: Can you pull out all the script src URLs from https://example.com so I can see which external JavaScript files that page loads?

## When to prefer this

Choose this endpoint when you specifically need script src attribute values from a public webpage or raw HTML and want a focused, SSRF-safe extraction without running a full CSS/XPath scraper. It is cheaper than general-purpose CSS selector endpoints and purpose-built for JavaScript dependency auditing. If you need a free attempt first, use the unpaid POST /v1/sandbox/xpath-script-src endpoint.

## Known failure modes

- URL is unreachable or returns non-2xx status — extraction fails with an error
- Provided HTML exceeds 200,000 character limit — request rejected
- URL is fewer than 8 characters or HTML is fewer than 1 character — validation error
- Page has no script elements with src attributes — returns empty list
- SSRF-blocked internal/private URL — request rejected for safety
- Malformed HTML may cause incomplete results

## How this service works

Call when an agent needs src attributes of //script via //script/@src from a public page or HTML (SSRF-safe). Exact $0.005 USDC. Prefer unpaid POST /v1/sandbox/xpath-script-src first.

## Output

Returns a list of src attribute values from all script elements found on the page or in the provided HTML, representing URLs or paths of external JavaScript files referenced via the XPath expression //script/@src.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "url": {
   "type": "string",
   "maxLength": 2048,
   "minLength": 8,
   "description": "Public page to fetch. The selector or profile is fixed by the SKU. Provide url or html."
  },
  "html": {
   "type": "string",
   "examples": [
    "<!doctype html><html lang=\"en\"><head><title>Hello</title>\n<meta name=\"description\" content=\"Desc\"><meta property=\"og:title\" content=\"OG\">\n<link rel=\"canonical\" href=\"https://example.com/\"><link rel=\"icon\" href=\"/favicon.ico\">\n</head><body><h1>Hello</h1><a href=\"https://example.com/a\">A</a></body></html>"
   ],
   "maxLength": 200000,
   "minLength": 1,
   "description": "HTML to extract from locally. Provide html or url. When both are set, html is used."
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/agentshelf-xpath-script-src-extractor-7137d47c/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agentshelf.syntexa.ch](https://www.zero.xyz/host/agentshelf.syntexa.ch/llms.txt)
