Providers
SerpBase
SerpBase's Google SERP endpoints, with a category that picks the web, images, news or videos endpoint.
Provider
SerpBase
- create("serpbase")
- SERPBASE_API_KEY
- Auth
- X-API-Key header
- Results
- 10, up to 20 · paged
- Free tier
- 100 searches to start
Capabilities
- Searchsearch()
- Imagenot supported
- Readnot supported
Options
- Filters
category - Fields
publishedDate, image, favicon, metadata - Category
images, image, news, videos, video
Address it
import { create } from "@agntn/web";
const serpbase = await create("serpbase"); // SERPBASE_API_KEY
const results = await serpbase.search("query", { category: "news", maxResults: 10 });
The key goes in the X-API-Key header against api.serpbase.dev.
What it reads
| Call | Endpoint |
|---|---|
search | POST to the endpoint the category picks: web by default, images/image, news, videos/video |
What comes back
publishedDate, image, favicon and metadata.{position, rank, searchType, requestId, elapsedMs, creditsCharged}. Only category is honoured. Paging works, but the next token stays unknown until a page comes back empty, SerpBase does not say when it is done.
Gotchas
maxResultsis applied on our side to the returned page, the endpoint decides the page size.- Credits are charged per request and reported in
metadata.creditsCharged. An empty balance answers HTTP 200 withstatus: 1020. That isPaymentErrorhere, so automatic search tries the next configured provider instead of stopping.
Where it lives
src/providers/serpbase.ts.