Skip to content

Instantly share code, notes, and snippets.

@hilmanski
Created September 29, 2025 02:57
Show Gist options
  • Select an option

  • Save hilmanski/6bd7f2de6b75d5b4ca0afdd4dcbfe1c4 to your computer and use it in GitHub Desktop.

Select an option

Save hilmanski/6bd7f2de6b75d5b4ca0afdd4dcbfe1c4 to your computer and use it in GitHub Desktop.
base template for SerpApi Python
import json
import requests
import os
SERPAPI_API_KEY = os.getenv("SERPAPI_API_KEY")
params = {
"api_key": SERPAPI_API_KEY, #or replace with the actual API Key
# soon...
}
search = requests.get("https://serpapi.com/search", params=params)
response = search.json()
print(json.dumps(response, indent=2))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment