HTML to JSON Smart Parser
Pricing
from $3.00 / 1,000 result parseds
HTML to JSON Smart Parser
Convert any HTML page, pasted HTML, or HTML file into clean structured JSON. Works without an API key via smart heuristics; optional AI mode for schema-driven extraction. Returns titles, headings, links, images, tables, emails, and custom fields.
Pricing
from $3.00 / 1,000 result parseds
Rating
0.0
(0)
Developer
Muhammad Afzal
Maintained by CommunityActor stats
0
Bookmarked
2
Total users
1
Monthly active users
3 days ago
Last modified
Categories
Share
HTML to JSON Smart Parser converts any HTML page, pasted HTML snippet, or HTML file into clean, structured JSON — no CSS selectors, no XPath, no API key required. Point it at a URL (or paste raw HTML) and get back a consistent JSON record with the page's title, headings, paragraphs, links, images, tables, emails, phones, meta tags, and JSON-LD structured data. Optional AI mode restructures the page into a schema you define with OpenAI.
Perfect for developers, data analysts, and AI/LLM pipelines that need HTML transformed into structured data without writing a single parser.
What is the HTML to JSON Smart Parser?
A general-purpose HTML parser that turns messy, layout-specific markup into predictable JSON. Where traditional scrapers need custom selectors for every site, this actor uses a smart heuristic engine to find the data automatically, plus an optional AI mode that uses OpenAI to extract exactly the fields you ask for.
Two engines, one actor:
- Heuristic mode (free, no API key): rule-based extraction of title, description, headings, paragraphs, links, images, tables, emails, phones, meta tags, and JSON-LD. Fast, deterministic, works out of the box.
- AI mode (bring your OpenAI key): the LLM reads the page and returns JSON matching your
fieldsToExtractlist or an exactoutputSchema— ideal for heterogenous or complex documents.
Use cases for HTML to JSON conversion
- RAG and LLM pipelines — index HTML archives and web pages as clean, token-efficient JSON for embeddings and retrieval.
- Data migration — convert legacy HTML exports, reports, and file dumps into structured database-ready records.
- Price and product monitoring — pull title, price, availability, and SKU from e-commerce pages into a spreadsheet or API.
- Lead generation — extract business pages for emails, phones, and contact details.
- Document automation — turn HTML tables and articles into JSON for downstream tools and Zapier/Make flows.
- Web scraping without code — replace hand-written parsers with one configurable extraction tool.
What data can I extract?
| Group | Fields returned |
|---|---|
| Identity | url, sourceType, title, description, canonical, favicon |
| Structure | headings[] (level + text), paragraphs[], links[] (text, href, internal), images[], tables[] (headers + rows) |
| Contact | emails[], phones[] |
| Metadata | metaTags{}, jsonLd[] (parsed JSON-LD blocks) |
| Custom | custom{} — one value per name in fieldsToExtract (e.g. price, author, availability, rating) |
| AI (optional) | extracted{} — the LLM's schema-matched JSON object |
| Audit | mode (heuristic/ai), error, scraped_at |
Example heuristic output:
{"url": "https://books.toscrape.com/catalogue/a-light-in-the-attic_1000/index.html","title": "A Light in the Attic","description": "A beautiful children's poetry book.","headings": [{ "level": "h1", "text": "A Light in the Attic" }],"paragraphs": ["It's hard to imagine a world without A Light in the Attic."],"links": [{ "text": "Home", "href": "https://books.toscrape.com/", "internal": true }],"emails": ["sales@books.toscrape.com"],"jsonLd": [{ "@type": "Product", "name": "A Light in the Attic" }],"custom": { "title": "A Light in the Attic", "price": "34.95" },"mode": "heuristic","scraped_at": "2026-08-03T12:00:00.000Z"}
How much will it cost?
This actor uses pay-per-event pricing. The heuristic engine needs no external API — the only cost is the actor itself.
| Event | Price |
|---|---|
| Actor start | $0.005 (one-time per run) |
| Result parsed | $0.003 per JSON record |
Cost examples:
- Parse 10 URLs (heuristic): ~$0.035 — one start + 10 records.
- Parse 100 URLs (heuristic): ~$0.30.
- AI mode adds OpenAI token costs billed to your own API key — you stay in control.
How to use the HTML to JSON Smart Parser
1. By URL
- In the Page URLs field, paste one or more URLs (each page becomes one JSON record).
- Optionally add a comma-separated
fieldsToExtractlist such astitle, price, availability. - Click Start.
2. By pasted HTML or HTML file
- Paste raw HTML into HTML Content (Paste), or upload files / provide download URLs in HTML File URLs.
- Run. No API key needed.
3. By AI schema (advanced)
- Set
modetoai(or just add your OpenAI key — auto mode picks it up). - Provide
fieldsToExtractand/or anoutputSchemasuch as{"title":"string","price":"number","inStock":"boolean"}. - Run — each page comes back as an
extractedobject matching your schema.
Input
{"startUrls": [{ "url": "https://books.toscrape.com/catalogue/a-light-in-the-attic_1000/index.html" }],"fieldsToExtract": "title, price, availability","mode": "heuristic","maxResults": 100}
Output
Each source produces one JSON record in the actor's default dataset: identity fields, structural arrays (headings, paragraphs, links, images, tables), contact fields (emails, phones), metadata (metaTags, jsonLd), your custom fields, and — in AI mode — the extracted schema result. Export as JSON, CSV, XML, or Excel, or read it via the Apify API.
Scrape data with dedicated actors
Need structured data from a specific platform? Try these focused extractors:
- AI Web Scraper — Structured Data Extraction
- Google Maps Scraper
- Google News Scraper
- Google Scholar Scraper
- Google Shopping Scraper
- Domain Scraper
- Craigslist Scraper
- Ebay Scraper
FAQ
How many results can I parse in one run?
You can parse up to 10,000 sources per run (each URL, pasted HTML block, or file = one record). Control cost with maxResults.
Can I integrate this with other apps?
Yes. Export results as JSON/CSV/Excel, schedule recurring runs, and connect to Zapier, Make, or your own system via the Apify API.
Can I use this through an MCP server?
Yes — the actor is MCP-optimized and works with the Apify MCP server in Claude, ChatGPT, Cursor, and other AI agents. Agents can discover it, pass URLs, and receive clean JSON.
Do I need an OpenAI API key?
Only for AI mode. The heuristic engine runs fully free with no external API key. If you provide a key, mode: auto upgrades extraction to AI automatically.
Is it legal to scrape this data?
Web scraping legality depends on the target site's terms of service and your jurisdiction. This tool only fetches and parses pages you point it at — you are responsible for respecting a site's ToS, robots.txt, and applicable laws. See Apify's legal guidance for details.
Your feedback
Found a site that parses poorly, or want a new extraction feature? Open an issue or leave a review — it directly shapes the roadmap.