Web

Ask a question about a web page

Ask a natural-language question about a specific web page and get an LLM-generated answer.

GET/v1/web/ask
x-api-keystringheader

API key (`sfk_...`)

Parameters
4
urlstringrequiredquery

Web page URL to fetch.

min 1 chars · max 2083 chars

qstringrequiredquery

Natural-language question to answer about the page content.

min 1 chars · max 500 chars

proxystringoptionalquery

Most expensive proxy tier to use. The page is tried on `datacenter` first and moves up only if it is blocked, stopping at this tier. Default: every tier (`mobile`).

one of: datacenter, residential, mobile

maxCreditsintegeroptionalup to maxCreditsquery

Most credits this call may cost (1–25). One credit covers loading a typical page and the model reading roughly 1,500 words of it (less in languages such as Japanese); long pages are answered from their first part (`truncated: true`) unless you raise this. Charged only for what the call uses.

≥ 1 · ≤ 25

Response fields
14

Endpoint-specific response payload.

datalookupStatus
string

Whether page content could be extracted. `restricted`: bot protection blocked the page on every proxy tier allowed. `budget_exceeded`: the page needed more than `maxCredits` allows before any content loaded.

one of: found, restricted, budget_exceeded

dataproxy
stringnullable

Proxy tier the page was loaded on: the tier that served it, or the last one tried. Null when not measured.

one of: datacenter, residential, mobile, null

databudgetExceeded
boolean

Whether the page needed more than `maxCredits` allows. Loading stopped early, so content may be incomplete.

databytesTransferred
integernullable

Data the page loaded through the proxy, in bytes, across every tier tried. Null when not measured.

≥ 0

dataurl
string

URL that was analyzed.

dataanswer
stringnullable

LLM-generated answer when lookupStatus is found; null otherwise.

datatruncated
boolean

Whether the answer is based on only the first part of a long page, because the rest didn't fit `maxCredits`.

Metadata describing the request and billing outcome.

metarequestId
string

Unique request identifier for tracing this API call.

min 1 chars

metacreditsCharged
integer

Credits charged for this request.

≥ 0

metaversion
string

Public API version that served the response.

one of: v1

metastale
booleanoptional

Present, and `true`, only when the source couldn't be reached and this is the last good answer for the same request instead, up to 24 hours old. Absent on every live answer.

one of: true

metafetchedAt
stringoptional

When a stale answer (`stale: true`) was originally fetched (ISO 8601, UTC). Absent on every live answer.

Code example

curl "https://api.socialfetch.dev/v1/web/ask?url=https://www.socialfetch.dev&q=What%20is%20this%20page%20about?" \
  -H "x-api-key: $SOCIALFETCH_API_KEY"

Responses

LLM answer for the question about the page.