Do these 3 things before closing this tab:
1Repair Windows errors before they cause bigger problems2Fix the driver behind crashes, sound loss and screen glitches3Clear out junk files and repair common Windows errorsSome links on this page are affiliate links: if you buy through them we may earn a commission, at no extra cost to you.
Yes. Microlink’s Metadata API lets you request normalized page metadata and your own selector-based fields in one request. Add named rules to the data option, then receive values such as a product price, rating, stock state, or heading list alongside fields like title, image, and description. The custom rules and normalized metadata come from the same fetch and cache entry, avoiding a second page request.
What a single metadata-and-fields request returns
A metadata-only response is useful for link previews, but product and content workflows often need values that a page does not publish in standard Open Graph tags. A Microlink request can return both kinds of data:
- Normalized metadata such as
title,description, andimage. - Named custom fields defined by CSS selectors in
data.
Each rule is evaluated independently. If a selector matches nothing, or the extracted value cannot satisfy the requested type, that field resolves to null; other fields can still succeed.
The Tool Desk
Outbyte Driver Updater FREEScan for outdated or missing drivers - takes under a minuteDriver Scan →Outbyte PC Repair FREEClear out junk files and repair common Windows errorsFree Scan →Basic JavaScript example
The documented SDK pattern looks like this:
const { title, image, price } = await microlink.metadata(
'https://example.com/product',
{
data: {
price: { selector: '.price', attr: 'text', type: 'number' }
}
}
)
console.log({ title, image, price })
.price is only an example. Inspect the target page and choose a selector that actually identifies its price element. A class name from one shop will not be universal.
#1 Best Overall
How extraction rules map page markup to values
selector: first matching element
Use selector when you need one value, such as the first price, a product name, or a stock label.
data: {
price: { selector: '[data-price]', attr: 'text', type: 'number' },
sku: { selector: '.sku', attr: 'text', type: 'string' }
}
selectorAll: repeated values
Use selectorAll for collections, such as every heading or review score shown on a page.
data: {
headings: {
selectorAll: 'h2, h3',
attr: 'text',
type: 'string'
}
}
The result is a collection rather than the first match. Keep the selector narrow enough that navigation headings and unrelated labels are not accidentally included.
Free tools Windows power users keep installed
One-click scans. No signup required.
attr: choose the representation
The attr setting controls what is read from the matched element. Microlink documents representations including:
textfor visible text.htmlfor the element’s HTML.markdownfor a Markdown representation.jsonfor JSON data where applicable.valfor form-control values.- An attribute name, such as
hreforcontent.
type: normalize and validate
Request a type when downstream code expects a predictable value. Documented types include string, number, boolean, date, url, and media types. Type validation is useful for preventing a currency symbol or explanatory text from silently becoming an invalid numeric value. Failed conversion produces null, so your application should handle that state.
Several product fields in one request
Put one named rule per field inside data. This example requests a title, price, rating, stock state, and gallery images together with normalized metadata:
const result = await microlink.metadata('https://shop.example/item', {
data: {
price: {
selector: '[data-testid="price"]',
attr: 'text',
type: 'number'
},
rating: {
selector: '[aria-label*="rating"]',
attr: 'aria-label',
type: 'string'
},
stock: {
selector: '.availability',
attr: 'text',
type: 'string'
},
images: {
selectorAll: '.product-gallery img',
attr: 'src',
type: 'url'
}
}
})
console.log(result)
Do not assume that a number is expressed in a particular currency, that a rating uses a particular scale, or that a stock label has a stable vocabulary. Store the source value and apply your own business rules where those semantics matter.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Fallbacks and nested rules
Real sites often have markup variations between templates or experiments. The SDK documentation supports nested rule structures and ordered fallbacks: if one rule fails, a later rule can be attempted. Use this for known alternatives, for example a data attribute first and a visible price element second. Keep fallback selectors specific; broad fallbacks can capture promotional text or a crossed-out old price.
Rank #3
JavaScript-rendered values
A selector cannot read a value that is absent until client-side JavaScript runs. For dynamic prices, single-page applications, or content loaded after navigation, enable prerender: true and wait for the target with waitForSelector:
const result = await microlink.metadata('https://shop.example/item', {
prerender: true,
waitForSelector: '.price',
data: {
price: { selector: '.price', attr: 'text', type: 'number' }
}
})
These options describe how Microlink prepares the page; they are not a guarantee that every site can be rendered or accessed. Test representative URLs, including products with different templates and unavailable items.
A practical implementation workflow
- Inspect default metadata first. If Open Graph or JSON-LD already contains the value, use that normalized field rather than maintaining a selector.
- Inspect the target DOM. Select an element tied to the value, not a fragile position such as “the third paragraph.”
- Choose the representation. Use
textfor visible labels, an attribute for links or data attributes, andselectorAllfor lists. - Declare a type. Request
number,date,boolean, orurlwhen your application needs normalization. - Handle null explicitly. A missing or invalid field is an expected result, not necessarily a request failure.
- Add fallbacks only for known variants. Document which template each fallback covers.
- Enable prerendering for client-rendered content. Wait for a selector that proves the value is present.
- Test a representative set. Include redirects, localized pages, out-of-stock products, and pages whose content changes after load.
When selectors are the wrong tool
Rule-based extraction is designed for narrow fields. If you need an entire article or broad page content, Microlink’s Markdown workflow is the more appropriate documented approach. Selectors also depend on the target site’s markup, so a redesign can invalidate them even when the page still looks correct to a human.
Metadata extraction versus search indexing
Choose the workflow according to the output you need:
| Need | Better fit | Important consideration |
|---|---|---|
| One response containing metadata and custom fields | Microlink Metadata API | Selectors, type conversion, null handling, and optional prerendering |
| Structured JSON attached while indexing | Cloudflare Browser Run with AI Search | Cloudflare documents up to five custom fields per instance, with text, number, boolean, or datetime types |
| Enriching a website search index from page-authored data | Google Cloud Agent Search | Uses inferred dates, meta tags, PageMaps, and Schema.org; page changes may require recrawling and schema changes trigger reindexing |
The Cloudflare limit is specific to its AI Search instance, not a general limit on web extraction. Indexing products also introduce operational concerns—recrawls, reindexing, and freshness—that do not apply to a one-off API response in the same way.
Transport examples and error handling
For a production integration, log the requested URL, rule version, response status, and which fields were null. Avoid treating a valid response containing a null custom field as an HTTP failure. Retry transient transport errors with a bounded policy, but do not blindly retry a deterministic selector mismatch.
Common symptoms
- Field is null: verify the selector, confirm the element exists in the fetched document, and check that the requested
attris present. - Number is null: inspect the text for currency symbols, ranges, or localized separators; request text first while adjusting the selector or normalization strategy.
- List is empty: use
selectorAlland confirm the repeated elements are present in the same DOM context. - Static HTML lacks the value: enable prerendering and wait for a selector that appears after JavaScript execution.
- Wrong value from a page with multiple prices: narrow the selector to the purchase panel and add a template-specific fallback.
- Results change after a redesign: update the selector rules and keep fixtures from representative pages so changes are detected early.
Or skip the browser setup
If your immediate need is a clean visual capture rather than structured field values, ScreenshotNeo provides a one-call website screenshot API. Cookie and consent banners, newsletter popups, and chat widgets are removed before capture; bot checks, blank pages, timeouts, failed loads, and cache hits are not billed, with the outcome exposed in response headers. Its MCP server lets Claude, Cursor, or another MCP client use take_screenshot, get_page_info, and capture_pdf.
Use the API documentation at https://screenshotneo.com/docs/ for all options. cURL:
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
Python:
import requests
r = requests.get("https://api.screenshotneo.com/v1/shot", params={"access_key": "YOUR_API_KEY", "url": "https://stripe.com"}, timeout=90)
open("shot.webp", "wb").write(r.content)
Node.js:
const q = new URLSearchParams({ access_key: 'YOUR_API_KEY', url: 'https://stripe.com' });
const res = await fetch(`https://api.screenshotneo.com/v1/shot?${q}`);
ScreenshotNeo includes 1,000 screenshots per month free with no card; paid plans start at $5 for 3,000. Create a free ScreenshotNeo account.
Best Value
FAQ
Frequently Asked Questions
Does one failed custom field fail the whole response?
No. Rules validate independently, so a missing or type-invalid field becomes null while other requested metadata and fields can still be returned.
Can I use this for a full article body?
Selectors are intended for narrow fields or lists. For broad article content, use Microlink’s documented Markdown workflow instead.
Recommended Free Tools
Is prerendering guaranteed to work on every JavaScript site?
No. It is the documented configuration for client-rendered values, but access, rendering, and site behavior still vary; test the URLs that matter to your application.
The Bottom Line
Use Microlink’s data rules when one API response must combine normalized metadata with site-specific fields. Select deliberately, type values explicitly, treat null as normal, and add prerendering only when the target value appears after JavaScript runs.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

