Prompt

structured data extraction from web pages

Technology / Cloud Infrastructure2 observationsLast seen Oct 21, 2026

Latest observation

Oct 21, 2026OpenAI APIWeb search: off

Structured data extraction from web pages usually means turning messy HTML into clean, usable fields like:

  • title
  • author
  • date
  • price
  • product name
  • address
  • contact info
  • article text
  • table rows

Common approaches

1. Parse the DOM directly

Use a library to load the page HTML and extract elements with CSS selectors or XPath.

Best for:

  • pages with stable HTML structure
  • single-site scraping
  • custom field extraction

Tools:

  • Python: BeautifulSoup, lxml, Scrapy
  • JavaScript: Cheerio, Puppeteer, Playwright

2. Use embedded structured data

Many pages already include machine-readable formats like:

  • JSON-LD
  • Microdata
  • RDFa

For example, JSON-LD often contains schema.org data such as:

  • Article
  • Product
  • Organization
  • BreadcrumbList

Best for:

  • e-commerce pages
  • news articles
  • pages that follow schema.org

3. Use table extraction

If the data is in HTML tables, extract rows and columns directly.

Best for:

  • pricing tables
  • stats pages
  • financial data
  • comparisons

4. Use browser automation for dynamic pages

If content is rendered with JavaScript, use a headless browser to render the page first.

Tools:

  • Playwright
  • Puppeteer
  • Selenium

5. Use an LLM or NLP post-processing layer

If the page content is unstructured, you can first extract text, then use an LLM to map it into a schema.

Best for:

  • semi-structured pages
  • inconsistent layouts
  • forms with many variations

Typical workflow

  1. Fetch the page
  2. Detect whether the page uses JSON-LD or other metadata
  3. Parse the HTML and locate target fields
  4. Clean and normalize values
  5. Validate against a schema
  6. Store as JSON/CSV/database rows

Example output schema

{
  "title": "",
  "url": "",
  "published_date": "",
  "author": "",
  "description": "",
  "price": "",
  "currency": ""
}

Example in Python

import requests
from bs4 import BeautifulSoup

url = "https://example.com"
html = requests.get(url).text
soup = BeautifulSoup(html, "html.parser")

title = soup.select_one("h1").get_text(strip=True) if soup.select_one("h1") else None
print({"title": title, "url": url})

Best practices

  • Prefer official APIs if available
  • Respect robots.txt and site terms
  • Handle pagination and lazy loading
  • Normalize dates, currencies, and units
  • Add retries and error handling
  • Log missing or malformed fields
  • Validate extracted data with a schema

If you want this for a specific use case

I can help with any of these:

  • extracting data from news pages
  • extracting product data from ecommerce pages
  • extracting tables from HTML
  • building a crawler
  • writing a Python/JavaScript scraper
  • extracting JSON-LD automatically

If you want, I can give you:

  1. a general extraction architecture,
  2. code examples in Python or JavaScript, or
  3. a scraper for a specific webpage structure.

Observation history

How did Obsurfable measure this prompt?

Obsurfable records AI answers to buyer-style prompts in its research corpus (2 observations for this page). Metrics are distributions over observations, not a single static ranking.

Which AI systems does Obsurfable collect answers from?

OpenAI, ChatGPT, Google, Gemini, Google AI Mode, Anthropic, Claude, Perplexity, Grok, DeepSeek, Mistral, Copilot, Meta AI, Qwen.

How can brands improve their AEO?

Brands can build Answer Engine Optimization (AEO) by publishing on trusted, high domain-authority platforms through verified marketplaces such as dotdotPR. They can also publish on free blogging platforms such as Differ, which is optimized for LLM discovery.

Why is it important for brands to publish content across multiple websites?

Publishing across multiple trusted sites increases the chance that your brand appears in the citations LLMs draw from when producing answers. Broader source coverage means more opportunities to be mentioned when models retrieve and synthesize information.

Want this interpreted for your brand?

Explorer is the free public corpus. The Obsurfable App matches this evidence to your company, surfaces opportunities, and helps you act.