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": 10,
"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": 10,
"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: 10,
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' => 10,
'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\": 10,\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\": 10,\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\": 10,\n \"timeout_ms\": 60000\n}"
response = http.request(request)
puts response.read_body{
"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
Deferred result-content retrieval is reserved but not available in this release. Requests return 404 until the retrieval implementation is shipped. 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": 10,
"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": 10,
"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: 10,
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' => 10,
'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\": 10,\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\": 10,\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\": 10,\n \"timeout_ms\": 60000\n}"
response = http.request(request)
puts response.read_body{
"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.
100Defaults 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 <= 120000Response
Bad Request – invalid input
Application-specific error code (machine-readable)
"bad_request"
Human-readable error description for debugging
"Missing required field: app_name"
Additional error details (for multiple errors)
Show child attributes
Show child attributes
Show child attributes
Show child attributes