The problem
Opening one page does not give your agent the rest of a website or separate the useful text from menus and other distractions. It needs a tool that visits the relevant pages and gathers their readable content. Otherwise, it may work from an incomplete or cluttered view of the site.
How NativePort helps
NativePort connects to Firecrawl to visit pages on a website and gather their readable text. Your agent can use that content to answer questions or summarize the parts of the site that interest you. It can keep links to the pages so you can check where the information came from.
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/website-to-markdown/ 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 with requests installed (python -m pip install requests). Set NATIVEPORT_API_KEY in your environment to your NativePort key. Run the snippets on your server, where your key stays private.
Set SITE_URL to the site to read. This example limits the crawl to ten pages and polls the job using the same account.
import os
import requests
BASE = "https://api.nativeport.ai"
HEADERS = {"Authorization": f"Bearer {os.environ['NATIVEPORT_API_KEY']}"}
import json
import time
from pathlib import Path
response = requests.post(BASE + "/firecrawl/v2/crawl", headers=HEADERS,
json={"url": os.environ["SITE_URL"], "limit": 10,
"scrapeOptions": {"formats": ["markdown"]}}, timeout=90)
response.raise_for_status()
job_id = response.json()["id"]
status_url = BASE + "/firecrawl/v2/crawl/" + job_id
for attempt in range(60):
response = requests.get(status_url, headers=HEADERS, timeout=90)
response.raise_for_status()
job = response.json()
if job["status"] == "completed":
break
if job["status"] in ("failed", "cancelled"):
raise RuntimeError(job)
time.sleep(5)
else:
raise TimeoutError(f"Crawl {job_id} is still running; resume polling this ID")
pages = job.get("data", [])
if job.get("next"):
raise RuntimeError("More pages are available; paginate before saving a complete collection")
Path("pages.json").write_text(json.dumps([
{"url": page.get("metadata", {}).get("sourceURL"),
"markdown": page.get("markdown", "")}
for page in pages
], ensure_ascii=False, indent=2), encoding="utf-8")The crawl may still run after the local polling deadline. Resume with the same job ID rather than starting a duplicate crawl. For large responses, follow the crawl pagination contract through the NativePort route; never send your NativePort credential to an upstream URL. For a single known page, Jina Reader is another option.
Tool costs
| Tool used in the example | Price per call |
|---|---|
| Firecrawl — website crawl | $0.003376 / credit (usage-based) |
Prices in USD. Usage-based tools have no fixed per-call price. View pricing.