# WebLens Discussions Search API

> WebLens Discussions Search API is a paid API for AI agents from api.weblens.dev, paid per call via x402, $0.004/call, status unknown (last checked 2026-10-02).

Searches and retrieves community discussions (e.g. Hacker News) matching a query, returning ranked stories with metadata and aggregate summary statistics

## Facts

- Endpoint: POST https://api.weblens.dev/discussions?utm_source=zero.xyz
- Price: $0.004/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-02
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/weblens-discussions-search-api-d96d80fa
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_cdxOqRVb8P1aPGDoapcEO

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 weblens-discussions-search-api-d96d80fa -d '<json body>'
```

Example prompt: Search Hacker News discussions for 'cloudflare workers' and show me the top results sorted by relevance, including points and comment counts.

## When to prefer this

Choose this endpoint when you need to search developer-community discussions (especially Hacker News) by keyword or topic, retrieve ranked story metadata with engagement signals (points, comments), and get aggregate statistics about community interest over time. Prefer it over general web scraping when the target is structured community discussion data rather than raw page content, and when you want pay-per-call pricing with no subscription commitment.

## Known failure modes

- Invalid or unsupported source parameter returns an error
- Empty or overly broad query may return low-relevance results
- Payment failure via x402 protocol results in 402 Payment Required response
- Rate limiting or network errors may cause transient failures
- Very recent events may not yet be indexed, returning partial or empty results

## How this service works

# WebLens - Web Intelligence API, pay per call

Scrape, crawl, map and extract the web. No account, no API key, no monthly
minimum — you pay for the calls you make and nothing else.

## Pricing
Page fetching starts at **$0.002**, whole-site crawling at
**$0.0015/page**, and sitemap discovery at **$0.004**.
Comparable services bill $0.007-0.008 per request, or reach a lower per-page
rate only on a $99/month commitment. WebLens has no commitment to reach.

## Payment Protocol
All paid endpoints use the [x402 protocol](https://x402.org) for HTTP-native
micropayments (USDC on Base).

## Cache Discount
Cached responses are **70% cheaper** than fresh fetches.

## Output

Returns a JSON object containing a list of matching discussion stories (each with URL, title, author, points, comment count, post timestamp, and direct discussion URL), plus a summary block with total matches, date range of results, number of stories returned, total points and comments across results, and top linked domains. Also includes a request ID and the timestamp of the search.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "sort": {
   "enum": [
    "relevance",
    "recent"
   ],
   "type": "string",
   "description": "Ranking (default relevance)"
  },
  "limit": {
   "type": "number",
   "maximum": 50,
   "description": "Stories to return (1-50, default 10)"
  },
  "query": {
   "type": "string",
   "description": "What to search Hacker News for"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "sort": "relevance",
  "query": "cloudflare workers",
  "source": "hackernews",
  "stories": [
   {
    "url": "https://github.com/cloudflare/workerd",
    "title": "Workerd: Open-source Cloudflare Workers runtime",
    "author": "jgrahamc",
    "points": 689,
    "comments": 133,
    "postedAt": "2022-09-27T14:00:00.000Z",
    "discussionUrl": "https://news.ycombinator.com/item?id=32979198"
   }
  ],
  "summary": {
   "lastSeen": "2026-07-30T00:00:00.000Z",
   "returned": 10,
   "firstSeen": "2018-03-12T00:00:00.000Z",
   "topDomains": [
    {
     "count": 3,
     "domain": "github.com"
    }
   ],
   "totalMatches": 1259,
   "pointsReturned": 3421,
   "commentsReturned": 2870
  },
  "requestId": "req_disc123",
  "discussedAt": "2026-08-02T12:00:00.000Z"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/weblens-discussions-search-api-d96d80fa/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.weblens.dev](https://www.zero.xyz/host/api.weblens.dev/llms.txt)
