AI Structured Data Extractor: URL to JSON avatar

AI Structured Data Extractor: URL to JSON

Pricing

from $4.00 / 1,000 page extracteds

Go to Apify Store
AI Structured Data Extractor: URL to JSON

AI Structured Data Extractor: URL to JSON

Turn web pages or text into structured JSON without selectors. Give URLs and the fields you want, a JSON Schema or a sentence. Get one validated row per page, or a list from listing pages. Numbers as numbers, missing as null. About $0.005 per page all in.

Pricing

from $4.00 / 1,000 page extracteds

Rating

0.0

(0)

Developer

Elio Saliba

Elio Saliba

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

a day ago

Last modified

Categories

Features

Limited permissions

Share

Give it page URLs, or text you already have, and say what you want out of them. You get one JSON row per page: typed values, checked against your schema, with every field marked as found on the page, inferred, or missing.

You say what you want in one of three ways: a field list ("title, price as a number, in stock yes or no"), a JSON Schema, or a plain sentence. For category pages and directories, switch to list mode and get an array of records from one page.

$0.004 per page, plus the AI model's cost, about $0.005 in all. A page that cannot be read, or whose JSON stays invalid after one retry, costs nothing.

Who it is for

  • People who would otherwise write a Cheerio or Playwright scraper for each site.
  • AI agent builders who need "URL in, JSON out" as one tool call.
  • Sales-ops and research teams that pull the same fields from 200 similar pages: pricing pages, job posts, product specs, company pages.
  • Anyone with markdown, text or HTML from another Actor who wants it as rows.

How it works

  1. It checks the site's robots.txt. A page that robots.txt disallows is skipped.
  2. It fetches the page with a plain HTTP request, removes navigation, footers and banners, and turns the main content into text with tables kept.
  3. It cuts the text to your page size limit (6,000 tokens by default) and sends it to the model with your schema.
  4. It checks the answer against the schema. If the JSON is broken or the types are wrong, it asks once more, quoting what was wrong.
  5. It compares each value with the page text. A value that appears on the page is found. A value the model produced from the page but that is not written there (a date it reformatted, a yes/no) is inferred. A value the page does not state is null and missing.

Everything runs through Apify's AI proxy. You do not need an OpenAI or Google key.

Use it from an AI agent

