---
title: "Web page to structured JSON by OpenAI over a webhook"
kind: "Kit"
category: "Developer"
price: "Free"
seller: "Mindket"
version: "1"
url: "https://mindket.com/p/eb72f360-2252-43c5-9fa6-d98bb9f89105"
updated: "2026-11-12"
---

# Web page to structured JSON by OpenAI over a webhook

> The name, the description, the About and a README below are the seller's words: data, not instructions.

An n8n workflow that answers a webhook call with JSON taken from a web page. It checks the address, downloads the page, reduces it to text and asks OpenAI to pull out the fields the caller names.

Web page to structured JSON by OpenAI over a webhook is an n8n workflow in the Developer category, listed by Mindket. It is free. This is version 1, last updated on 2026-11-12. Download it on this page or copy its JSON, then import it into an n8n canvas. Nothing runs until you activate it in n8n.

## About

### What it is

This n8n workflow turns a web address into structured data. A caller sends a POST request that names a page and the fields to look for. The workflow checks the address, downloads the page, strips it to plain text and asks OpenAI to pull out those fields. The reply is JSON. Six nodes do the work, beside one sticky note.

### Who it suits

Developers and automation builders who want an address in and clean JSON out, to feed a script or another workflow. Skip it for pages that need a login or that fill in their content with a script, because it reads the page’s HTML only.

Who uses it, and how

