curl --request POST \
--url https://api.onkernel.com/search/{id}/contents \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"result_ids": [
"<string>"
],
"content": {
"browser": {
"browser_id": "<string>",
"mode": "curl"
},
"format": "markdown",
"max_age_hours": 24,
"max_chars": 10000,
"timeout_ms": 15000
},
"limit": 50,
"timeout_ms": 60000
}
'import requests
url = "https://api.onkernel.com/search/{id}/contents"
payload = {
"result_ids": ["<string>"],
"content": {
"browser": {
"browser_id": "<string>",
"mode": "curl"
},
"format": "markdown",
"max_age_hours": 24,
"max_chars": 10000,
"timeout_ms": 15000
},
"limit": 50,
"timeout_ms": 60000
}
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({
result_ids: ['<string>'],
content: {
browser: {browser_id: '<string>', mode: 'curl'},
format: 'markdown',
max_age_hours: 24,
max_chars: 10000,
timeout_ms: 15000
},
limit: 50,
timeout_ms: 60000
})
};
fetch('https://api.onkernel.com/search/{id}/contents', 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.onkernel.com/search/{id}/contents",
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([
'result_ids' => [
'<string>'
],
'content' => [
'browser' => [
'browser_id' => '<string>',
'mode' => 'curl'
],
'format' => 'markdown',
'max_age_hours' => 24,
'max_chars' => 10000,
'timeout_ms' => 15000
],
'limit' => 50,
'timeout_ms' => 60000
]),
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.onkernel.com/search/{id}/contents"
payload := strings.NewReader("{\n \"result_ids\": [\n \"<string>\"\n ],\n \"content\": {\n \"browser\": {\n \"browser_id\": \"<string>\",\n \"mode\": \"curl\"\n },\n \"format\": \"markdown\",\n \"max_age_hours\": 24,\n \"max_chars\": 10000,\n \"timeout_ms\": 15000\n },\n \"limit\": 50,\n \"timeout_ms\": 60000\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.onkernel.com/search/{id}/contents")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"result_ids\": [\n \"<string>\"\n ],\n \"content\": {\n \"browser\": {\n \"browser_id\": \"<string>\",\n \"mode\": \"curl\"\n },\n \"format\": \"markdown\",\n \"max_age_hours\": 24,\n \"max_chars\": 10000,\n \"timeout_ms\": 15000\n },\n \"limit\": 50,\n \"timeout_ms\": 60000\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.onkernel.com/search/{id}/contents")
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 \"result_ids\": [\n \"<string>\"\n ],\n \"content\": {\n \"browser\": {\n \"browser_id\": \"<string>\",\n \"mode\": \"curl\"\n },\n \"format\": \"markdown\",\n \"max_age_hours\": 24,\n \"max_chars\": 10000,\n \"timeout_ms\": 15000\n },\n \"limit\": 50,\n \"timeout_ms\": 60000\n}"
response = http.request(request)
puts response.read_body{
"contents": [
{
"result_id": "<string>",
"status": "ok",
"url": "<string>",
"cache_status": "hit",
"completeness": "full_page",
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true
},
"extractor_version": "<string>",
"fetched_at": "2023-11-07T05:31:56Z",
"final_url": "<string>",
"format": "markdown",
"http_status": 349,
"method": "provider",
"text": "<string>",
"truncated": true
}
],
"search_id": "<string>",
"usage": {
"content_fetches": 1,
"results_count": 1,
"cost": 1
},
"warnings": [
{
"code": "<string>",
"message": "<string>",
"param": "<string>",
"provider": "<string>",
"result_id": "<string>"
}
]
}{
"code": "bad_request",
"message": "Missing required field: app_name",
"details": [
{
"code": "invalid_input",
"message": "Provided version string is not semver compliant"
}
],
"inner_error": {
"code": "invalid_input",
"message": "Provided version string is not semver compliant"
}
}{
"code": "bad_request",
"message": "Missing required field: app_name",
"details": [
{
"code": "invalid_input",
"message": "Provided version string is not semver compliant"
}
],
"inner_error": {
"code": "invalid_input",
"message": "Provided version string is not semver compliant"
}
}{
"code": "bad_request",
"message": "Missing required field: app_name",
"details": [
{
"code": "invalid_input",
"message": "Provided version string is not semver compliant"
}
],
"inner_error": {
"code": "invalid_input",
"message": "Provided version string is not semver compliant"
}
}{
"code": "bad_request",
"message": "Missing required field: app_name",
"details": [
{
"code": "invalid_input",
"message": "Provided version string is not semver compliant"
}
],
"inner_error": {
"code": "invalid_input",
"message": "Provided version string is not semver compliant"
}
}{
"code": "bad_request",
"message": "Missing required field: app_name",
"details": [
{
"code": "invalid_input",
"message": "Provided version string is not semver compliant"
}
],
"inner_error": {
"code": "invalid_input",
"message": "Provided version string is not semver compliant"
}
}{
"code": "bad_request",
"message": "Missing required field: app_name",
"details": [
{
"code": "invalid_input",
"message": "Provided version string is not semver compliant"
}
],
"inner_error": {
"code": "invalid_input",
"message": "Provided version string is not semver compliant"
}
}{
"code": "bad_request",
"message": "Missing required field: app_name",
"details": [
{
"code": "invalid_input",
"message": "Provided version string is not semver compliant"
}
],
"inner_error": {
"code": "invalid_input",
"message": "Provided version string is not semver compliant"
}
}Fetch search result content
Retrieves selected results from a retained search. Provide exactly one of result_ids or limit; the latter fetches the top results. Content defaults to source:auto. Responses preserve result_ids order. Unknown result IDs are rejected before retrieval starts. Missing, expired, or inaccessible searches return 404. Once retrieval begins, return one outcome per selected result, including timeout entries for work unfinished at the overall deadline. Browser retrievals run sequentially in result order, so later results may time out when earlier pages are slow. X-Request-Id identifies this request separately from the search resource.
curl --request POST \
--url https://api.onkernel.com/search/{id}/contents \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"result_ids": [
"<string>"
],
"content": {
"browser": {
"browser_id": "<string>",
"mode": "curl"
},
"format": "markdown",
"max_age_hours": 24,
"max_chars": 10000,
"timeout_ms": 15000
},
"limit": 50,
"timeout_ms": 60000
}
'import requests
url = "https://api.onkernel.com/search/{id}/contents"
payload = {
"result_ids": ["<string>"],
"content": {
"browser": {
"browser_id": "<string>",
"mode": "curl"
},
"format": "markdown",
"max_age_hours": 24,
"max_chars": 10000,
"timeout_ms": 15000
},
"limit": 50,
"timeout_ms": 60000
}
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({
result_ids: ['<string>'],
content: {
browser: {browser_id: '<string>', mode: 'curl'},
format: 'markdown',
max_age_hours: 24,
max_chars: 10000,
timeout_ms: 15000
},
limit: 50,
timeout_ms: 60000
})
};
fetch('https://api.onkernel.com/search/{id}/contents', 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.onkernel.com/search/{id}/contents",
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([
'result_ids' => [
'<string>'
],
'content' => [
'browser' => [
'browser_id' => '<string>',
'mode' => 'curl'
],
'format' => 'markdown',
'max_age_hours' => 24,
'max_chars' => 10000,
'timeout_ms' => 15000
],
'limit' => 50,
'timeout_ms' => 60000
]),
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.onkernel.com/search/{id}/contents"
payload := strings.NewReader("{\n \"result_ids\": [\n \"<string>\"\n ],\n \"content\": {\n \"browser\": {\n \"browser_id\": \"<string>\",\n \"mode\": \"curl\"\n },\n \"format\": \"markdown\",\n \"max_age_hours\": 24,\n \"max_chars\": 10000,\n \"timeout_ms\": 15000\n },\n \"limit\": 50,\n \"timeout_ms\": 60000\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.onkernel.com/search/{id}/contents")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"result_ids\": [\n \"<string>\"\n ],\n \"content\": {\n \"browser\": {\n \"browser_id\": \"<string>\",\n \"mode\": \"curl\"\n },\n \"format\": \"markdown\",\n \"max_age_hours\": 24,\n \"max_chars\": 10000,\n \"timeout_ms\": 15000\n },\n \"limit\": 50,\n \"timeout_ms\": 60000\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.onkernel.com/search/{id}/contents")
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 \"result_ids\": [\n \"<string>\"\n ],\n \"content\": {\n \"browser\": {\n \"browser_id\": \"<string>\",\n \"mode\": \"curl\"\n },\n \"format\": \"markdown\",\n \"max_age_hours\": 24,\n \"max_chars\": 10000,\n \"timeout_ms\": 15000\n },\n \"limit\": 50,\n \"timeout_ms\": 60000\n}"
response = http.request(request)
puts response.read_body{
"contents": [
{
"result_id": "<string>",
"status": "ok",
"url": "<string>",
"cache_status": "hit",
"completeness": "full_page",
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true
},
"extractor_version": "<string>",
"fetched_at": "2023-11-07T05:31:56Z",
"final_url": "<string>",
"format": "markdown",
"http_status": 349,
"method": "provider",
"text": "<string>",
"truncated": true
}
],
"search_id": "<string>",
"usage": {
"content_fetches": 1,
"results_count": 1,
"cost": 1
},
"warnings": [
{
"code": "<string>",
"message": "<string>",
"param": "<string>",
"provider": "<string>",
"result_id": "<string>"
}
]
}{
"code": "bad_request",
"message": "Missing required field: app_name",
"details": [
{
"code": "invalid_input",
"message": "Provided version string is not semver compliant"
}
],
"inner_error": {
"code": "invalid_input",
"message": "Provided version string is not semver compliant"
}
}{
"code": "bad_request",
"message": "Missing required field: app_name",
"details": [
{
"code": "invalid_input",
"message": "Provided version string is not semver compliant"
}
],
"inner_error": {
"code": "invalid_input",
"message": "Provided version string is not semver compliant"
}
}{
"code": "bad_request",
"message": "Missing required field: app_name",
"details": [
{
"code": "invalid_input",
"message": "Provided version string is not semver compliant"
}
],
"inner_error": {
"code": "invalid_input",
"message": "Provided version string is not semver compliant"
}
}{
"code": "bad_request",
"message": "Missing required field: app_name",
"details": [
{
"code": "invalid_input",
"message": "Provided version string is not semver compliant"
}
],
"inner_error": {
"code": "invalid_input",
"message": "Provided version string is not semver compliant"
}
}{
"code": "bad_request",
"message": "Missing required field: app_name",
"details": [
{
"code": "invalid_input",
"message": "Provided version string is not semver compliant"
}
],
"inner_error": {
"code": "invalid_input",
"message": "Provided version string is not semver compliant"
}
}{
"code": "bad_request",
"message": "Missing required field: app_name",
"details": [
{
"code": "invalid_input",
"message": "Provided version string is not semver compliant"
}
],
"inner_error": {
"code": "invalid_input",
"message": "Provided version string is not semver compliant"
}
}{
"code": "bad_request",
"message": "Missing required field: app_name",
"details": [
{
"code": "invalid_input",
"message": "Provided version string is not semver compliant"
}
],
"inner_error": {
"code": "invalid_input",
"message": "Provided version string is not semver compliant"
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Search resource ID returned by POST /search.
Body
- Option 1
- Option 2
Kernel-generated IDs from the referenced retained search, in desired response order. They are not provider-standard IDs. Mutually exclusive with limit.
1 - 100 elementsDefaults to source:auto when omitted.
Show child attributes
Show child attributes
Maximum number of search results to fetch when result_ids is omitted, starting from rank 1. Mutually exclusive with result_ids.
1 <= x <= 100Overall deadline across all selected results.
1000 <= x <= 120000