The problem
Simply opening Yelp may not give your agent the business details and reviews it needs. It must find the right location and then collect that location’s feedback. A business name can match several branches, and a star rating alone does not explain customers’ experiences.
How NativePort helps
NativePort connects to Yelp through SerpApi to find businesses and gather their available reviews. Your agent can use the business details to check the location before summarizing customer feedback. Tell your agent the business name and location, then ask what people say about it.
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-yelp-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 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 YELP_QUERY to a business name or category and YELP_LOCATION to a city or address. Run this Yelp search to inspect matching listings.
import json
import os
import requests
BASE = "https://api.nativeport.ai"
HEADERS = {"Authorization": f"Bearer {os.environ['NATIVEPORT_API_KEY']}"}
response = requests.get(
BASE + "/serpapi",
headers=HEADERS,
params={"engine": "yelp", "find_desc": os.environ["YELP_QUERY"],
"find_loc": os.environ["YELP_LOCATION"]},
timeout=120,
)
response.raise_for_status()
result = response.json()
if result.get("error"):
raise RuntimeError(result["error"])
businesses = result.get("organic_results", [])
print(json.dumps(businesses, indent=2, ensure_ascii=False))Choose the intended business by name and address. Set YELP_PLACE_ID to its opaque place_id from the search response, not the readable URL slug. This second request retrieves up to ten reviews using the Yelp Reviews engine.
import json
import os
import requests
BASE = "https://api.nativeport.ai"
HEADERS = {"Authorization": f"Bearer {os.environ['NATIVEPORT_API_KEY']}"}
response = requests.get(
BASE + "/serpapi",
headers=HEADERS,
params={"engine": "yelp_reviews", "place_id": os.environ["YELP_PLACE_ID"],
"sortby": "date_desc", "num": 10},
timeout=120,
)
response.raise_for_status()
result = response.json()
if result.get("error"):
raise RuntimeError(result["error"])
reviews = result.get("reviews", [])
print(json.dumps(reviews, indent=2, ensure_ascii=False))The complete example makes two calls, listed separately below. If you already have the correct place ID, only the review lookup is needed. Keep the business ID and review dates with the output. A single page of reviews is a sample; collecting another page requires another request.
Tool costs
| Tool used in the example | Price per call |
|---|---|
| SerpApi — Yelp business search | $0.026375 / call |
| SerpApi — Yelp reviews lookup | $0.026375 / call |
Prices in USD. Usage-based tools have no fixed per-call price. View pricing.