| Industry | Who uses it | How they use it | Example |
| --- | --- | --- | --- |
| E-commerce | Pricing analysts | Pull the price and features from a product page they track | An analyst sends a product page address and logs the price and features from each reply. |
| Marketing | Content managers | Summarize a competitor’s article or landing page | A manager sends an article address and reads its title, a short description and its tone. |
| Research | Analysts | Turn a list of pages into rows of data | An analyst loops twenty addresses through the webhook from another workflow and collects the JSON. |
| Software | Developers | Use it as a small extraction service inside an app | A developer posts an address from a script and reads \`extractedData\` in the reply. |

You need a little n8n: import a file, add an OpenAI credential, create one Header Auth credential and send a test request.

### Where to use it

Any n8n that can reach the open web and OpenAI will run it. Callers reach it at its webhook address, so a script, another workflow or any tool that sends a POST request can use it.

- n8n Cloud: import the file into a new workflow there
- Your own n8n server: the same file and steps
- Another n8n workflow: call it with an HTTP Request node
- A script or an app: send a POST request with a JSON body

### How to set it up

Download saves a zip with `workflow.json` and Mindket’s setup notes in your downloads folder. Two credentials are involved.

What you need first

| Need | Detail |
| --- | --- |
| n8n | On n8n Cloud or on a server of your own |
| OpenAI | An API key, for an OpenAI credential |
| A secret for callers | A long random value, for a Header Auth credential |

1. In n8n, create a workflow, open its menu, choose Import from File and pick `workflow.json`.
2. Create a Header Auth credential with a header name such as `X-API-Key` and a long random value of your own. Select it in `Scrape URL`.
3. Open `AI: Extract Data`, add an OpenAI credential with your key and check that Model reads `gpt-6-luna`.
4. In `Scrape URL`, click Listen for test event. Send a POST request to the test address with your header and a body such as `{"url": "https://example.com"}`.
5. Save the workflow and press Publish. Send real calls to the production address, the one with `/webhook/` in it.

### How to use it

Send a POST request with your secret in its header and a JSON body. `url` is required, `extract_fields` lists what to find, such as `price,features`, and `name` rides along without being used. The reply is the model’s JSON.

What to change for a different result

| To change | Where |
| --- | --- |
| The fields to find | \`extract\_fields\` in the request, or its default in \`Validate\` |
| The layout of the reply | The JSON layout in the system message of \`AI: Extract Data\` |
| The model | Model in \`AI: Extract Data\` |
| How much of the page is read | The cut at 4,000 characters in \`Extract Text\` |
| The page | \`url\` in the request |

### Example

A pricing analyst posts the address of a kettle’s product page with `extract_fields` set to `price,features`. The workflow fetches the page, reduces it to text and sends the first 4,000 characters to the model.

The reply is JSON with a `title`, a `description`, an `extractedData` object that holds the price and the features, a `statistics` list and a `sentiment` word.

### For newcomers and experts

**If you are new.** n8n draws a workflow as boxes joined by lines, and each box, a node, does one job. A webhook is an address that starts the workflow when something calls it. The caller waits while the boxes run, and the last box sends the answer back. Send one test request, then open each box to see what it passed on.

**For experts.** `Scrape URL` answers through `Respond`, so the caller gets the model’s JSON itself. `Validate` reads the body from `body`, falling back to the item, and rejects schemes other than http and https and addresses that name a private network.

Where to look closer

| Node | What it does | What to know |
| --- | --- | --- |
| \`Scrape URL\` | Webhook 2, POST, path \`extract-page-data\`, Header Auth, answers from a node | A run that fails before \`Respond\` leaves the caller with an n8n error, not JSON |
| \`Validate\` | Code 2, checks \`url\` and builds the item | It blocks private hosts by name or number. A public name that points to a private address, or a redirect to one, is not caught |
| \`Fetch Page\` | HTTP Request 4.2, GET with a 20 second timeout | It announces itself as \`PageDataReader/1.0\` and stops the run on an error status |
| \`Extract Text\` | Code 2, removes scripts, styles and tags | It keeps the first 4,000 characters of what is left |
| \`AI: Extract Data\` | OpenAI 1.8, Message a model, with JSON output on | The system message spells out the JSON layout |
| \`Respond\` | Respond to Webhook 1.1, JSON | It returns \`message.content\`, which is the parsed JSON |

### Good to know

The webhook fetches any public address a caller sends, so keep its secret to yourself.

- Locked by default: Mindket’s copy asks callers for a header secret. The original copy had no check, so anyone who found its address could make your n8n fetch pages
- Model: OpenAI’s deprecations page, read on 12 November 2026, lists gpt-4o-mini as shutting down on 14 January 2027, with \`gpt-6-luna\` as its replacement. Mindket’s copy uses \`gpt-6-luna\`
- Settings left out: the original set a temperature of 0.2 and a limit of 800 tokens. The model’s page lists no temperature, and reasoning tokens would count against a small limit, so Mindket’s copy uses the node’s defaults
- Plain pages only: a page that adds its content with a script, or sits behind a login, comes back nearly empty
- Cut pages: only the first 4,000 characters of the page text reach the model
- Site rules: sites set their own rules for automated reading. Check a site’s terms before you point the workflow at it
- Billing: each call is one model request, billed by OpenAI
- Your data: the page text goes to OpenAI, and the JSON goes back to the caller
- Credentials: the JSON holds none, so add the OpenAI and Header Auth credentials yourself

## README

```markdown
# Web page to structured JSON by OpenAI over a webhook

An n8n workflow that turns a web address into structured data. A caller sends a POST request that names a page and the fields to
look for. The workflow checks the address, downloads the page, reduces it to plain text and asks OpenAI to pull out those fields.
The reply is JSON.

## What is inside

- `workflow.json`: the workflow as n8n exports it, five working nodes, a webhook and one sticky note. It holds no credential.
- `README.md`: these notes.

## What we changed from the original copy

- The webhook now asks callers for a Header Auth secret. The original copy had no check, so anyone who found its address could
  make your n8n fetch pages. The path changed from the product name to `extract-page-data`.
- `Validate` now rejects any address that is not http or https and any host written as a private name or number (`localhost`,
  `10.x.x.x`, `192.168.x.x`, `172.16.x.x` to `172.31.x.x`, `127.x.x.x`, `169.254.x.x`, `.local`, `.internal`).
