# Structured Data Extractor (`zinin/structured-extract`) Actor

Turn any URL into clean structured JSON — title, description, image, JSON-LD, headings, links, emails and prices — extracted deterministically via regex. Zero LLM calls, zero API keys. Built for AI agents that need one page turned into typed data, cheaply.

- **URL**: https://apify.com/zinin/structured-extract.md
- **Developed by:** [Tim Zinin](https://apify.com/zinin) (community)
- **Categories:** Developer tools, Automation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.70 / 1,000 page extracteds

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## Structured Extract — Title, Metadata, JSON-LD & Contact Data from Any URL

Point this Actor at any URL and get clean, typed JSON back — no LLM, no browser, no API
key. It fetches the page with a single HTTP request and pulls out the title, description,
image, JSON-LD, headings, links, emails and prices with a dozen lines of regex instead of
a token-burning model call.

### What you get

- **Ten fields per URL** — `title`, `description`, `image`, `siteName`, `canonical`,
  `jsonLd`, `headings`, `links`, `emails`, `prices` — pick a subset via `fields`, or leave
  it empty to get all of them.
- **`jsonLd`** — every `<script type="application/ld+json">` block on the page, parsed.
- **`emails`** — `mailto:` links and plain-text emails found anywhere on the page.
- **`prices`** — currency-formatted amounts (`$12.99`, `€10`, `£5`…) pulled straight from
  the text.
- **`links`** — every unique absolute href on the page, resolved from relative paths.
- **Deterministic, not a model call.** Regex over raw HTML — zero LLM cost, zero API key,
  same result every time.
- Runs on Apify: schedule it, monitor it, call it from the API, export to JSON/CSV/Excel
  or push straight into your own pipeline.

### Who is this for

- **AI agents and pipelines** that need "here's a URL" turned into structured data
  without burning tokens on a model call
- **Growth & content teams** pulling titles, JSON-LD or contact emails off a list of pages
  in bulk
- **Developers** who need a quick metadata/link/email scrape without standing up their own
  fetch-and-regex service

### Why it matters

AI agents and pipelines constantly need to turn "here's a URL" into structured data. Doing
that with an LLM call burns tokens and money on something a dozen lines of regex already
solve deterministically — same input, same output, every time, at compute price instead
of token price.

### How to run it

1. Click **Try for free** — no card needed on the free plan.
2. Paste your URLs into **URLs**, one per line. Optionally list specific field names in
   **Fields to extract** to skip the rest.
3. Press **Start**. Results land in the dataset — read them in the UI, pull them from the
   API, or have a webhook push them onward.

### Pricing

Pay-per-event: **$0.005 per run start + $0.002 per result**. No monthly seat, no minimum.
100 URLs cost about **$0.21**; 1,000 URLs about **$2.01**.

A URL that could not be reached — a private IP, `localhost`, or a dead domain — is still
returned, with `found: false` and the reason, and it is **not** charged for. You pay for
answers, not for attempts.

### 简体中文说明

输入任意网址，此 Actor 只用一次 HTTP 请求抓取页面，再用固定的正则表达式提取出干净的结构化 JSON——标题 `title`、描述 `description`、图片 `image`、站点名 `siteName`、canonical 链接、页面上所有 `JSON-LD` 结构化数据块、标题标签 `headings`、页面全部链接 `links`、页面上出现的邮箱地址 `emails`，以及页面文本中出现的带币种价格 `prices`。**全程不调用大模型、不加载浏览器、不需要任何密钥**——同样的输入永远得到同样的输出，成本是计算成本，不是大模型 token 成本。

可以用 `fields` 只保留需要的字段，其余字段直接跳过不计算。**这不是什么：不渲染 JavaScript，不跟随分页，也不会像大模型那样理解页面含义**——只依赖纯 HTML 抓取，靠客户端渲染才出现的内容不会被提取到，多页列表也不会自动翻页汇总。

计费为按事件付费：每次运行 $0.005，每条成功提取的结果 $0.002。100 个网址约 $0.21，1000 个约 $2.01；无法访问的网址（私有 IP、`localhost`、域名失效等）会以 `found: false` 返回原因，**不计费**——只为拿到答案付费，不为尝试付费。

### Input

| Field | Required | What it does |
|---|---|---|
| `urls` | yes | URLs to extract from. Up to 100 per run. |
| `fields` | no | Subset to return: `title`, `description`, `image`, `siteName`, `canonical`, `jsonLd`, `headings`, `links`, `emails`, `prices`. Empty = all of them. |
| `maxConcurrency` | no | How many to process in parallel, 1–30 (default 10). |

```json
{
    "urls": ["https://example.com", "https://www.iana.org/help/example-domains"],
    "fields": [],
    "maxConcurrency": 10
}
```

### Output

One row per URL. This is a real row from a real run; `links` is trimmed to 5 of the 26 it
actually returns:

```json
{
    "url": "https://www.iana.org/help/example-domains",
    "found": true,
    "httpStatus": 200,
    "title": "Example Domains",
    "description": null,
    "image": null,
    "siteName": null,
    "canonical": null,
    "jsonLd": [],
    "headings": ["Example Domains", "Further Reading"],
    "links": [
        "https://www.iana.org/",
        "https://www.iana.org/domains",
        "https://www.iana.org/protocols",
        "https://www.iana.org/numbers",
        "https://www.iana.org/about",
        "…"
    ],
    "emails": [],
    "prices": [],
    "summary": "https://www.iana.org/help/example-domains — title: 'Example Domains', 0 JSON-LD blocks, 26 links, 0 emails.",
    "checkedAt": "2026-07-26T13:28:42.587Z"
}
```

| Field | What it means |
|---|---|
| `jsonLd` | Every JSON-LD block on the page, already parsed |
| `headings` | First H1/H2 text on the page |
| `links` | Unique absolute hrefs |
| `emails` | `mailto:` links and plain-text emails found on the page |
| `prices` | Currency-formatted amounts found on the page |
| `found` | `false` means the URL was unreachable; the row says why and is not billed |

### API

Start a run with a bearer token and explicit JSON input:

```bash
curl -sS -X POST 'https://api.apify.com/v2/acts/zinin~structured-extract/runs?waitForFinish=60' \
  -H "Authorization: Bearer $APIFY_TOKEN" \
  -H 'Content-Type: application/json' \
  --data '{"urls":["https://example.com","https://www.iana.org/help/example-domains"],"fields":[],"maxConcurrency":10}'
```

Read Dataset rows using the returned `defaultDatasetId`:

```bash
curl -sS "https://api.apify.com/v2/datasets/$DEFAULT_DATASET_ID/items?clean=true&format=json" \
  -H "Authorization: Bearer $APIFY_TOKEN"
```

### MCP

For an Apify MCP client exposing the standard `call-actor` tool, send this exact payload:

```json
{
  "name": "call-actor",
  "arguments": {
    "actor": "zinin/structured-extract",
    "input": {
      "urls": [
        "https://example.com",
        "https://www.iana.org/help/example-domains"
      ],
      "fields": [],
      "maxConcurrency": 10
    }
  }
}
```

#### Related tools

Related tools for adjacent workflows in B2B lead generation and data enrichment, data pipelines for AI applications.

| Actor | What it does |
|---|---|
| [URL to Markdown Converter](https://apify.com/zinin/url-to-markdown) | Pair it in the data pipelines for AI applications workflow: Fetch any URL and convert it into clean, LLM-ready Markdown — headings, links, lists and emphasis... |
| [Live Price Oracle](https://apify.com/zinin/live-price-oracle) | Pair it in the data pipelines for AI applications workflow: Current USD price for any token by contract address or ticker: 24h change, liquidity, volume, best DEX pair |
| [Company Profile Lookup](https://apify.com/zinin/company-lookup) | Pair it in the B2B lead generation and data enrichment workflow: Turn a domain or company name into one unified company card: website tech stack (CMS, ecommerce, key tech)... |
| [Company Registry Enricher](https://apify.com/zinin/company-registry-enricher) | Pair it in the B2B lead generation and data enrichment workflow: Turn a company name, LEI or UK company number into an official registry card: legal name, status,... |
| [Intent Signal Aggregator](https://apify.com/zinin/intent-signal-aggregator) | Pair it in the B2B lead generation and data enrichment workflow: Is this company in-market right now? Combines public hiring activity (Greenhouse, Lever, Ashby) and recent... |

### FAQ

**Does it need an API key or login?** No.

**Does it run JavaScript or render the page?** No — pure HTML fetch plus regex. Content
that only appears after client-side rendering won't be captured.

**Can I get only some fields?** Yes — list the ones you want in `fields`; the rest are
skipped and not computed.

**Can I call it from an AI agent?** Yes — standard Apify Actor, callable from the Apify
API, the SDK, or the Apify MCP server. That's the point.

**What this is NOT.** It does not render JavaScript, follow pagination, or understand page
meaning the way an LLM does. It is a fast, deterministic extractor for the structured
signals that already sit in a page's HTML.

Found a wrong result, or need a field we don't extract? Open an issue on this Actor's
page.

### Machine use

The Actor is callable through the Apify API, SDK, and Apify MCP server. The input and Dataset row are the machine-facing contract; every field is pulled from the page's own HTML via regex, not inferred by a model — a field with no public trace on the page comes back empty rather than guessed.

***

Built by [zinin](https://apify.com/zinin). Questions? Telegram [@timzinin](https://t.me/timzinin).

# Actor input Schema

## `urls` (type: `array`):

List of URLs to extract structured data from. One row per URL.

## `fields` (type: `array`):

Optional subset of fields to return: title, description, image, siteName, canonical, jsonLd, headings, links, emails, prices. Leave empty to extract all of them.

## `maxConcurrency` (type: `integer`):

How many URLs to process in parallel.

## Actor input object example

```json
{
  "urls": [
    "https://example.com",
    "https://www.iana.org/help/example-domains"
  ],
  "fields": [],
  "maxConcurrency": 10
}
```

# Actor output Schema

## `results` (type: `string`):

API URL for the default dataset items produced by this run.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "urls": [
        "https://example.com",
        "https://www.iana.org/help/example-domains"
    ],
    "fields": []
};

// Run the Actor and wait for it to finish
const run = await client.actor("zinin/structured-extract").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "urls": [
        "https://example.com",
        "https://www.iana.org/help/example-domains",
    ],
    "fields": [],
}

# Run the Actor and wait for it to finish
run = client.actor("zinin/structured-extract").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "urls": [
    "https://example.com",
    "https://www.iana.org/help/example-domains"
  ],
  "fields": []
}' |
apify call zinin/structured-extract --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=zinin/structured-extract",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/Arqpxuec92WnoF5Ha/builds/Ox9zYC6gNfJsXYdgT/openapi.json
