String API
API Reference

Overview

Base URL, authentication, content type, and response headers.

Base URL

https://request.usestring.ai/v1

Authentication

All endpoints require a Bearer API key in the Authorization header. See Authentication.

Authorization: Bearer YOUR_API_KEY

Content type

Request bodies are JSON. Send Content-Type: application/json.

Endpoints

MethodPathDescription
POST/fetchIntelligent web fetch.
POST/searchStructured web search results.
POST/sitemapWhole-site URL discovery (async jobs).
GET/wssRemote CDP browser (WebSocket upgrade).
POST/contextsCreate a reusable browser profile.
GET/contextsList browser profiles.
GET/contexts/{contextId}Inspect a profile and its latest save.
DELETE/contexts/{contextId}Delete a browser profile.

Response headers

API responses include diagnostic headers when applicable:

HeaderDescription
x-request-duration-msTotal request duration in milliseconds.
x-data-transfer-bytesEstimated response payload plus header bytes before compression.
x-status-codeThe destination's original HTTP status code. Also set on a failed fetch that reached the destination — see Errors.
x-final-url/fetch only. The URL the response was served from, after any redirects, or the requested URL if there was no redirect. JSON bodies carry the same value as finalUrl. Sent on error responses too; omitted only when the request body has no valid url. See Final URL.
x-origin-etagThe destination's ETag, kept separate from the API representation's own validators.
x-origin-last-modifiedThe destination's Last-Modified value, suitable for a later If-Modified-Since request.
x-protocol-fallback-urlPresent only when an https:// URL could not be reached over TLS and was fetched over plain http:// instead. The value is the http:// URL fetched. See HTTPS fallback.
x-request-idRequest identifier, useful when contacting support.
x-billed-request-typeBilled /fetch classification. See Billed request type.
x-json-schema-appliedjsonSchema requests only. true — the body is the extracted object; false — it is the fallback envelope.
x-json-schema-fallback-reasonPresent only with x-json-schema-applied: false. Same value as the body's reason; see fallback details.
x-iframes-truncated/fetch only. true when includeIframes or captureIframes left an iframe or its content out; absent otherwise.
x-wait-until-timed-out/fetch only. true when the page was read, or the actions ran, before it reached the request's waitUntil state; absent otherwise.

Billed request type

A billed /fetch response includes x-billed-request-type, which identifies the request strategy and proxy class used for billing:

ValueRequest strategyProxy class
request_standardRequest-basedStandard
request_premiumRequest-basedPremium
browser_standardBrowser-basedStandard
browser_premiumBrowser-basedPremium
searchSearch—

search marks a Google results URL that /fetch answered through Search; it bills at the search rate.

Errors & limits

  • Errors — status codes and error response shapes.
  • Rate limits — request rate and 429 handling.