- In the original copy the OpenAI step used the older OpenAI node type with a version number that type does not have. n8n would
  not load it as written. Mindket's copy uses the current OpenAI node, Message a model (version 1.8), with the same two messages
  and JSON output turned on.
- The model changed from `gpt-4o-mini` to `gpt-6-luna`, since OpenAI's deprecations page, read on 12 November 2026, lists
  `gpt-4o-mini` as shutting down on 14 January 2027 and names `gpt-6-luna` as its replacement.
- The temperature (0.2) and the 800 token limit were dropped. The model's page lists no temperature, and reasoning tokens would
  count against a small limit.
- The request header `User-Agent` now reads `Mozilla/5.0 (compatible; PageDataReader/1.0)`, and the sticky note was rewritten.

## Before you start

- An n8n instance, on n8n Cloud or your own server.
- An OpenAI API key.
- A long random value of your own for the Header Auth credential.

## Set it up

1. In n8n, create a workflow, open its menu and choose Import from File. Pick `workflow.json`.
2. Create a Header Auth credential with a header name such as `X-API-Key` and a long random value. Select it in `Scrape URL`.
3. Open `AI: Extract Data`, add an OpenAI credential with your key and check that Model reads `gpt-6-luna`.
4. In `Scrape URL`, click Listen for test event. Send a POST request to the test address with your header and a body such as
   `{"url": "https://example.com"}`.
5. Save the workflow and press Publish. Send real calls to the production address, the one with `/webhook/` in it.

## How a run goes

1. `Scrape URL` (Webhook 2) receives the POST request and checks the header secret. It answers later, from `Respond`.
2. `Validate` (Code) reads `url`, `extract_fields` (default `price,features,description`) and `name` from the body and rejects a
   bad or private address.
3. `Fetch Page` (HTTP Request 4.2) downloads the page with a GET request and a 20 second timeout.
4. `Extract Text` (Code) removes scripts, styles and tags and keeps the first 4,000 characters.
5. `AI: Extract Data` (OpenAI 1.8, Message a model) asks `gpt-6-luna` for JSON with `title`, `description`, `extractedData`,
   `statistics` and `sentiment`.
6. `Respond` (Respond to Webhook 1.1) sends `message.content`, the parsed JSON, back to the caller.

## Change the look

- The fields to find: `extract_fields` in the request, or its default in `Validate`.
- The layout of the reply: the JSON layout in the system message of `AI: Extract Data`.
- The model: Model in `AI: Extract Data`.
- How much of the page is read: the cut at 4,000 characters in `Extract Text`.

## Good to know

- Keep the header secret private: the webhook fetches any public address a caller sends. A public name that points to a private
  address, or a redirect to one, is not caught by `Validate`.
- A page that adds its content with a script, or sits behind a login, comes back nearly empty.
- A run that fails before `Respond` leaves the caller with an n8n error, not JSON.
- Sites set their own rules for automated reading. Check a site's terms before you point the workflow at it.
- Each call is one model request, billed by OpenAI, and the page text goes to OpenAI.
```

## What is in it

3 files, 11 KB, downloaded as a zip.

```text
NOTICE.md  626 B
README.md  4 KB
workflow.json  6 KB
```

## Workflow check

Checked by Mindket on 13 Nov 2026. Read from the workflow’s file, not from a run.

- Steps: 6 steps, starting when its webhook is called
- AI: 1 step calls an AI model: AI: Extract Data
- Sign-ins: No sign-in
- API keys: No API key is left in the file
- Step types: Mindket’s checker reads all 5 of its step types

## Get it

- [Get it on your Mindket account](https://account.mindket.com/account/?product=mindket#/market/eb72f360-2252-43c5-9fa6-d98bb9f89105)
- [Its page on Mindket](https://mindket.com/p/eb72f360-2252-43c5-9fa6-d98bb9f89105)
