{"uid":"cap_d2qyIouwB0DWEi2pJ2ATt","slug":"code-snippets-literal-attribute-matches-f344d2a6","name":"Code Snippets — Literal Attribute Matches","description":"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.","url":"https://market.datapackvibe.com/x402/assistant-bx-web-code-attribute-match?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_Lek-tvGdFXJqe2fplfPyZ","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 an HTML page to find code snippet elements whose specified attribute exactly matches a given value, filtering by a search term.","exampleAgentPrompt":"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>","exampleUseCases":[{"title":"Extract tagged code samples from docs page","prompt":"Go to https://docs.example.com/api-reference and find all code snippet elements where the attribute 'data-kind' exactly matches 'request-sample' and the content includes the word 'auth'."},{"title":"Audit code blocks by ID in supplied HTML","prompt":"Here's my HTML — can you find any <code> element where the 'id' attribute is exactly 'sample' and the text includes 'product'? I want to check which code blocks are tagged that way."},{"title":"Filter code snippets by CSS class on a live page","prompt":"Pull up https://myblog.dev/tutorials/intro and extract all code snippets where the 'class' attribute is exactly 'language-python' and the snippet text contains 'import'."}],"resultDescription":"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.","failureModes":["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"],"whenToPreferThis":"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.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-21T00:52:34.780Z","isFirstParty":false,"canonicalSlug":"code-snippets-literal-attribute-matches-f344d2a6"}