Extract Data
curl --request POST \
--url https://api.wetrocloud.com/v1/extract/ \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"link": "https://theweek.com/news/people/954994/billionaires-richest-person-in-the-world",
"prompt": "Extract the names and networth of Billionares in the article",
"json_schema": [
{
"name": "string"
},
{
"networth": "number"
}
],
"delay": 2
}
'import requests
url = "https://api.wetrocloud.com/v1/extract/"
payload = {
"link": "https://theweek.com/news/people/954994/billionaires-richest-person-in-the-world",
"prompt": "Extract the names and networth of Billionares in the article",
"json_schema": [{ "name": "string" }, { "networth": "number" }],
"delay": 2
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
link: 'https://theweek.com/news/people/954994/billionaires-richest-person-in-the-world',
prompt: 'Extract the names and networth of Billionares in the article',
json_schema: [{name: 'string'}, {networth: 'number'}],
delay: 2
})
};
fetch('https://api.wetrocloud.com/v1/extract/', 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.wetrocloud.com/v1/extract/",
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([
'link' => 'https://theweek.com/news/people/954994/billionaires-richest-person-in-the-world',
'prompt' => 'Extract the names and networth of Billionares in the article',
'json_schema' => [
[
'name' => 'string'
],
[
'networth' => 'number'
]
],
'delay' => 2
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"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.wetrocloud.com/v1/extract/"
payload := strings.NewReader("{\n \"link\": \"https://theweek.com/news/people/954994/billionaires-richest-person-in-the-world\",\n \"prompt\": \"Extract the names and networth of Billionares in the article\",\n \"json_schema\": [\n {\n \"name\": \"string\"\n },\n {\n \"networth\": \"number\"\n }\n ],\n \"delay\": 2\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
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.wetrocloud.com/v1/extract/")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"link\": \"https://theweek.com/news/people/954994/billionaires-richest-person-in-the-world\",\n \"prompt\": \"Extract the names and networth of Billionares in the article\",\n \"json_schema\": [\n {\n \"name\": \"string\"\n },\n {\n \"networth\": \"number\"\n }\n ],\n \"delay\": 2\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.wetrocloud.com/v1/extract/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"link\": \"https://theweek.com/news/people/954994/billionaires-richest-person-in-the-world\",\n \"prompt\": \"Extract the names and networth of Billionares in the article\",\n \"json_schema\": [\n {\n \"name\": \"string\"\n },\n {\n \"networth\": \"number\"\n }\n ],\n \"delay\": 2\n}"
response = http.request(request)
puts response.read_body{
"response": [
{
"name": "Elon Musk",
"networth": "$462 billion"
},
{
"name": "Larry Ellison",
"networth": "$340 billion"
},
{
"name": "Mark Zuckerberg",
"networth": "$258 billion"
},
{
"name": "Jeff Bezos",
"networth": "$244 billion"
},
{
"name": "Larry Page",
"networth": "$221 billion"
},
{
"name": "Sergey Brin",
"networth": "$207 billion"
},
{
"name": "Bernard Arnault",
"networth": "$197 billion"
},
{
"name": "Steve Ballmer",
"networth": "$179 billion"
},
{
"name": "Jensen Huang",
"networth": "$158 billion"
},
{
"name": "Michael Dell",
"networth": "$156 billion"
}
],
"success": true
}Endpoint Examples
Extract Data
This endpoint allows you to extract specific information from any web page and receive it in a structured JSON format that matches your requirements.
Request Body
link(string): The URL of the website to extract data from.prompt(string): Instructions describing what data to extract.json_schema(array, optional): The structure defining your desired output format. If not provided, returns plain text.delay(integer, optional): Delay in seconds before extraction (useful for dynamic content). Default: 0.
Response
The response is a JSON object with the following properties:
response(array): Extracted data matching your JSON schema.success(boolean): Indicates whether the extraction was successful.
POST
/
v1
/
extract
/
Extract Data
curl --request POST \
--url https://api.wetrocloud.com/v1/extract/ \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"link": "https://theweek.com/news/people/954994/billionaires-richest-person-in-the-world",
"prompt": "Extract the names and networth of Billionares in the article",
"json_schema": [
{
"name": "string"
},
{
"networth": "number"
}
],
"delay": 2
}
'import requests
url = "https://api.wetrocloud.com/v1/extract/"
payload = {
"link": "https://theweek.com/news/people/954994/billionaires-richest-person-in-the-world",
"prompt": "Extract the names and networth of Billionares in the article",
"json_schema": [{ "name": "string" }, { "networth": "number" }],
"delay": 2
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
link: 'https://theweek.com/news/people/954994/billionaires-richest-person-in-the-world',
prompt: 'Extract the names and networth of Billionares in the article',
json_schema: [{name: 'string'}, {networth: 'number'}],
delay: 2
})
};
fetch('https://api.wetrocloud.com/v1/extract/', 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.wetrocloud.com/v1/extract/",
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([
'link' => 'https://theweek.com/news/people/954994/billionaires-richest-person-in-the-world',
'prompt' => 'Extract the names and networth of Billionares in the article',
'json_schema' => [
[
'name' => 'string'
],
[
'networth' => 'number'
]
],
'delay' => 2
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"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.wetrocloud.com/v1/extract/"
payload := strings.NewReader("{\n \"link\": \"https://theweek.com/news/people/954994/billionaires-richest-person-in-the-world\",\n \"prompt\": \"Extract the names and networth of Billionares in the article\",\n \"json_schema\": [\n {\n \"name\": \"string\"\n },\n {\n \"networth\": \"number\"\n }\n ],\n \"delay\": 2\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
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.wetrocloud.com/v1/extract/")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"link\": \"https://theweek.com/news/people/954994/billionaires-richest-person-in-the-world\",\n \"prompt\": \"Extract the names and networth of Billionares in the article\",\n \"json_schema\": [\n {\n \"name\": \"string\"\n },\n {\n \"networth\": \"number\"\n }\n ],\n \"delay\": 2\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.wetrocloud.com/v1/extract/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"link\": \"https://theweek.com/news/people/954994/billionaires-richest-person-in-the-world\",\n \"prompt\": \"Extract the names and networth of Billionares in the article\",\n \"json_schema\": [\n {\n \"name\": \"string\"\n },\n {\n \"networth\": \"number\"\n }\n ],\n \"delay\": 2\n}"
response = http.request(request)
puts response.read_body{
"response": [
{
"name": "Elon Musk",
"networth": "$462 billion"
},
{
"name": "Larry Ellison",
"networth": "$340 billion"
},
{
"name": "Mark Zuckerberg",
"networth": "$258 billion"
},
{
"name": "Jeff Bezos",
"networth": "$244 billion"
},
{
"name": "Larry Page",
"networth": "$221 billion"
},
{
"name": "Sergey Brin",
"networth": "$207 billion"
},
{
"name": "Bernard Arnault",
"networth": "$197 billion"
},
{
"name": "Steve Ballmer",
"networth": "$179 billion"
},
{
"name": "Jensen Huang",
"networth": "$158 billion"
},
{
"name": "Michael Dell",
"networth": "$156 billion"
}
],
"success": true
}Authorizations
Body
application/json
Response
OK
The response is of type object.
⌘I