Skip to content

Google Videos API

Query Google Videos and receive structured video results across YouTube and other sources.

Endpoint

POST https://serpforai.dev/api/v1/search
GET  https://serpforai.dev/api/v1/search

Authentication is a bearer header carrying your API key:

Authorization: Bearer <userKey>

Set t: "google_videos". This is one of five Google vertical engines available on this API - see also Google Images, Google Shopping, Google Short Videos and Google News. For general web search use the SERP API.

Request parameters

POST requests send JSON; GET requests send the same fields as query parameters.

FieldTypeRequiredDefaultDescription
sstringyes-The search keyword
tstringyes-Must be google_videos
dnumberno5000Maximum time the API may spend, in milliseconds
countrystringno-ISO 3166-1 alpha-2 country code (e.g. us)
htmlnumberno01 includes the raw result-page HTML alongside data, 0 omits it

There is no p (page) parameter for this engine.

Response

{
  "code": 0,
  "msg": "",
  "data": {
    "id": "q_...",
    "video_results": [
      {
        "position": 1,
        "title": "...",
        "link": "https://...",
        "snippet": "...",
        "displayed_link": "example.com › watch",
        "duration": "12:34",
        "rich_snippet": { "top": { "extensions": ["Example Platform", "3 days ago"] } }
      }
    ]
  }
}
FieldDescription
code0 means success; anything else is a failure
msgHuman readable failure reason, empty on success
data.idOpaque search-session id
data.video_results[]Video rows - position, title, link, snippet, displayed_link, duration, optional rich_snippet.top.extensions[]

Unlike bing/google, data here is an object, not a bare array - read data.video_results, not data directly.

Example

curl -X POST https://serpforai.dev/api/v1/search \
  -H "Authorization: Bearer $SERPFORAI_KEY" \
  -H "Content-Type: application/json" \
  -d '{"s":"how to make espresso","t":"google_videos","country":"us"}'
import httpx

response = httpx.post(
    "https://serpforai.dev/api/v1/search",
    headers={"Authorization": f"Bearer {API_KEY}"},
    json={"s": "how to make espresso", "t": "google_videos", "country": "us"},
    timeout=30,
)
payload = response.json()
for row in payload["data"]["video_results"]:
    print(row["title"], row["link"])