Web fetch
curl --request POST \
--url https://api.opper.ai/v3/tools/web/fetch \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"url": "<string>"
}
'import requests
url = "https://api.opper.ai/v3/tools/web/fetch"
payload = { "url": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({url: '<string>'})
};
fetch('https://api.opper.ai/v3/tools/web/fetch', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"content": "<string>",
"title": "<string>",
"url": "<string>"
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
},
"meta": {}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
},
"meta": {}
}Tools
Web fetch
Fetch a URL and return its content as markdown.
POST
/
v3
/
tools
/
web
/
fetch
Web fetch
curl --request POST \
--url https://api.opper.ai/v3/tools/web/fetch \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"url": "<string>"
}
'import requests
url = "https://api.opper.ai/v3/tools/web/fetch"
payload = { "url": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({url: '<string>'})
};
fetch('https://api.opper.ai/v3/tools/web/fetch', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"content": "<string>",
"title": "<string>",
"url": "<string>"
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
},
"meta": {}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
},
"meta": {}
}This endpoint is in beta. Its request and response shapes may change without the usual deprecation window.
Authorizations
API key authentication. Pass your API key as a Bearer token.
Body
application/json