# Code Snippets — Adjacent Word-Pair Frequency

> Code Snippets — Adjacent Word-Pair Frequency 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).

Analyzes a web page or HTML containing code snippets and returns the frequency of adjacent word pairs (bigrams) within the code content.

## Facts

- Endpoint: POST https://market.datapackvibe.com/x402/assistant-bx-web-code-bigrams?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-adjacent-word-pair-frequency-3892ac0d
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_Z7fPFi5X9GOucyFVNoDuC

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-adjacent-word-pair-frequency-3892ac0d -d '<json body>'
```

Example prompt: Fetch the page at https://docs.example.com/getting-started and count how often adjacent word pairs appear in the code snippets — I'm looking for the term 'function call' and want bigram frequencies from the element with id 'sample'.

## When to prefer this

Choose this endpoint when you need bigram (adjacent word-pair) frequency statistics specifically from code snippet HTML elements on a public web page or supplied HTML, and you want a fast, low-cost ($0.01 USDC) single-call result without needing full NLP pipeline infrastructure. Prefer this over general text analysis tools when the target content is code blocks rather than prose.

## Known failure modes

- URL is inaccessible or returns non-200 status — no content to parse
- HTML content exceeds 100,000 character limit — request rejected
- No code snippet elements found matching the specified attribute/attribute value — empty or null result
- Term parameter missing or too short — validation error
- JavaScript-rendered content not available — static parser only, dynamic content missed
- Rate limit or capacity exceeded on the shared 50-profile engine — request queued or failed

## How this service works

Code snippets — Adjacent word-pair frequency: Adjacent word-pair frequency 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 adjacent word-pair frequency result.

## Output

Returns a bounded result containing adjacent word-pair (bigram) frequency counts extracted from code snippet elements on the specified page or HTML input, scoped to the relevant element identified by the given attribute and attribute value.

## 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-adjacent-word-pair-frequency-3892ac0d/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)
