{"uid":"cap_kSmcZKqhT_MmPXePRirAc","slug":"code-snippets-distinct-attribute-values-87c37e4c","name":"Code Snippets — Distinct Attribute Values","description":"Code snippets — Distinct attribute values: Distinct attribute values 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 distinct attribute values result.","url":"https://market.datapackvibe.com/x402/assistant-bx-web-code-attribute-values?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"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}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.01","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.01/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_iGKjnpQaKCCZEThyLa9oL","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.01","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Parses a web page or HTML snippet to extract all distinct values of a specified HTML attribute on code elements matching a search term.","exampleAgentPrompt":"Can you scan the HTML at https://docs.example.com/api-reference and extract all distinct values of the 'data-kind' attribute found on code elements that mention 'product'?","exampleUseCases":[{"title":"Audit code snippet categories on docs site","prompt":"Go to https://developer.myapi.com/guides and pull out every distinct value of the 'data-lang' attribute used on code elements that contain the word 'authentication' — I want to see which languages are covered."},{"title":"Find unique IDs on tutorial code blocks","prompt":"Parse this HTML I'm pasting and list all unique 'id' attribute values found on code tags related to 'example': <!doctype html><html><body><code id='ex1' data-kind='snippet'>Example one</code><code id='ex2' data-kind='demo'>Example two</code></body></html>"},{"title":"Enumerate data attributes for code blocks on landing page","prompt":"Fetch https://codelibrary.io/samples and return all distinct values of the 'class' attribute on code elements mentioning 'guide', excluding any values I've already seen like 'highlight' and 'inline'."}],"resultDescription":"Returns a bounded list of distinct values found for the specified HTML attribute across code elements on the parsed page or HTML, filtered by the search term and optionally by a specific attribute value, excluding previously seen texts if provided.","failureModes":["URL is unreachable or returns a non-200 status — parsing fails with no results","JavaScript-rendered content not captured — statically parsed only, dynamic code blocks may be missing","No code elements match the search term — returns empty distinct values list","Attribute name pattern does not match schema regex — request rejected with validation error","HTML payload exceeds 100,000 character limit — request rejected","previous_texts list exceeds 200 items — request rejected"],"whenToPreferThis":"Choose this endpoint when you need to enumerate distinct HTML attribute values specifically on code snippet elements from a static page or raw HTML, especially when you want to understand the variety of metadata tags (like id, class, data-* attributes) used on code blocks. Prefer it over generic HTML scrapers when you need the filtering by term and deduplication built in at a low per-call cost.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-21T00:52:35.240Z","isFirstParty":false,"canonicalSlug":"code-snippets-distinct-attribute-values-87c37e4c"}