curl --request GET \
--url https://api.olostep.com/v1/crawls/{crawl_id}/pages \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.olostep.com/v1/crawls/{crawl_id}/pages"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.olostep.com/v1/crawls/{crawl_id}/pages', 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.olostep.com/v1/crawls/{crawl_id}/pages",
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: Bearer <token>"
],
]);
$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://api.olostep.com/v1/crawls/{crawl_id}/pages"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.olostep.com/v1/crawls/{crawl_id}/pages")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.olostep.com/v1/crawls/{crawl_id}/pages")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"crawl_id": "<string>",
"object": "<string>",
"status": "<string>",
"search_query": "<string>",
"pages_count": 123,
"pages": [
{
"id": "<string>",
"retrieve_id": "<string>",
"url": "<string>",
"is_external": true,
"html_content": "<string>",
"markdown_content": "<string>"
}
],
"metadata": {
"external_urls": [
"<string>"
],
"failed_urls": [
"<string>"
]
},
"cursor": 123
}Crawl-Seiten
Ruft die Liste der Seiten für einen bestimmten Crawl ab.
curl --request GET \
--url https://api.olostep.com/v1/crawls/{crawl_id}/pages \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.olostep.com/v1/crawls/{crawl_id}/pages"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.olostep.com/v1/crawls/{crawl_id}/pages', 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.olostep.com/v1/crawls/{crawl_id}/pages",
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: Bearer <token>"
],
]);
$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://api.olostep.com/v1/crawls/{crawl_id}/pages"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.olostep.com/v1/crawls/{crawl_id}/pages")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.olostep.com/v1/crawls/{crawl_id}/pages")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"crawl_id": "<string>",
"object": "<string>",
"status": "<string>",
"search_query": "<string>",
"pages_count": 123,
"pages": [
{
"id": "<string>",
"retrieve_id": "<string>",
"url": "<string>",
"is_external": true,
"html_content": "<string>",
"markdown_content": "<string>"
}
],
"metadata": {
"external_urls": [
"<string>"
],
"failed_urls": [
"<string>"
]
},
"cursor": 123
}Autorisierungen
Bearer-Authentifizierungsheader in der Form Bearer , wobei dein Authentifizierungstoken ist.
Pfadparameter
Die ID des Crawls, für den die Liste der URLs abgerufen werden soll.
Abfrageparameter
Optionaler Integer, der den Index darstellt, ab dem Inhalte abgerufen werden sollen. Nützlich, um zu paginieren, bis alle URLs abgerufen sind. Beginne mit 0 und gib dann den response['cursor']-Wert der letzten Anfrage an.
Optionaler Integer, um die Anzahl der zurückgegebenen Ergebnisse zu begrenzen. Empfohlen 10-50 Ergebnisse auf einmal. Paginierung erfolgt mit cursor. Maximal 10MB Inhalt können in einer einzigen Anfrage abgerufen werden.
Eine optionale Suchanfrage, um die Ergebnisse nach Relevanz zu sortieren. Verwendet standardmäßig die ursprüngliche search_query, falls angegeben.
Veraltet: Verwende den /retrieve Endpunkt mit retrieve_id. Array von Formaten, die abgerufen werden sollen (z.B. ["html", "markdown"]).
html, markdown Antwort
Erfolgreiche Antwort mit der Liste der URLs.
Crawl-ID
Die Art des Objekts. "crawl" für diesen Endpunkt.
in_progress oder completed
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Im nächsten Anfrage-Query übergeben, um die nächsten Elemente zu erhalten.
War diese Seite hilfreich?