The problem
An app name can refer to several Android listings, and store descriptions change as apps evolve. An agent cannot reliably identify the current listing or its rating from memory. Downloading the store page also leaves it with presentation markup rather than clearly labeled app information.
How NativePort helps
NativePort connects your agent to SerpApi’s Google Play product lookup. Give it the Android package ID and the market to inspect. It returns the listing as structured data, ready for the agent to review alongside another app or a previous snapshot.
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 GOOGLE_PLAY_APP_ID to the value after id= in the app’s Google Play URL, such as com.google.android.youtube. This example reads the US listing in English through the Google Play Product 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": "google_play_product", "store": "apps",
"product_id": os.environ["GOOGLE_PLAY_APP_ID"],
"gl": "us", "hl": "en"},
timeout=120,
)
response.raise_for_status()
result = response.json()
if result.get("error"):
raise RuntimeError(result["error"])
if not result.get("product_info"):
raise RuntimeError("No app listing returned for this ID and market")
print(json.dumps(result, indent=2, ensure_ascii=False))Keep the package ID and country with each record so the agent does not mix similarly named apps or different markets. The output describes the public store listing; it does not provide the developer’s private analytics. Review samples included in a listing are not a complete review history. Use the App Store guide for the iOS counterpart.
Tool costs
| Tool used in the example | Price per call |
|---|---|
| SerpApi — Google Play app lookup | $0.026375 / call |
Prices in USD. Usage-based tools have no fixed per-call price. View pricing.
Let your agent build it
You don’t need to write this code yourself. Copy this page’s link and paste it into your agent. Ask it to follow the guide and implement the feature for you.