---
title: "Resilient Fetch"
method: POST
path: "/fetch/resilient"
tags: ["Pages"]
---

# Resilient Fetch

`POST /fetch/resilient`

## Request

- Base URL: `https://api.weblens.dev`
- URL: `https://api.weblens.dev/fetch/resilient`
- Auth: API key in header `Payment-Signature`

Resilient fetch with automatic fallback. Tries the fast native scraper first, then re-fetches through headless Chromium for client-rendered pages and sites that refuse bare HTTP clients. The response reports which tier served it. Price: $0.008 (70% off when served from cache); an x402 payment is at least $0.004.

## Request body

- object
  - `url` string, uri, required: The URL to process
  - `timeout` number: Request timeout in milliseconds
  - `cache` boolean: Serve a cached copy when one exists (cached responses are 70% off)
  - `cacheTtl` number: How long to cache this response, in seconds
  - `waitFor` string: CSS selector to wait for (Pro tier only)

## Response `200`

Native fetch, falling back to headless Chromium when it fails.

- object
  - `url` string: Fetched URL
  - `title` string: Page title
  - `content` string: Clean markdown content
  - `tier` string
  - `fetchedAt` string: ISO timestamp
  - `provider` object: Provider info: id, name, isProxied, attemptsUsed
  - `metadata` object: Page metadata
    - `description` string
    - `author` string
    - `publishedAt` string
  - `cached` boolean: Present and true when the response was served from cache
  - `requestId` string

## Other responses

- `400`: The body failed validation
- `402`: Payment required — x402 v2 protocol. Parse the PAYMENT-REQUIRED response header (base64-encoded JSON), sign the payment with your wallet, then retry the request with the Payment-Signature request header.

---

[API](https://skmtc.dev/weblens/apis/weblens-api.md) · [All operations](https://skmtc.dev/weblens/apis/weblens-api/llms.txt) · [OpenAPI document](https://skmtc.dev/weblens/apis/weblens-api/revisions/63a7e81b6921?raw)
