Scrape Google Search results
import { Stophy } from "stophy";
const stophy = new Stophy({ apiKey: process.env.STOPHY_API_KEY });
const result = await stophy.google.search({ query: "best project management software" });
console.log(result.data.results);
from stophy import Stophy
stophy = Stophy() # reads STOPHY_API_KEY
result = stophy.google.search(query="best project management software")
print(result["data"]["results"])
curl -X POST https://api.stophy.dev/v1/google/search \
-H "Authorization: Bearer $STOPHY_API_KEY" \
-H "content-type: application/json" \
-d '{"query":"best project management software"}'
stophy google search "best project management software"
{
"success": true,
"data": {
"results": [
{
"url": "https://bun.com/",
"title": "Bun — A fast all-in-one JavaScript runtime",
"description": "Bun is a fast JavaScript runtime & toolkit. All in one. Runtime, package manager, test runner and bundler in a single binary. Use bun install or bun test in an ...",
"position": 1
},
{
"url": "https://github.com/oven-sh/bun",
"title": "oven-sh/bun: Incredibly fast JavaScript runtime, bundler ...",
"description": "At its core is the Bun runtime, a fast JavaScript runtime designed as a drop-in replacement for Node.js. It's written in Rust and powered by JavaScriptCore ...",
"position": 2
}
]
},
"creditsUsed": 0,
"requestId": "44eea069-e571-4dd8-95b4-cd56e641701a"
}
Endpoints
| Endpoint | Cost |
|---|---|
| Scrape Google Search results | From 1 credit (no key needed) |
| Scrape Google News results and headlines | 1 credit (no key needed) |
| Scrape Google Images results | From 1 credit |
| Scrape Google Scholar search results | 1 credit |
| Scrape Google Patents search results | 1 credit (no key needed) |
| Scrape Google AI Mode answers with their sources | 2 credits |
| Scrape Google search suggestions | 1 credit (no key needed) |
| Scrape Google Trends related searches | 1 credit |
| Scrape what is trending on Google now | 1 credit |
| Scrape Google Trends interest over time | 1 credit |
| Scrape Google Trends interest by region | 1 credit |
More ways to call it
Scrape Google News results and headlines
import { Stophy } from "stophy";
const stophy = new Stophy({ apiKey: process.env.STOPHY_API_KEY });
const result = await stophy.google.news({ query: "nvidia" });
console.log(result.data.results);
from stophy import Stophy
stophy = Stophy() # reads STOPHY_API_KEY
result = stophy.google.news(query="nvidia")
print(result["data"]["results"])
curl -X POST https://api.stophy.dev/v1/google/news \
-H "Authorization: Bearer $STOPHY_API_KEY" \
-H "content-type: application/json" \
-d '{"query":"nvidia"}'
stophy google news nvidia
Scrape Google Scholar search results
import { Stophy } from "stophy";
const stophy = new Stophy({ apiKey: process.env.STOPHY_API_KEY });
const result = await stophy.google.scholar({ query: "malaria vaccine efficacy" });
console.log(result.data.results);
from stophy import Stophy
stophy = Stophy() # reads STOPHY_API_KEY
result = stophy.google.scholar(query="malaria vaccine efficacy")
print(result["data"]["results"])
curl -X POST https://api.stophy.dev/v1/google/scholar \
-H "Authorization: Bearer $STOPHY_API_KEY" \
-H "content-type: application/json" \
-d '{"query":"malaria vaccine efficacy"}'
stophy google scholar "malaria vaccine efficacy"
Google search, News, suggestions and Patents work without a key, for the first page only. Google AI Mode costs 2 credits and Google Images costs 1 credit per 10 images. Turn on
scrapeResults in Google search to read the top pages in the same call. Every other endpoint costs 1 credit.