{"slug": "turn-any-web-page-into-typed-json-for-your-ai-agent-with-a-source-quote-for", "title": "Turn any web page into typed JSON for your AI agent (with a source quote for every value)", "summary": "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.", "body_md": "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.\n\n[Webpage to JSON for AI Agents](https://apify.com/s3nafps/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.\n\n**Input:**\n\n```\n{\n  \"urls\": [\"https://books.toscrape.com/catalogue/a-light-in-the-attic_1000/index.html\"],\n  \"instruction\": \"Extract the book title, price as a number, currency code, and whether it is in stock.\"\n}\n```\n\n**Output (real run):**\n\n```\n{\n  \"data\": { \"title\": \"A Light in the Attic\", \"price\": 51.77, \"currencyCode\": \"GBP\", \"inStock\": true },\n  \"evidence\": { \"title\": \"# A Light in the Attic\", \"price\": \"£51.77\" },\n  \"unverifiedFields\": []\n}\n```\n\n**Useful options**\n\n`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`.\n**Call it from code**\n\n``` python\nfrom apify_client import ApifyClient\nclient = ApifyClient(\"<YOUR_APIFY_TOKEN>\")\nrun = client.actor(\"s3nafps/webpage-to-json-for-ai-agents\").call(run_input={\n    \"urls\": [\"https://example.com/pricing\"],\n    \"instruction\": \"List each plan with name, monthly price and included seats.\"\n})\nfor item in client.dataset(run[\"defaultDatasetId\"]).iterate_items():\n    print(item[\"data\"])\n```\n\n**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.\n\nThe LLM cost is included. You pay $0.03 per page with data and nothing for pages where no data was found.", "url": "https://wpnews.pro/news/turn-any-web-page-into-typed-json-for-your-ai-agent-with-a-source-quote-for", "canonical_source": "https://dev.to/s3nafps/turn-any-web-page-into-typed-json-for-your-ai-agent-with-a-source-quote-for-every-value-39lb", "published_at": "2026-10-17 01:48:24+00:00", "updated_at": "2026-10-17 01:57:09.303081+00:00", "lang": "en", "topics": ["ai-agents", "ai-tools", "agent-protocols", "developer-tools", "structured-data"], "entities": ["Apify", "Webpage to JSON for AI Agents", "Claude", "Cursor", "MCP"], "also_reported_by": [], "alternates": {"html": "https://wpnews.pro/news/turn-any-web-page-into-typed-json-for-your-ai-agent-with-a-source-quote-for", "markdown": "https://wpnews.pro/news/turn-any-web-page-into-typed-json-for-your-ai-agent-with-a-source-quote-for.md", "text": "https://wpnews.pro/news/turn-any-web-page-into-typed-json-for-your-ai-agent-with-a-source-quote-for.txt", "jsonld": "https://wpnews.pro/news/turn-any-web-page-into-typed-json-for-your-ai-agent-with-a-source-quote-for.jsonld"}}