Fix broken JSON from LLMs
x402-weblens-api-production.up.railway.app/v1/json-repair
Fix broken JSON from LLMs: removes code fences and comments, fixes single quotes, bare keys, trailing commas, Python literals and cut-off endings. Optionally validates the result against your JSON Schema and lists errors.
POST
https://x402-weblens-api-production.up.railway.app/v1/json-repairUptime100% of 4 checks in 30 days
30 days agoToday
Try it
Pays from your browser wallet in USDC on Base or USDG on Robinhood Chain, whichever the endpoint takes. The provider is paid directly; failed calls aren't refunded by Fourohtwo.
The response shows up here.
Call it from an agent
// npm install fourohtwo
import { createPayer } from "fourohtwo";
// One agent key pays USDC on Base or USDG on Robinhood Chain, inside your spending rules.
const pay = createPayer({ privateKey: process.env.AGENT_KEY, maxPerCallUsd: "0.05" });
const res = await pay("https://x402-weblens-api-production.up.railway.app/v1/json-repair", {
method: "POST",
headers: { "content-type": "application/json" },
body: JSON.stringify({"schema":{"required":["name"],"type":"object"},"text":"{name: 'Ana', tags: ['a','b',], ok: True}"}),
});
console.log(await res.json());Example input
{
"schema": {
"required": [
"name"
],
"type": "object"
},
"text": "{name: 'Ana', tags: ['a','b',], ok: True}"
}More from WebLensProvider status
- api.weblens.dev/answerGrounded answer with inline [n] citations: searches the web, fetches sources, and answers strictly from them.0.05
- api.weblens.dev/companyA company profile from its domain, read live from its own site: what it sells and to whom, pricing and plans, NAICS sector, self-reported head count band, open roles from its Greenhouse/Lever/Ashby board, tech stack, socials, security.txt role contacts, and the domain's registrar, age, email provider, SaaS vendors and SPF/DMARC posture. Each AI-read field names its source page; coverage flags show0.05
- api.weblens.dev/contentsCheap bulk page text: fetch 1-20 URLs and get clean markdown, truncated to a per-page cap. $0.0015 per URL.0.004
- api.weblens.dev/crawlCrawl a site and get clean markdown for every page, in one call. Same-host BFS with depth and page-budget limits, robots.txt honoured by default. $0.0015 per requested page (1-25).0.02
- api.weblens.dev/discussionsWhat Hacker News said about a topic: matching stories with points, comment counts and links to the threads, plus aggregates — total matches, points and comments returned, the domains most often submitted, and the first/last time it was discussed.0.004
- api.weblens.dev/domainDomain intelligence in one call: RDAP registration (registrar, age, expiry, status), live DNS (A/AAAA/MX/NS/TXT), the mail and DNS providers behind them, the SaaS vendors the domain's TXT verification tokens reveal, SPF/DMARC posture, and risk signals like newly-registered or no-registrar-lock.0.005
- api.weblens.dev/extractExtract structured data from any webpage using JSON schema. AI-powered extraction that understands page context.0.03
- api.weblens.dev/fetch/basicFetch and convert any webpage to clean markdown. Fast, no JavaScript rendering. Perfect for static content, articles, and documentation.0.004
- api.weblens.dev/fetch/proFetch webpage with full JavaScript rendering using headless browser. Perfect for SPAs, React/Vue apps, and dynamic content that requires JS execution.0.006
- api.weblens.dev/intel/projectOff-chain due diligence on a project's web presence — the half on-chain rug checkers cannot see. Domain age and registrar, whether a team page, whitepaper, docs and socials exist, whether the site is an off-the-shelf template, and a cross-check of the contract address you are about to trade against the addresses actually printed on the project's own website. Returns weighted risk signals and an A-0.05
- api.weblens.dev/mapDiscover a site's URLs without fetching page content. Reads robots.txt sitemap directives, sitemap.xml and nested sitemap indexes, falling back to homepage link extraction.0.004
- api.weblens.dev/packageShould you depend on this package? Version, license, deprecation (with the maintainer's reason), weekly and monthly downloads, last release date, maintainer count, npm quality/popularity/maintenance scores, and health signals — npm or PyPI, one call.0.004
