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
}Pages de Crawl
Récupère la liste des pages pour un crawl spécifique.
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
}Autorisations
En-tête d'authentification Bearer sous la forme Bearer , où est ton jeton d'authentification.
Paramètres de chemin
L'ID du crawl pour lequel récupérer la liste des URLs.
Paramètres de requête
Entier optionnel représentant l'index à partir duquel commencer à récupérer le contenu. Utile pour paginer jusqu'à ce que toutes les URLs soient récupérées. Commence avec 0, puis fournir la valeur response['cursor'] de la dernière requête.
Entier optionnel pour limiter le nombre de résultats retournés. Recommandé 10-50 résultats à la fois. Paginé en utilisant cursor. Maximum 10MB de contenu peuvent être récupérés en une seule requête.
Une requête de recherche optionnelle pour trier les résultats par pertinence. Utilise la recherche originale search_query par défaut si fournie.
Obsolète : Utilise l'endpoint /retrieve avec retrieve_id. Tableau de formats à récupérer (par exemple, ["html", "markdown"]).
html, markdown Réponse
Réponse réussie avec la liste des URLs.
ID du Crawl
Le type d'objet. "crawl" pour cet endpoint.
in_progress ou completed
Show child attributes
Show child attributes
Show child attributes
Show child attributes
À passer dans la requête suivante pour obtenir les prochains éléments.
Cette page vous a-t-elle été utile ?