| name | serpapi-core-workflow-a |
| description | Google Search scraping with SerpApi -- organic results, knowledge graph, answer boxes.
Use when building search-powered features, SEO monitoring,
or extracting structured data from Google results.
Trigger: "serpapi google search", "scrape google", "serpapi organic results".
|
| allowed-tools | Read, Write, Edit, Bash(npm:*), Grep |
| version | 1.4.0 |
| license | MIT |
| author | Jeremy Longshore <jeremy@intentsolutions.io> |
| tags | ["saas","search","seo","serpapi"] |
| compatibility | Designed for Claude Code |
SerpApi Core Workflow A: Google Search
Overview
Extract structured data from Google Search: organic results, answer boxes, knowledge graph, related questions (PAA), local pack, ads, and shopping results. Each search costs 1 API credit.
Instructions
Step 1: Full Google Search with All Components
import serpapi, os
client = serpapi.Client(api_key=os.environ["SERPAPI_API_KEY"])
result = client.search(
engine="google",
q="best project management tools",
location="New York, New York",
hl="en", gl="us",
num=10,
)
for r in result.get("organic_results", []):
print(f"{r['position']}. {r['title']}")
print(f" URL: {r['link']}")
print(f" Snippet: {r.get('snippet', 'N/A')}")
if "rich_snippet" in r:
print(f" Rating: {r['rich_snippet'].get('top', {}).get('rating')}")
if ab := result.get("answer_box"):
print(f"\nAnswer Box ({ab.get('type', 'unknown')}):")
print()
kg := result.get():
()
()
()
paa result.get(, []):
()
()
rs result.get(, []):
()