Skip to main content
POST
/
video-search
Video Search
curl --request POST \
  --url https://api.octen.ai/video-search \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "inputs": [
    {
      "type": "text",
      "data": "how to make sourdough bread at home"
    }
  ],
  "count": 5
}
'
import requests

url = "https://api.octen.ai/video-search"

payload = {
"inputs": [
{
"type": "text",
"data": "how to make sourdough bread at home"
}
],
"count": 5
}
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({
inputs: [{type: 'text', data: 'how to make sourdough bread at home'}],
count: 5
})
};

fetch('https://api.octen.ai/video-search', 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.octen.ai/video-search",
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([
'inputs' => [
[
'type' => 'text',
'data' => 'how to make sourdough bread at home'
]
],
'count' => 5
]),
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.octen.ai/video-search"

payload := strings.NewReader("{\n \"inputs\": [\n {\n \"type\": \"text\",\n \"data\": \"how to make sourdough bread at home\"\n }\n ],\n \"count\": 5\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.octen.ai/video-search")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"inputs\": [\n {\n \"type\": \"text\",\n \"data\": \"how to make sourdough bread at home\"\n }\n ],\n \"count\": 5\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.octen.ai/video-search")

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 \"inputs\": [\n {\n \"type\": \"text\",\n \"data\": \"how to make sourdough bread at home\"\n }\n ],\n \"count\": 5\n}"

response = http.request(request)
puts response.read_body
{
  "request_id": "20260627120000001ABCDE12345",
  "data": {
    "results": [
      {
        "title": "How to Make Sourdough Bread at Home (Beginner's Guide)",
        "url": "https://videos.example.com/watch/sourdough-beginners-guide.mp4",
        "source_page": "https://www.example.com/blog/sourdough-beginners-guide",
        "description": "A step-by-step beginner tutorial covering starter feeding, autolyse, stretch-and-fold, shaping, and baking in a Dutch oven.",
        "cover_url": "https://cdn.example.com/thumbs/sourdough-beginners-guide.jpg",
        "duration_seconds": 842,
        "authors": "The Home Baker",
        "time_published": "2026-02-14T09:30:00Z",
        "time_last_crawled": "2026-06-20T11:02:18Z"
      },
      {
        "title": "Easy No-Knead Sourdough for Beginners",
        "url": "https://videos.example.com/watch/no-knead-sourdough.mp4",
        "source_page": "https://www.example.com/recipes/no-knead-sourdough",
        "description": "Demonstrates a simplified no-knead method, from mixing a high-hydration dough to scoring and baking a crusty loaf in a home oven.",
        "cover_url": "https://cdn.example.com/thumbs/no-knead-sourdough.jpg",
        "duration_seconds": 615,
        "authors": "Everyday Sourdough",
        "time_published": "2026-01-28T17:45:00Z",
        "time_last_crawled": "2026-06-19T22:14:55Z"
      }
    ]
  },
  "meta": {
    "usage": {
      "num_search_queries": 1
    },
    "latency": 482
  }
}
{
"code": 400,
"msg": "Missing parameter inputs"
}
{
"code": 401,
"msg": "Invalid API Key"
}
{
"code": 403,
"msg": "Insufficient balance in account"
}
{
"code": 429,
"msg": "Exceeding the rate limit"
}
{
"code": 500,
"msg": "Internal error"
}

Authorizations

Authorization
string
header
required

Bearer token used for request authentication. Alternatively, you can send the API key in the x-api-key header. Note: A payment method is required to use the API.

Body

application/json

Request body for the Video Search API.

inputs
object[]
required

Input array carrying a text query (at most 1).

Maximum array length: 1
count
integer
default:5

Number of results to return.

Required range: 1 <= x <= 10
time_range
enum<string>

Relative time window counting back from the current time, filtered by publish time. Mutually exclusive with start_time/end_time — if both are provided, start_time/end_time take precedence.

Available options:
day,
week,
month,
year,
d,
w,
m,
y
start_time
string<date-time>

Start time for filtering results by publish time. ISO 8601 format.

Example:

"2025-01-01T00:00:00+08:00"

end_time
string<date-time>

End time for filtering results by publish time. ISO 8601 format.

Example:

"2025-01-01T00:00:00+08:00"

safesearch
enum<string>
default:strict

Controls filtering of explicit/adult content. off disables filtering; strict drops all adult content.

Available options:
off,
strict

Response

Successful video search response

request_id
string

The unique identifier for this request.

data
object

The main response payload.

meta
object

Additional metadata for the Video Search request.