Setup
Put them in your environment or
.env; Data APIs covers the other ways.
Notes
- Request and response fields are PascalCase (Query, Count, Result.WebResults…).
- Postpaid credits at $0.006 each: Flux search 1 credit ($0.006) per request, Omnira search half a credit ($0.003), Fetch a sixth ($0.001).
- Errors come back in ResponseMetadata.Error with numeric codes: 700901 invalid key, 700429 QPS exceeded, 10403 service not enabled or free quota exhausted, 10400 bad parameter.
- All three calls are reads over POST.
Endpoints
Search the web (Flux)
- Read over POST. 1 credit ($0.006) per request; 30-second timeout.
Search the web or images (Omnira)
- Read over POST. Half a credit ($0.003) per request.
Fetch a page’s text
- Read over POST. A sixth of a credit ($0.001) per request; 60-second timeout.
- Static HTML only (no JavaScript). The target page’s own status is Result.Data.StatusCode, separate from API errors. Fetches obey robots rules.