/fetch
curl --request POST \
--url https://api.linkup.so/v1/fetch \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"url": "https://docs.linkup.so",
"extractImages": false,
"includeRawContent": false,
"includeRawHtml": false,
"renderJs": false,
"mode": "standard",
"instructions": "Use public list prices only and express monetary values in USD.",
"schema": null
}
'import requests
url = "https://api.linkup.so/v1/fetch"
payload = {
"url": "https://docs.linkup.so",
"extractImages": False,
"includeRawContent": False,
"includeRawHtml": False,
"renderJs": False,
"mode": "standard",
"instructions": "Use public list prices only and express monetary values in USD.",
"schema": None
}
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: 'https://docs.linkup.so',
extractImages: false,
includeRawContent: false,
includeRawHtml: false,
renderJs: false,
mode: 'standard',
instructions: 'Use public list prices only and express monetary values in USD.',
schema: null
})
};
fetch('https://api.linkup.so/v1/fetch', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.linkup.so/v1/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([
'url' => 'https://docs.linkup.so',
'extractImages' => false,
'includeRawContent' => false,
'includeRawHtml' => false,
'renderJs' => false,
'mode' => 'standard',
'instructions' => 'Use public list prices only and express monetary values in USD.',
'schema' => null
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.linkup.so/v1/fetch"
payload := strings.NewReader("{\n \"url\": \"https://docs.linkup.so\",\n \"extractImages\": false,\n \"includeRawContent\": false,\n \"includeRawHtml\": false,\n \"renderJs\": false,\n \"mode\": \"standard\",\n \"instructions\": \"Use public list prices only and express monetary values in USD.\",\n \"schema\": null\n}")
req, _ := http.NewRequest("POST", url, payload)
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://api.linkup.so/v1/fetch")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"url\": \"https://docs.linkup.so\",\n \"extractImages\": false,\n \"includeRawContent\": false,\n \"includeRawHtml\": false,\n \"renderJs\": false,\n \"mode\": \"standard\",\n \"instructions\": \"Use public list prices only and express monetary values in USD.\",\n \"schema\": null\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.linkup.so/v1/fetch")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"url\": \"https://docs.linkup.so\",\n \"extractImages\": false,\n \"includeRawContent\": false,\n \"includeRawHtml\": false,\n \"renderJs\": false,\n \"mode\": \"standard\",\n \"instructions\": \"Use public list prices only and express monetary values in USD.\",\n \"schema\": null\n}"
response = http.request(request)
puts response.read_body{
"favicon": "https://favicons.linkup.so?domain=docs.linkup.so",
"markdown": "Get started for free, no credit card required...",
"contentType": "html",
"data": {
"name": "Example product",
"price": 49
},
"images": [
{
"alt": "Image 1",
"url": "https://example.com/image.jpg"
},
{
"alt": "Image 2",
"url": "https://example.com/image2.jpg"
}
],
"rawContent": "<!DOCTYPE html><html lang=\"en\"><head>...</head><body>...</body></html>",
"rawHtml": "<!DOCTYPE html><html lang=\"en\"><head>...</head><body>...</body></html>"
}Fetch
/fetch
The /fetch endpoint allows you to fetch a single webpage from a given URL.
POST
/
v1
/
fetch
/fetch
curl --request POST \
--url https://api.linkup.so/v1/fetch \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"url": "https://docs.linkup.so",
"extractImages": false,
"includeRawContent": false,
"includeRawHtml": false,
"renderJs": false,
"mode": "standard",
"instructions": "Use public list prices only and express monetary values in USD.",
"schema": null
}
'import requests
url = "https://api.linkup.so/v1/fetch"
payload = {
"url": "https://docs.linkup.so",
"extractImages": False,
"includeRawContent": False,
"includeRawHtml": False,
"renderJs": False,
"mode": "standard",
"instructions": "Use public list prices only and express monetary values in USD.",
"schema": None
}
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: 'https://docs.linkup.so',
extractImages: false,
includeRawContent: false,
includeRawHtml: false,
renderJs: false,
mode: 'standard',
instructions: 'Use public list prices only and express monetary values in USD.',
schema: null
})
};
fetch('https://api.linkup.so/v1/fetch', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.linkup.so/v1/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([
'url' => 'https://docs.linkup.so',
'extractImages' => false,
'includeRawContent' => false,
'includeRawHtml' => false,
'renderJs' => false,
'mode' => 'standard',
'instructions' => 'Use public list prices only and express monetary values in USD.',
'schema' => null
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.linkup.so/v1/fetch"
payload := strings.NewReader("{\n \"url\": \"https://docs.linkup.so\",\n \"extractImages\": false,\n \"includeRawContent\": false,\n \"includeRawHtml\": false,\n \"renderJs\": false,\n \"mode\": \"standard\",\n \"instructions\": \"Use public list prices only and express monetary values in USD.\",\n \"schema\": null\n}")
req, _ := http.NewRequest("POST", url, payload)
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://api.linkup.so/v1/fetch")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"url\": \"https://docs.linkup.so\",\n \"extractImages\": false,\n \"includeRawContent\": false,\n \"includeRawHtml\": false,\n \"renderJs\": false,\n \"mode\": \"standard\",\n \"instructions\": \"Use public list prices only and express monetary values in USD.\",\n \"schema\": null\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.linkup.so/v1/fetch")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"url\": \"https://docs.linkup.so\",\n \"extractImages\": false,\n \"includeRawContent\": false,\n \"includeRawHtml\": false,\n \"renderJs\": false,\n \"mode\": \"standard\",\n \"instructions\": \"Use public list prices only and express monetary values in USD.\",\n \"schema\": null\n}"
response = http.request(request)
puts response.read_body{
"favicon": "https://favicons.linkup.so?domain=docs.linkup.so",
"markdown": "Get started for free, no credit card required...",
"contentType": "html",
"data": {
"name": "Example product",
"price": 49
},
"images": [
{
"alt": "Image 1",
"url": "https://example.com/image.jpg"
},
{
"alt": "Image 2",
"url": "https://example.com/image2.jpg"
}
],
"rawContent": "<!DOCTYPE html><html lang=\"en\"><head>...</head><body>...</body></html>",
"rawHtml": "<!DOCTYPE html><html lang=\"en\"><head>...</head><body>...</body></html>"
}Get your API key
Create a Linkup account for free to get your API key.
mode, renderJs, includeRawHtml, extractImages,
schema, and instructions, see the
Fetch overview.Authorizations
Body
application/json
Response
Successful response