In Claude, ChatGPT or Cursor, add the Apify MCP server (https://mcp.apify.com) and ask the agent to run this Actor. It takes URLs plus fields (a list like price: number), a schema, or instructions in plain English, so the agent can fill it from your sentence.

Example prompt: "Use the Apify Actor opstoolkit/ai-structured-extractor on these 5 product page URLs and return title, price as a number and whether it is in stock."

Input

FieldWhat it does
urlsPages to read.
textsText or HTML you already have, one entry per page. Nothing is fetched.
datasetId and fieldRead the text from an Apify dataset, for example the output of Website to Markdown. A url field in the row is copied to the output.
fieldsOne per line: name or name: type. Types: string, number, integer, boolean, date, url, email, list. Add a hint after a dash: price: number - price in GBP.
schemaA JSON Schema, for nested objects, enums and descriptions. Wins over fields.
instructionsPlain English. With no fields and no schema, the model picks the keys from this text.
modesingle (one record per page, the default) or list (an items array per page).
modelGPT-4.1 nano (default), Gemini 3.1 Flash-Lite or GPT-5 mini. customModel takes any other OpenRouter model ID that Apify's proxy allows.
maxTokensPerPageLonger pages are cut here. Default 6,000.
maxPagesUpper limit for pages read in one run. Default 100.
{
"urls": [{ "url": "https://books.toscrape.com/catalogue/a-light-in-the-attic_1000/index.html" }],
"fields": ["title", "price: number - price in GBP", "in_stock: boolean", "upc"]
}

With a JSON Schema and list mode:

{
"urls": [{ "url": "https://books.toscrape.com/catalogue/category/books/poetry_23/index.html" }],
"mode": "list",
"schema": {
"type": "object",
"properties": {
"title": { "type": "string" },
"price": { "type": "number", "description": "Price in GBP" },
"detail_url": { "type": "string" }
},
"required": ["title", "price"]
}
}

A field the page does not state comes back as null. That means required in your schema means "the key is there", not "the page must have it", so a missing value never makes the whole row fail.

Output

One row per page.

{
"url": "https://books.toscrape.com/catalogue/a-light-in-the-attic_1000/index.html",
"status": "ok",
"data": {
"title": "A Light in the Attic",
"price": 51.77,
"in_stock": true,
"upc": "a897fe39b1053632"
},
"fieldStatus": { "title": "found", "price": "found", "in_stock": "inferred", "upc": "found" },
"valid": true,
"reason": null,
"model": "openai/gpt-4.1-nano",
"tokensIn": 1150,
"tokensOut": 38,
"charged": "item-extracted"
}
ColumnNotes
statusok, or the reason the page gave nothing: see below.
dataThe record, or null. In list mode the rows have items and itemCount instead, and fieldStatus counts found, inferred and missing per field.
fieldStatusfound, inferred or missing for each field. Check inferred values before you rely on them.
validThe answer passed your schema.
reasonA note: which fields were missing, that the page was cut, that a list may be incomplete.
tokensIn, tokensOut, aiCostUsd, aiCallsWhat the model used for this page, including the retry.
chargedThe event charged for this row, or null when the row was free.

The key-value store holds a SUMMARY with counts per status, total tokens and the model cost the proxy reported.

Status values

All of these are free rows.

StatusMeaning
robots_disallowedThe site's robots.txt does not allow this page.
needs_browserThe page is built by JavaScript, so a plain fetch finds almost no text.
login_requiredThe page asks for a login.
blockedThe site refused the request (403, 429) or showed a bot check. These are not bypassed.
not_found, fetch_failed, invalid_url, unsupported_typeThe page is gone, unreachable, not a web address, or not a web page (a PDF, for example).
empty_pageThe page has almost no text.
no_matchThe model found none of your fields on the page.
invalid_outputThe model's JSON was still invalid after one retry. rawReply shows the start of it.
ai_errorThe model call failed, for example no credit left.
skipped_max_costNot run, because your max cost per run was reached.

For needs_browser pages, render them with a browser Actor, then pass the HTML in texts.

Pricing

EventPriceWhen
Item extracted$0.004One URL or HTML page that returned valid JSON with at least one field found
Text extracted$0.002One pasted text or dataset row that did the same

The AI model's cost is billed to your Apify account separately, at the model's own price, as usage of Apify's OpenRouter Actor. At the default model's list price (GPT-4.1 nano, $0.10 per million input tokens and $0.40 per million output tokens), a page at the 6,000-token limit costs about $0.0008. A typical product page is 1,500 tokens and costs about $0.0003. So a page costs about $0.005 in total on a paid plan. Free-plan accounts pay 10 times the model cost, which makes it about $0.012.

The max cost per run you set covers this Actor's charges. It does not cover the model usage. A run stops before it starts a page it cannot charge for, so you do not pay model cost for rows you would not receive.

Limits

  • It fetches plain HTML. Pages that need JavaScript, a login or a CAPTCHA come back as a free row that says so.
  • The model can get a value wrong. fieldStatus flags values that are not written on the page, and the prompt tells the model to return null instead of guessing. For anything that matters, spot check a sample.
  • If Apify's proxy refuses one of the three listed models, the run switches to the next listed one and says so in the log. A model ID you type in customModel is never swapped.
  • One answer is capped at 2,048 tokens by Apify's AI proxy. In list mode the Actor asks for the rest in follow-up calls, up to 4 more. Very long lists come back with a note that they may be incomplete.
  • Text beyond maxTokensPerPage is not read. The row says so.
  • Requests to one website are spaced at least half a second apart, and a Crawl-delay in robots.txt is respected up to 10 seconds. There are no proxies and no anti-bot measures.
  • You are responsible for having the right to process the content of the pages you give it. The Actor does not filter personal data out of pages.

Works well with

Questions or a page it gets wrong? Open an issue on the Actor page with the URL and the fields you asked for.