Search the live web
Runs a live web search through SerpAPI, returns a stored result when a fresh version exists, and durably records fresh results in the source-document store.
Authentication
AuthorizationBearer
User bearer token: Supabase or Clerk session JWT, Clerk OAuth access token, or Clerk personal API key
OR
X-API-Keystring
Admin API key for system-to-system write operations
OR
X-Client-Secretstring
Client secret for read-only service-to-service access (no writes)
Request
This endpoint expects an object.
search
Search text sent to the upstream web search provider
bypassCache
Skip cache lookup and refresh from the search provider
cacheKey
Stable lookup text for cache keying when generated search text varies between runs
language
Search language code
region
Search region code
resultLimit
Maximum number of normalized results to keep
source
Optional caller identity for source-document attribution and abuse triage. Any non-blank string up to 64 characters is accepted and persisted with the resolved request context.
Response
OK
document
Source-document ledger row backing this result
result
Normalized result items in provider rank order
search
Web search request represented by this result
Errors
400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
406
Not Acceptable Error
409
Conflict Error
415
Unsupported Media Type Error
422
Unprocessable Entity Error
429
Too Many Requests Error
500
Internal Server Error
503
Service Unavailable Error