serpapi-local-dev-loop

Featured

Configure SerpApi local development with cached responses and test fixtures. Use when building search integrations, avoiding API calls during development, or setting up reproducible test data from SerpApi. Trigger: "serpapi dev setup", "serpapi local", "test serpapi locally".

AI & Automation 2,274 stars 319 forks Updated today MIT

Install

View on GitHub

Quality Score: 99/100

Stars 20%
100
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# SerpApi Local Dev Loop ## Overview Set up local development for SerpApi with response caching, fixture recording, and offline testing. SerpApi charges per search, so caching results locally is critical for cost-effective development. ## Instructions ### Step 1: Record Real Responses as Fixtures ```python import serpapi, json, os, hashlib def record_fixture(params: dict, fixtures_dir="tests/fixtures"): """Run a real search and save the response as a fixture file.""" os.makedirs(fixtures_dir, exist_ok=True) client = serpapi.Client(api_key=os.environ["SERPAPI_API_KEY"]) result = client.search(**params) # Deterministic filename from params key = hashlib.md5(json.dumps(params, sort_keys=True).encode()).hexdigest()[:12] path = os.path.join(fixtures_dir, f"{params['engine']}_{key}.json") with open(path, "w") as f: json.dump(dict(result), f, indent=2) print(f"Recorded: {path}") # Record fixtures for common queries record_fixture({"engine": "google", "q": "python tutorial", "num": 5}) record_fixture({"engine": "youtube", "search_query": "react hooks"}) record_fixture({"engine": "bing", "q": "machine learning"}) ``` ### Step 2: Mock Client for Testing ```python import json, os class MockSerpApiClient: def __init__(self, fixtures_dir="tests/fixtures"): self.fixtures_dir = fixtures_dir def search(self, **params): key = hashlib.md5(json.dumps(params, sort_keys=True).encode()).hexdigest()[:12] path =...

Details

Author
jeremylongshore
Repository
jeremylongshore/claude-code-plugins-plus-skills
Created
7 months ago
Last Updated
today
Language
Python
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category

AI & Automation Featured

serpapi-ci-integration

Set up CI/CD for SerpApi integrations with fixture-based testing. Use when automating SerpApi tests without consuming credits, or validating search result parsing in CI. Trigger: "serpapi CI", "serpapi GitHub Actions", "serpapi automated tests".

2,274 Updated today
jeremylongshore
AI & Automation Featured

salesloft-local-dev-loop

Configure SalesLoft local development with API mocking and sandbox testing. Use when setting up a development environment, building integration tests, or creating mock SalesLoft API responses for offline development. Trigger: "salesloft dev setup", "salesloft local", "test salesloft locally".

2,274 Updated today
jeremylongshore
AI & Automation Featured

serpapi-install-auth

Install SerpApi client and configure API key authentication. Use when setting up SerpApi for search result scraping, configuring API keys, or initializing the serpapi Python/Node package. Trigger: "install serpapi", "setup serpapi", "serpapi auth", "serpapi API key".

2,274 Updated today
jeremylongshore
AI & Automation Featured

serpapi-performance-tuning

Optimize SerpApi performance with caching, async searches, and result filtering. Use when reducing latency, minimizing credit consumption, or optimizing search throughput. Trigger: "serpapi performance", "optimize serpapi", "serpapi caching", "serpapi slow".

2,274 Updated today
jeremylongshore
AI & Automation Featured

algolia-local-dev-loop

Configure Algolia local development with separate dev index, mocking, and testing. Use when setting up a development environment, configuring test workflows, or establishing a fast iteration cycle with Algolia. Trigger: "algolia dev setup", "algolia local development", "algolia dev environment", "test algolia locally".

2,274 Updated today
jeremylongshore