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.
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
s | string | yes | - | The search keyword |
t | string | yes | - | Must be google_videos |
d | number | no | 5000 | Maximum time the API may spend, in milliseconds |
country | string | no | - | ISO 3166-1 alpha-2 country code (e.g. us) |
html | number | no | 0 | 1 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"] } }
}
]
}
}
| Field | Description |
|---|---|
code | 0 means success; anything else is a failure |
msg | Human readable failure reason, empty on success |
data.id | Opaque 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"])