Providers
SerpAPI
SerpAPI's Google endpoints for classic SERP results and Google Lens for reverse image search.
- env var
- SERPAPI_API_KEY
- auth
- query parameter
- operations
- search · image
- results
- 10
Address it
import { create, searchByImage } from "@agntn/web";
const serpapi = create("serpapi"); // SERPAPI_API_KEY
const results = await serpapi.search("query", { maxResults: 10 });
const matches = await searchByImage("https://example.com/image.jpg", { provider: "serpapi" });
The key is a query parameter on serpapi.com.
What it reads
| Call | Endpoint |
|---|---|
search | GET /search?engine=google&q=…&num=…&start=… |
searchByImage | GET /search?engine=google_lens&url=… |
What comes back
Search: publishedDate, image (thumbnail), favicon and metadata.{position, source, displayedLink}. No filters. Paging through start. Image matches carry pageUrl, imageUrl, dimensions, source, position and exactMatch.
Gotchas
- The only built-in reverse image provider. Everything under Reverse image search applies.
- 100 searches a month on the free plan. A burst answers 429 fast.
maxResultsfor image matches is applied on our side to whatever Lens returns.
Where it lives
src/providers/serpapi.ts.