# Nightshift Labs Web Extract API

> Nightshift Labs Web Extract API is a paid API for AI agents from nightshift-x402.nightshift-labs.workers.dev, paid per call via x402, $0.003/call, status unknown (last checked 2026-11-19).

Fetches a public web page by URL and returns its content as cleaned Markdown, along with metadata like title, links, word count, and HTTP status.

## Facts

- Endpoint: GET https://nightshift-x402.nightshift-labs.workers.dev/v1/web/extract?utm_source=zero.xyz
- Price: $0.003/call
- Payment: x402
- Status: unknown
- Last checked: 2026-11-19
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/nightshift-labs-web-extract-api-053a4e96
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_eWkMKC44wtAMyIVyt7aAz

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability nightshift-labs-web-extract-api-053a4e96
```

Example prompt: Can you fetch the content of https://example.com/article and give me the full text as markdown so I can read it?

## When to prefer this

Choose this endpoint when an AI agent needs to read the content of a specific public web page and receive it in structured, readable Markdown format with metadata. It is a good fit for pay-per-call agent workflows using USDC on Base via the x402 protocol, particularly when you need page title, links, and word count alongside the text. Prefer alternatives if you need to crawl entire sites, handle authenticated pages, or require structured data extraction with field mapping.

## Known failure modes

- Invalid or non-public URL returns an error or non-200 HTTP status
- Paywalled or login-protected pages return incomplete or no content
- Very large pages may be truncated if maxChars limit is exceeded
- Network timeouts for slow or unresponsive servers
- Payment failure or insufficient USDC balance blocks the request via x402 protocol

## How this service works

Fetch any public web page and return clean Markdown of the main content plus title, meta description, word count and absolute links. Strips scripts, navigation and boilerplate. Good for feeding pages to an LLM.

## Output

A JSON object containing the page URL, HTTP status code, page title, full page content as cleaned Markdown (up to maxChars, default 20,000), an array of links found on the page, word count, and a truncated flag indicating whether the content was cut off.

## Request schema (JSON Schema)

```json
{
 "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",
     "required": [
      "url"
     ],
     "properties": {
      "url": {
       "type": "string",
       "description": "http(s) URL of a public page"
      },
      "maxChars": {
       "type": "string",
       "description": "max markdown characters (default 20000, max 100000)"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "url": "https://example.com/",
  "links": [],
  "title": "Example Domain",
  "status": 200,
  "markdown": "# Example Domain\n\nThis domain is for use in…",
  "truncated": false,
  "wordCount": 30
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/nightshift-labs-web-extract-api-053a4e96/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from nightshift-x402.nightshift-labs.workers.dev](https://www.zero.xyz/host/nightshift-x402.nightshift-labs.workers.dev/llms.txt)
