Web Page Content
curl --request POST \
--url https://api-lr.agent.ai/v1/action/grab_web_text \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"url": "https://agent.ai",
"mode": "scrape"
}
'import requests
url = "https://api-lr.agent.ai/v1/action/grab_web_text"
payload = {
"url": "https://agent.ai",
"mode": "scrape"
}
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://agent.ai', mode: 'scrape'})
};
fetch('https://api-lr.agent.ai/v1/action/grab_web_text', 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-lr.agent.ai/v1/action/grab_web_text",
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://agent.ai',
'mode' => 'scrape'
]),
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-lr.agent.ai/v1/action/grab_web_text"
payload := strings.NewReader("{\n \"url\": \"https://agent.ai\",\n \"mode\": \"scrape\"\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-lr.agent.ai/v1/action/grab_web_text")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"url\": \"https://agent.ai\",\n \"mode\": \"scrape\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-lr.agent.ai/v1/action/grab_web_text")
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://agent.ai\",\n \"mode\": \"scrape\"\n}"
response = http.request(request)
puts response.read_body{
"status": 200,
"metadata": {
"description": "Get things done with the help of AI agents",
"favicon": "https://agent.ai/agent.ai-gear/favicon/favicon.ico",
"language": "en",
"next-head-count": "20",
"og:description": "Get things done with the help of AI agents",
"og:image": "https://agent.ai/agent.ai-gear/for-website.jpg",
"og:title": "agent.ai | The Professional Network for AI Agents",
"og:type": "website",
"og:url": "https://agent.ai",
"ogDescription": "Get things done with the help of AI agents",
"ogImage": "https://agent.ai/agent.ai-gear/for-website.jpg",
"ogTitle": "agent.ai | The Professional Network for AI Agents",
"ogUrl": "https://agent.ai",
"scrapeId": "b189d32c-bf1d-4be4-b7a7-883c8d609d6a",
"sourceURL": "https://agent.ai",
"statusCode": 200,
"title": "agent.ai | The Professional Network for AI Agents",
"twitter:card": "summary_large_image",
"twitter:description": "Get things done with the help of AI agents",
"twitter:domain": "agent.ai",
"twitter:image": "https://agent.ai/agent.ai-gear/for-website.jpg",
"twitter:title": "agent.ai | The Professional Network for AI Agents",
"twitter:url": "https://agent.ai",
"url": "https://agent.ai/",
"viewport": "width=device-width, initial-scale=1"
},
"response": "Metadata: {\"twitter:title\": \"agent.ai | The Professional Network for AI Agents\", \"ogUrl\": \"https://agent.ai\", \"ogDescription\": \"Get things done with the help of AI agents\", \"og:description\": \"Get things done with the help of AI agents\", \"ogTitle\": \"agent.ai | The Professional Network for AI Agents\", ..."
}{
"status": 400,
"response": null,
"error": "Unexpected error during scrape URL: Status code 400. Bad Request - [{'validation': 'url', 'code': 'invalid_string', 'message': 'Invalid url', 'path': ['url']}, {'code': 'custom', 'message': 'URL must have a valid top-level domain or be a valid path', 'path': ['url']}, {'code': 'custom', 'message': 'Invalid URL', 'path': ['url']}]"
}{
"status": 500,
"response": null,
"error": "Failed to extract text from the web page."
}Inputs & Data Retrieval
Web Page Content
Extract text from a specified web page or crawl multiple pages for comprehensive data gathering.
POST
/
action
/
grab_web_text
Web Page Content
curl --request POST \
--url https://api-lr.agent.ai/v1/action/grab_web_text \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"url": "https://agent.ai",
"mode": "scrape"
}
'import requests
url = "https://api-lr.agent.ai/v1/action/grab_web_text"
payload = {
"url": "https://agent.ai",
"mode": "scrape"
}
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://agent.ai', mode: 'scrape'})
};
fetch('https://api-lr.agent.ai/v1/action/grab_web_text', 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-lr.agent.ai/v1/action/grab_web_text",
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://agent.ai',
'mode' => 'scrape'
]),
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-lr.agent.ai/v1/action/grab_web_text"
payload := strings.NewReader("{\n \"url\": \"https://agent.ai\",\n \"mode\": \"scrape\"\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-lr.agent.ai/v1/action/grab_web_text")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"url\": \"https://agent.ai\",\n \"mode\": \"scrape\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-lr.agent.ai/v1/action/grab_web_text")
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://agent.ai\",\n \"mode\": \"scrape\"\n}"
response = http.request(request)
puts response.read_body{
"status": 200,
"metadata": {
"description": "Get things done with the help of AI agents",
"favicon": "https://agent.ai/agent.ai-gear/favicon/favicon.ico",
"language": "en",
"next-head-count": "20",
"og:description": "Get things done with the help of AI agents",
"og:image": "https://agent.ai/agent.ai-gear/for-website.jpg",
"og:title": "agent.ai | The Professional Network for AI Agents",
"og:type": "website",
"og:url": "https://agent.ai",
"ogDescription": "Get things done with the help of AI agents",
"ogImage": "https://agent.ai/agent.ai-gear/for-website.jpg",
"ogTitle": "agent.ai | The Professional Network for AI Agents",
"ogUrl": "https://agent.ai",
"scrapeId": "b189d32c-bf1d-4be4-b7a7-883c8d609d6a",
"sourceURL": "https://agent.ai",
"statusCode": 200,
"title": "agent.ai | The Professional Network for AI Agents",
"twitter:card": "summary_large_image",
"twitter:description": "Get things done with the help of AI agents",
"twitter:domain": "agent.ai",
"twitter:image": "https://agent.ai/agent.ai-gear/for-website.jpg",
"twitter:title": "agent.ai | The Professional Network for AI Agents",
"twitter:url": "https://agent.ai",
"url": "https://agent.ai/",
"viewport": "width=device-width, initial-scale=1"
},
"response": "Metadata: {\"twitter:title\": \"agent.ai | The Professional Network for AI Agents\", \"ogUrl\": \"https://agent.ai\", \"ogDescription\": \"Get things done with the help of AI agents\", \"og:description\": \"Get things done with the help of AI agents\", \"ogTitle\": \"agent.ai | The Professional Network for AI Agents\", ..."
}{
"status": 400,
"response": null,
"error": "Unexpected error during scrape URL: Status code 400. Bad Request - [{'validation': 'url', 'code': 'invalid_string', 'message': 'Invalid url', 'path': ['url']}, {'code': 'custom', 'message': 'URL must have a valid top-level domain or be a valid path', 'path': ['url']}, {'code': 'custom', 'message': 'Invalid URL', 'path': ['url']}]"
}{
"status": 500,
"response": null,
"error": "Failed to extract text from the web page."
}Authorizations
Bearer token from your account (https://agent.ai/user/integrations#api)
Body
application/json
⌘I

