Web Fetch
curl --request POST \
--url https://tool.modellix.ai/v1/web-fetch \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-Mdlx-User-Id: <x-mdlx-user-id>' \
--data '
{
"urls": [
"<string>"
]
}
'const options = {
method: 'POST',
headers: {
'X-Mdlx-User-Id': '<x-mdlx-user-id>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({urls: ['<string>']})
};
fetch('https://tool.modellix.ai/v1/web-fetch', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://tool.modellix.ai/v1/web-fetch"
payload = { "urls": ["<string>"] }
headers = {
"X-Mdlx-User-Id": "<x-mdlx-user-id>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://tool.modellix.ai/v1/web-fetch"
payload := strings.NewReader("{\n \"urls\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Mdlx-User-Id", "<x-mdlx-user-id>")
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://tool.modellix.ai/v1/web-fetch")
.header("X-Mdlx-User-Id", "<x-mdlx-user-id>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"urls\": [\n \"<string>\"\n ]\n}")
.asString();const url = 'https://tool.modellix.ai/v1/web-fetch';
const options = {
method: 'POST',
headers: {
'X-Mdlx-User-Id': '<x-mdlx-user-id>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({urls: ['<string>']})
};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://tool.modellix.ai/v1/web-fetch",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'urls' => [
'<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"X-Mdlx-User-Id: <x-mdlx-user-id>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}require 'uri'
require 'net/http'
url = URI("https://tool.modellix.ai/v1/web-fetch")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Mdlx-User-Id"] = '<x-mdlx-user-id>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"urls\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_bodyimport Foundation
let parameters = ["urls": ["<string>"]] as [String : Any?]
let postData = try JSONSerialization.data(withJSONObject: parameters, options: [])
let url = URL(string: "https://tool.modellix.ai/v1/web-fetch")!
var request = URLRequest(url: url)
request.httpMethod = "POST"
request.timeoutInterval = 10
request.allHTTPHeaderFields = [
"X-Mdlx-User-Id": "<x-mdlx-user-id>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
]
request.httpBody = postData
let (data, _) = try await URLSession.shared.data(for: request)
print(String(decoding: data, as: UTF8.self))$headers=@{}
$headers.Add("X-Mdlx-User-Id", "<x-mdlx-user-id>")
$headers.Add("Authorization", "Bearer <token>")
$headers.Add("Content-Type", "application/json")
$response = Invoke-WebRequest -Uri 'https://tool.modellix.ai/v1/web-fetch' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"urls": [
"<string>"
]
}'{
"results": [
{
"url": "<string>",
"title": "<string>",
"content": "<string>"
}
],
"failed_results": [
{
"url": "<string>",
"error": "<string>"
}
],
"billing": {
"sku": "web-fetch",
"success_count": 1,
"amount_usd": 1
},
"request_id": "<string>"
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>"
}
}Web Fetch
Extract readable content from public URLs.
POST
/
v1
/
web-fetch
Web Fetch
curl --request POST \
--url https://tool.modellix.ai/v1/web-fetch \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-Mdlx-User-Id: <x-mdlx-user-id>' \
--data '
{
"urls": [
"<string>"
]
}
'const options = {
method: 'POST',
headers: {
'X-Mdlx-User-Id': '<x-mdlx-user-id>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({urls: ['<string>']})
};
fetch('https://tool.modellix.ai/v1/web-fetch', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://tool.modellix.ai/v1/web-fetch"
payload = { "urls": ["<string>"] }
headers = {
"X-Mdlx-User-Id": "<x-mdlx-user-id>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://tool.modellix.ai/v1/web-fetch"
payload := strings.NewReader("{\n \"urls\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Mdlx-User-Id", "<x-mdlx-user-id>")
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://tool.modellix.ai/v1/web-fetch")
.header("X-Mdlx-User-Id", "<x-mdlx-user-id>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"urls\": [\n \"<string>\"\n ]\n}")
.asString();const url = 'https://tool.modellix.ai/v1/web-fetch';
const options = {
method: 'POST',
headers: {
'X-Mdlx-User-Id': '<x-mdlx-user-id>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({urls: ['<string>']})
};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://tool.modellix.ai/v1/web-fetch",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'urls' => [
'<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"X-Mdlx-User-Id: <x-mdlx-user-id>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}require 'uri'
require 'net/http'
url = URI("https://tool.modellix.ai/v1/web-fetch")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Mdlx-User-Id"] = '<x-mdlx-user-id>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"urls\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_bodyimport Foundation
let parameters = ["urls": ["<string>"]] as [String : Any?]
let postData = try JSONSerialization.data(withJSONObject: parameters, options: [])
let url = URL(string: "https://tool.modellix.ai/v1/web-fetch")!
var request = URLRequest(url: url)
request.httpMethod = "POST"
request.timeoutInterval = 10
request.allHTTPHeaderFields = [
"X-Mdlx-User-Id": "<x-mdlx-user-id>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
]
request.httpBody = postData
let (data, _) = try await URLSession.shared.data(for: request)
print(String(decoding: data, as: UTF8.self))$headers=@{}
$headers.Add("X-Mdlx-User-Id", "<x-mdlx-user-id>")
$headers.Add("Authorization", "Bearer <token>")
$headers.Add("Content-Type", "application/json")
$response = Invoke-WebRequest -Uri 'https://tool.modellix.ai/v1/web-fetch' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"urls": [
"<string>"
]
}'{
"results": [
{
"url": "<string>",
"title": "<string>",
"content": "<string>"
}
],
"failed_results": [
{
"url": "<string>",
"error": "<string>"
}
],
"billing": {
"sku": "web-fetch",
"success_count": 1,
"amount_usd": 1
},
"request_id": "<string>"
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>"
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
Stable end-user identifier supplied by the API caller.
Required string length:
8 - 128Pattern:
^[A-Za-z0-9_-]+$Body
application/json
Required array length:
1 - 20 elementsAbsolute HTTP or HTTPS URL without user information.
Pattern:
^https?://(?![^/?#]*@)[^\s]+$⌘I