Check a product page's price and stock availability
Given a product page's url, returns its current price and stock status — reading the page's own schema.org markup rather than guessing from the DOM.
Also known as: price, stock, in stock, out of stock, availability, inventory, product availability, price check
Call it
bowmark.products.getAvailability(url: string): Promise<ProductAvailability>Functions
| Function | What it does |
|---|---|
getAvailability | Reads one product page and returns its price and stock status, from the page's own schema.org Product/Offer markup — no browser, no per-site adapter. |
Types
interface ProductAvailability {
url: string
requestedUrl: string
status: number
ok: boolean
title: string | null
price: { amount: number; currency: string } | null // integer minor units
availability: string | null // "InStock" | "OutOfStock" | "PreOrder" | "BackOrder" | …
source: "ld+json" | "microdata" | "none"
error: string | null
warnings: string[]
}Examples
// A real, live product page — run this as-is to see a genuine price+stock read
// when the caller hasn't named a specific product yet.
const listing = await bowmark.products.getAvailability("https://www.nativecos.com/products/last-chance-plastic-free-deodorant-stick");
if (!listing.ok) return { error: listing.error };
log(`${listing.title}: ${listing.availability ?? "unknown"}`);
return { price: listing.price, availability: listing.availability };Providers behind it
None — this capability needs no site. It computes the answer, or reads a public API that publishes it.