Article

Handle Firecrawl’s null stock values in shopping apps

For shopping-app builders, learn which Firecrawl clients receive null stock and how to keep unknown availability out of sold-out labels.

Editorial illustration for Handle Firecrawl’s null stock values in shopping apps: a document represents the research briefing. Not documentary evidence.

If Firecrawl returns null for a product’s stock, read it as “the page does not say,” not “sold out.” Its November 27, 2026 change brings that unknown state to direct HTTP integrations and specified newer software development kits (SDKs), while older SDKs retain their previous boolean responses.

For shopping assistants, comparison sites and catalogue imports, the immediate task is to preserve unknown stock through validation, storage and display. Otherwise, a valid response could be rejected or missing information could become a misleading sold-out label.

Which Firecrawl integrations receive null?

Direct HTTP callers receive the changed response now. For SDK users, Firecrawl lists these releases for receiving null; tools built on an SDK follow its underlying version.

SDK

Release listed for null support

Python

4.59.0

JavaScript

4.57.0

Java

1.19.0

Go

1.17.0

Rust

2.22.0

Ruby

1.18.0

PHP

1.17.0

.NET

1.16.0

Check deployed dependency versions and lockfiles, including background importers and third-party wrappers. Prepare downstream consumers before upgrading an older SDK. The announcement gives no deadline for retiring older-SDK compatibility, so this is not an instruction for every Firecrawl user to upgrade immediately.

Compatibility also has a limit: older SDKs still return a boolean when stock is unstated. That means a historical true or false value is not necessarily proof that the merchant stated it. The notice does not say every old unknown value was false.

Accept null without accepting malformed data

In a raw HTTP response, stock sits at data.product.variants[].availability.inStock. The API schema requires availability on each variant and inStock within it, but allows inStock to be true, false or null. Allowing null is not the same as allowing the field to disappear.

SDKs return the data object directly; check the language’s object and field naming rather than copying the raw HTTP path unchanged. Keep missing fields, strings such as "false", and numeric substitutes such as 0 on a separate validation-error path.

In JavaScript, both false and null are falsy. A simple if/else cannot tell them apart. Avoid converting the field with Boolean(value), value || false or value ?? false when you need to retain unknown stock.

For a null-capable response, this illustrative JavaScript helper separates the three values. It is display logic, not a complete response validator:

function stockLabel(value) {
  if (value === true) return "Page reports in stock";
  if (value === false) return "Page reports out of stock";
  if (value === null) return "Availability unknown";
  throw new TypeError("Missing or invalid inStock value");
}

Preserve the distinction in database columns, exports, dashboards and any text sent to an assistant. A nullable validator does little good if the next step silently replaces null with false. Keep source and observation-time information; label any retained last-known stock separately from the current reading.

What should shoppers see for unknown stock?

Keep unknown stock separate from sold out. A practical default is an “Availability unknown” label with a link to the merchant. Alternatively, exclude unknown variants from an explicitly in-stock-only filter or schedule a bounded recheck. Hiding a variant is a display decision, not evidence that it is unavailable.

Apply the rule per variant: one size or colour can have a different state from another. For stock alerts, a conservative policy is to require an explicit true reading before notifying someone that an item is back. A transition from false to null supplies no evidence of a restock. These are application-policy choices, not built-in Firecrawl alert guarantees.

A missing product is a different problem

Firecrawl’s product-format guide says it extracts on-page structured data without an LLM. Ambiguous pages or pages without an extractable product return a warning and omit the product object. The API schema also permits a null product object. Neither case is a variant whose stock is unknown.

Handle an absent or null product before reading variants, retain the warning and inspect request and target-page status. Do not manufacture a sold-out product to fill the gap. For self-hosted deployments, the guide says a configured PRODUCT_EXTRACTION_SERVICE_URL is required; without that service, requesting product format also produces a warning and no product.

The change also adds optional gtin, mpn and condition fields. The schema keeps them optional: do not make their absence a failed import. Preserve product identifiers as strings rather than converting them into numbers.

Recheck for freshness, not until you get a boolean

A fresh page can still omit stock information. Firecrawl’s cache guide documents a default maximum cache age of two days. Setting maxAge: 0 forces a new scrape, but the vendor warns that bypassing cache takes longer and is more failure-prone.

Choose a freshness limit for the purchase decision and cap retries. The billing documentation charges one base credit for a returned ordinary scraped page, plus applicable options; a missing product does not make that returned document free. Retrying until stock becomes true or false can therefore spend credits without resolving the uncertainty.

Page-reported availability is not a stock reservation or a guaranteed checkout outcome. If the assistant also finds promotions, keep Firecrawl deal-search costs and coupon checks separate: this product-format change does not establish a change to those provider responses.

Checks to add before deployment

Use these proposed cases in your own validation and integration checks:

  • True, false and null remain distinct through display, storage and export; null never becomes a sold-out badge.

  • Missing availability or inStock, string values and numeric substitutes reach diagnostics rather than silent coercion.

  • An absent or null product with a warning creates no invented variant and sends no stock alert.

  • Mixed-stock variants remain independent; optional identifiers can be present or absent.

  • An older-SDK fixture and a null-capable fixture follow their respective contracts; false followed by null does not trigger a restock alert.

For a shopping assistant that also calls Claude, keep its API and SDK upgrade checks separate from this migration. The Firecrawl change is ready to ship only when every consumer can preserve “unknown,” not merely when the new package installs.