NativePort
← All use cases

Extract structured information from webpages

Give your agent ready-to-read fields from webpages supported by ZenRows automatic extraction.

The problem

A webpage can contain the information your agent needs without presenting it in a clear set of fields. Separating the useful facts from menus, banners and page layout often requires extra work that breaks when the website changes.

How NativePort helps

NativePort connects your agent to ZenRows, which can return named fields from websites supported by its automatic extraction feature. Your agent can use those fields to organize or compare records without first writing a custom reader for that page.

For example, it can retrieve the available product fields from a supported listing and keep them with the original page link. Coverage varies by website, so your agent checks compatibility first.

Let your agent build it

You don’t need to write this code yourself. Copy the prompt and paste it into your agent. It will follow NativePort’s setup guide, help you use an existing account or create one, read this page, and ask what you’d like to do next.

View prompt
Help me use NativePort for this use case.

1. Read https://nativeport.ai/SKILL.md and follow its instructions to learn how to use NativePort. Save or update the skill if your environment supports it.

2. Check whether I already have a working NativePort connection or account. Reuse it if available. Otherwise, help me sign in or create an account by following the skill's setup instructions. Guide me through any steps that require me to use a browser, then help connect my agent. Keep credentials private.

3. Follow the skill to learn how to find the right tools, check their prices and instructions, and use them through NativePort.

4. Read this entire use-case page, including the instructions for agents inside the accordion: https://nativeport.ai/use-cases/extract-structured-web-data/

Once setup is complete and you have read the page, briefly explain what you can help me do and ask me what I would like to do next. Wait for my answer before implementing the example or running paid tools.
Instructions for the agents - You don't need to read this

Technical implementation

Use Python 3. Install requests with python -m pip install requests and set NATIVEPORT_API_KEY to your NativePort key in your server environment. Keep the key out of browser code.

Set TARGET_URL to a page on a domain prepared for ZenRows Extract, such as its documented demo at https://www.scrapingcourse.com/ecommerce/. The current extract=auto option works through the same /zenrows query-parameter route. Extract is in beta; confirm coverage before choosing a target. The older autoparse option is deprecated and can return unrelated embedded page data.

python
import json
import os
from pathlib import Path
import requests

url = os.environ["TARGET_URL"]
response = requests.get("https://api.nativeport.ai/zenrows",
    headers={"Authorization": f"Bearer {os.environ['NATIVEPORT_API_KEY']}"},
    params={"url": url, "extract": "auto"}, timeout=120)
response.raise_for_status()
try:
    result = response.json()
except ValueError as error:
    raise RuntimeError("Expected extracted JSON; verify Extract support for this page") from error
fields = result.get("parsed") if isinstance(result, dict) else None
if not isinstance(fields, (dict, list)) or not fields:
    raise RuntimeError("No structured fields returned; inspect the target and its support")
record = {"source_url": url, "extracted": fields}
Path("extracted-page.json").write_text(json.dumps(record, indent=2), encoding="utf-8")
print(json.dumps(record, indent=2))

Inspect the actual field names and validate the fields needed by the next step. A JSON response alone does not prove extraction succeeded or that all requested facts exist. For unsupported pages, use explicit selectors or a different extraction tool; do not silently label raw HTML as structured data.

Tool costs

Tool used in the examplePrice per call
ZenRows — one supported page with automatic extraction Priced from ZenRows's reported cost for the request or run (usage-based)

The example makes one request with automatic extraction enabled. The price comes from ZenRows’ reported request cost and may change with the target and options. It does not include a separate AI-model call.

Prices in USD. Usage-based tools have no fixed per-call price. View pricing.