{"uid":"cap_ch11-2mAIaD0Er_HlppzI","slug":"extract-data-attributes-as-json-7d415907","name":"Extract Data Attributes as JSON","description":"Extract the page's data attributes as json: fetches the URL, pulls every data attributes element and returns them as a JSON array, with a count. Structured, one-element-type extraction for agents and pipelines; no browser needed. $0.01 per page.","url":"https://page.intel.rallylive.ca/page/data-attributes/json?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method"],"properties":{"type":{"type":"string","const":"http"},"method":{"enum":["GET"],"type":"string"},"queryParams":{"type":"object","properties":{}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object"}}}}},"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_w9MPGlX2YD1jva1RzZwFm","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":"Fetches a web page and extracts all HTML data-* attributes, returning them as a structured JSON array with a count.","exampleAgentPrompt":"Can you fetch https://example.com/products and pull out all the HTML data-* attributes as a JSON array so I can see what metadata is embedded in the page elements?","exampleUseCases":[{"title":"Audit e-commerce product metadata","prompt":"Go to https://shop.example.com/item/123 and extract all the HTML data attributes as JSON — I want to see what product metadata is embedded in the page elements like data-sku, data-price, and data-category."},{"title":"Scrape analytics tracking attributes","prompt":"Can you fetch https://myblog.com/article/how-to-code and pull every data-* attribute from the page as a JSON array? I'm trying to see what analytics tracking data they've embedded in the HTML."},{"title":"Verify CMS-injected data attributes","prompt":"Pull all the HTML data attributes from https://cms-site.com/homepage as JSON — I need to check that our CMS is injecting the right data-component and data-version values into the page elements."}],"resultDescription":"A JSON array of all data-* HTML attributes found on the page, with each element's attribute name and value, along with a total count of extracted attributes.","failureModes":["URL is unreachable or returns non-200 status — extraction fails with an error","Page has no data-* attributes — returns empty array with count of 0","URL points to a non-HTML resource (PDF, image, etc.) — parsing may fail or return empty results","Rate limiting or network timeout from the target server — request fails","Malformed URL input — returns validation error"],"whenToPreferThis":"Choose this endpoint when you specifically need to extract HTML data-* attributes from a page in structured JSON format, without needing a browser or JavaScript rendering. It is ideal for agent pipelines that need to programmatically inspect embedded metadata, analytics tags, or CMS-injected data attributes on a page. Prefer this over general-purpose scrapers when you need only data attributes in a clean, countable JSON array at low cost ($0.01/call).","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-20T18:56:48.688Z","isFirstParty":false,"canonicalSlug":"extract-data-attributes-as-json-7d415907"}