Skip to main content
GET
/
gateway
/
v1
/
web
/
fetch
Web Page Fetch
curl --request GET \
  --url https://api.ask.surf/gateway/v1/web/fetch
{
  "data": {
    "content": "<string>",
    "url": "<string>",
    "title": "<string>"
  },
  "meta": {
    "cached": true,
    "credits_used": 123
  },
  "$schema": "<string>"
}

Query Parameters

url
string
required

URL to fetch and parse

Example:

"https://ethereum.org"

target_selector
string

CSS selector to extract specific content

Example:

"article.main-content"

remove_selector
string

CSS selector to remove unwanted elements

Example:

"nav,footer,.ads"

wait_for_selector
string

CSS selector to wait for before extracting

Example:

".content-loaded"

timeout
integer<int64>
default:30000

Request timeout in milliseconds

Required range: 1000 <= x <= 60000
Example:

5000

Response

OK

data
object
required
meta
object
required
$schema
string<uri>

A URL to the JSON Schema for this object.

Example:

"https://example.com/schemas/DataObjectResponseWebFetchResultItem.json"