# Code Snippets — Literal Attribute Matches

> Code Snippets — Literal Attribute Matches is a paid API for AI agents from market.datapackvibe.com, paid per call via x402, $0.01/call, status unknown (last checked 2026-10-17).

Parses an HTML page to find code snippet elements whose specified attribute exactly matches a given value, filtering by a search term.

## Facts

- Endpoint: POST https://market.datapackvibe.com/x402/assistant-bx-web-code-attribute-match?utm_source=zero.xyz
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-17
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/code-snippets-literal-attribute-matches-f344d2a6
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_d2qyIouwB0DWEi2pJ2ATt

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 code-snippets-literal-attribute-matches-f344d2a6 -d '<json body>'
```

Example prompt: Search this HTML page for any code snippet elements where the 'data-kind' attribute exactly equals 'example' and the text contains 'product' — here's the raw HTML: <!doctype html><html><body><code id='sample' data-kind='example'>Example product guide</code></body></html>

## When to prefer this

Choose this endpoint when you need to statically extract code snippet elements from HTML by an exact attribute match (e.g. id, class, or data-* attributes) without JavaScript rendering. It is purpose-built for <code> tag extraction in a shared multi-profile engine, making it more precise than a general-purpose HTML scraper when the target is specifically code blocks identified by literal attribute values.

## Known failure modes

- URL is unreachable or returns a non-200 status — no content to parse
- HTML exceeds 100,000 character limit — request rejected
- Attribute name does not match pattern ^[a-zA-Z][a-zA-Z0-9:_-]{0,49}$ — validation error
- No code elements found matching the attribute and term — empty result
- JavaScript-rendered content not parsed — dynamically injected code snippets missed
- Term is empty or missing — minimum length of 1 not met

## How this service works

Code snippets — Literal attribute matches: Literal attribute matches for Code snippets. One public HTTPS page or supplied HTML; static parsing, no JavaScript rendering, login or access bypass. Specialised preset in a shared 50-profile, 20-operation engine. 0.01 USDC includes one bounded literal attribute matches result.

## Output

Returns up to one bounded result containing the matched code snippet element(s) from the parsed HTML, specifically those whose named attribute exactly equals the given value and whose text content matches the search term, filtered against any previously seen texts.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "url": {
   "type": "string",
   "default": "",
   "maxLength": 2048
  },
  "html": {
   "type": "string",
   "default": "<!doctype html><html><head></head><body><code id=\"sample\" data-kind=\"example\">Example product guide</code></body></html>",
   "maxLength": 100000
  },
  "term": {
   "type": "string",
   "default": "product",
   "maxLength": 100,
   "minLength": 1
  },
  "attribute": {
   "type": "string",
   "default": "id",
   "pattern": "^[a-zA-Z][a-zA-Z0-9:_-]{0,49}$",
   "maxLength": 50
  },
  "previous_texts": {
   "type": "array",
   "items": {
    "type": "string",
    "default": "",
    "maxLength": 1000
   },
   "default": [
    "Older example"
   ],
   "maxItems": 200,
   "minItems": 0
  },
  "attribute_value": {
   "type": "string",
   "default": "sample",
   "maxLength": 200
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/code-snippets-literal-attribute-matches-f344d2a6/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from market.datapackvibe.com](https://www.zero.xyz/host/market.datapackvibe.com/llms.txt)
