The problem
Some information only appears after someone presses a button or opens a panel. A regular page fetch can miss it even though a person can reveal it in the browser.
How NativePort helps
NativePort uses Crawlbase’s browser rendering to click a chosen control before returning the page. Your agent can then read the section that appears after that interaction.
For example, it can open a product’s details panel and retrieve the text inside. The agent needs to identify the correct control and confirm that the expected content actually appeared.
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/interact-before-extracting/ 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.
Install beautifulsoup4. Set TARGET_URL, CLICK_SELECTOR and CONTENT_SELECTOR to a public page, a known button and the section it reveals. The Crawlbase JavaScript parameters include css_click_selector and page_wait. Use this for a read-only reveal interaction, not a purchase or form submission.
import os
import requests
from bs4 import BeautifulSoup
response = requests.get("https://api.nativeport.ai/crawlbase/js",
headers={"Authorization": f"Bearer {os.environ['NATIVEPORT_API_KEY']}"},
params={"url": os.environ["TARGET_URL"],
"css_click_selector": os.environ["CLICK_SELECTOR"], "page_wait": 2000}, timeout=120)
response.raise_for_status()
for name in ("cb_status", "pc_status", "original_status"):
status = response.headers.get(name)
if status and not 200 <= int(status) < 300:
raise RuntimeError(f"Page interaction failed: {name}={status}")
section = BeautifulSoup(response.text, "html.parser").select_one(os.environ["CONTENT_SELECTOR"])
if section is None or not section.get_text(" ", strip=True):
raise RuntimeError("Expected content missing after the click")
print(section.get_text("\n", strip=True))Check that the extracted section contains the intended content rather than a placeholder. A fixed wait cannot guarantee completion on every website. For interactions that need conditional waits, multiple decisions or visual inspection, use the browser-session guide instead.
Tool costs
| Tool used in the example | Price per call |
|---|---|
| Crawlbase JavaScript — one fetch with a click and wait | $0.01055 / call |
The example makes one JavaScript-rendered Crawlbase request at the displayed rate. It does not enable scrolling or repeat the request. A missing target or a failed page load must not be described as a free attempt.
Prices in USD. Usage-based tools have no fixed per-call price. View pricing.