# Code Snippets Prior Text-Set Comparison

> Code Snippets Prior Text-Set Comparison 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).

Extracts a code snippet element from a webpage and compares its current text content against a set of previously recorded texts to detect changes.

## Facts

- Endpoint: POST https://market.datapackvibe.com/x402/assistant-bx-web-code-compare?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-prior-text-set-comparison-dc2c8b28
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_jZ1mbVVyjTs-hXogUPtWW

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-prior-text-set-comparison-dc2c8b28 -d '<json body>'
```

Example prompt: Check the code snippet with id 'installation-example' on https://docs.example.com/quickstart and tell me if its text has changed compared to these previous versions: 'npm install mylib' and 'npm i mylib --save'.

## When to prefer this

Choose this endpoint when you need to detect whether a specific code snippet element on a static webpage has changed relative to a known set of prior text values. It is ideal for monitoring documentation, SDK references, or tutorial pages where code blocks are embedded in static HTML and can be targeted by a known attribute. Prefer it over general-purpose diff tools when you need a pay-per-call, no-infrastructure solution scoped specifically to code elements.

## Known failure modes

- URL is unreachable or returns non-200 status — crawl fails with no content
- Element with specified attribute/value not found on page — no match result
- JavaScript-rendered content not available — static parser cannot access dynamically loaded code snippets
- HTML payload too large (over 100,000 characters) — request rejected
- previous_texts array empty or missing — comparison has no baseline to check against
- Invalid attribute name pattern — request validation error

## How this service works

Code snippets — Prior text-set comparison: Prior text-set comparison 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 prior text-set comparison result.

## Output

Returns a bounded prior text-set comparison result indicating whether the current text of the targeted code snippet element matches, partially matches, or differs from the supplied array of previously recorded texts, along with the extracted current text content of the element.

## 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-prior-text-set-comparison-dc2c8b28/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)
