Get the latest crawl
curl --request GET \
--url https://perquery.ai/api/v1/sites/{site_uuid}/content/crawls \
--header 'Authorization: <api-key>'import requests
url = "https://perquery.ai/api/v1/sites/{site_uuid}/content/crawls"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://perquery.ai/api/v1/sites/{site_uuid}/content/crawls', 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://perquery.ai/api/v1/sites/{site_uuid}/content/crawls",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://perquery.ai/api/v1/sites/{site_uuid}/content/crawls"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://perquery.ai/api/v1/sites/{site_uuid}/content/crawls")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://perquery.ai/api/v1/sites/{site_uuid}/content/crawls")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"crawl": {
"uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "queued",
"trigger": "manual",
"max_pages": 123,
"discovered": 123,
"stored": 123,
"unreachable": 123,
"rate_limited": true,
"failure_reason": "<string>",
"failure_code": "abandoned",
"started_at": "2023-11-07T05:31:56Z",
"finished_at": "2023-11-07T05:31:56Z"
}
}Content analysis
Get the latest crawl
Returns the latest content crawl of the site and its state.
GET
/
v1
/
sites
/
{site_uuid}
/
content
/
crawls
Get the latest crawl
curl --request GET \
--url https://perquery.ai/api/v1/sites/{site_uuid}/content/crawls \
--header 'Authorization: <api-key>'import requests
url = "https://perquery.ai/api/v1/sites/{site_uuid}/content/crawls"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://perquery.ai/api/v1/sites/{site_uuid}/content/crawls', 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://perquery.ai/api/v1/sites/{site_uuid}/content/crawls",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://perquery.ai/api/v1/sites/{site_uuid}/content/crawls"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://perquery.ai/api/v1/sites/{site_uuid}/content/crawls")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://perquery.ai/api/v1/sites/{site_uuid}/content/crawls")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"crawl": {
"uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "queued",
"trigger": "manual",
"max_pages": 123,
"discovered": 123,
"stored": 123,
"unreachable": 123,
"rate_limited": true,
"failure_reason": "<string>",
"failure_code": "abandoned",
"started_at": "2023-11-07T05:31:56Z",
"finished_at": "2023-11-07T05:31:56Z"
}
}
