# Code Snippets — Attribute Presence Check

> Code Snippets — Attribute Presence Check 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).

Checks whether a specific HTML attribute (optionally with a given value) is present on code snippet elements matching a search term in a given webpage or HTML fragment.

## Facts

- Endpoint: POST https://market.datapackvibe.com/x402/assistant-bx-web-code-attribute-presence?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-attribute-presence-check-8e1a9722
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_Oe4oakb1tdFFr8FV8phFv

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-attribute-presence-check-8e1a9722 -d '<json body>'
```

Example prompt: Check the page at https://example.com/docs whether any code snippet containing the word 'authentication' has an 'id' attribute with the value 'auth-sample' — just static HTML parsing, no JavaScript needed.

## When to prefer this

Use this endpoint when you need a lightweight, low-cost ($0.01) static HTML check to confirm whether code snippet elements on a public page or supplied HTML fragment carry a specific attribute, optionally with an exact value match. Prefer it over full browser-based scrapers when the page content is server-rendered and no JavaScript execution is needed. Ideal for documentation QA, CMS audits, and automated accessibility or schema checks on code blocks.

## Known failure modes

- URL is unreachable or returns a non-200 status — no HTML fetched, check fails
- HTML content exceeds 100,000 character limit — input rejected
- Attribute name does not match allowed pattern (must start with a letter, max 50 chars) — validation error
- Search term is empty or missing — required field error
- Page content is JavaScript-rendered only — static parser finds no code elements
- Attribute present but value does not match the specified attribute_value — returns not-found result

## How this service works

Code snippets — Attribute presence check: Attribute presence check 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 attribute presence check result.

## Output

Returns a bounded attribute presence check result indicating whether the specified HTML attribute (and optionally its expected value) was found on code snippet elements containing the given search term within the provided URL or HTML content. Includes match details based on static parsing only — no JavaScript rendering is performed.

## 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-attribute-presence-check-8e1a9722/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)
