cd /news/ai-agents/turn-any-web-page-into-typed-json-fo… · home › topics › ai-agents › article
[ARTICLE · art-151713] src=dev.to ↗ pub= topic=ai-agents verified=true sentiment=↑ positive

Turn any web page into typed JSON for your AI agent (with a source quote for every value)

A developer published an Apify actor, Webpage to JSON for AI Agents, that converts any URL plus a plain-English field description into typed JSON, attaching a source quote to each extracted value. The tool supports an exact extractionSchema, a listMode for pulling many records from a single page, and evidence checking that flags unquoted values in unverifiedFields. It can be called via the Apify Python client or added as an MCP tool in clients like Claude and Cursor, priced at $0.03 per page with data and nothing for pages where no data is found.

by read1 min views3 publishedOct 17, 2026

LLM agents are great at reasoning and bad at reading messy HTML. The usual fix is a custom scraper per site, which breaks every time the site changes.

Webpage to JSON for AI Agents takes a URL and a plain-English description of the fields you want, and returns typed JSON. Every value comes with a quote from the page, so you can check it isn't made up.

Input:

{
  "urls": ["https://books.toscrape.com/catalogue/a-light-in-the-attic_1000/index.html"],
  "instruction": "Extract the book title, price as a number, currency code, and whether it is in stock."
}

Output (real run):

{
  "data": { "title": "A Light in the Attic", "price": 51.77, "currencyCode": "GBP", "inStock": true },
  "evidence": { "title": "# A Light in the Attic", "price": "£51.77" },
  "unverifiedFields": []
}

Useful options

extractionSchema when you need an exact shape.listMode: true to get many records from one page, such as product grids or job boards.requireEvidence is on by default. A value without a source quote is flagged in unverifiedFields. Call it from code

from apify_client import ApifyClient
client = ApifyClient("<YOUR_APIFY_TOKEN>")
run = client.actor("s3nafps/webpage-to-json-for-ai-agents").call(run_input={
    "urls": ["https://example.com/pricing"],
    "instruction": "List each plan with name, monthly price and included seats."
})
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item["data"])

Use it as an MCP tool: add https://mcp.apify.com/?actors=s3nafps/webpage-to-json-for-ai-agents to Claude, Cursor or any MCP client, and your agent can call it directly.

The LLM cost is included. You pay $0.03 per page with data and nothing for pages where no data was found.

── more in #ai-agents 4 stories · sorted by recency
── more on @apify 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
→ Live at https://your-agent.zahid.host ✓
Get free account → Pricing
from €0/mo · no card required
LIVE [news/turn-any-web-page-in…] indexed:0 read:1min 2026-10-17 · —