> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mindcase.co/llms.txt
> Use this file to discover all available pages before exploring further.

# Google Videos API

> Google video search results with title, URL, source, channel, duration and published date. Search by keyword.

`POST /v1/data/google/videos/run`

**Pricing:** $0.003 per video ($3.00 per 1,000).

## Request

Send the inputs under `params`. Only the keys below are accepted; any other key returns `422 invalid_params`.

**queries** `string[]` *required*

One or more search keywords. One request reads them all.

**timeframe** `string`

Timeframe to use.

Allowed values: `hour` (Past hour), `day` (Past day), `week` (Past week), `month` (Past month), `year` (Past year).

**maxResults** `integer` (default: 50)

How many videos to return in total. Defaults to 50; use 0 for all.

## Example

```bash cURL theme={null}
curl -X POST "https://api.mindcase.co/v1/data/google/videos/run?wait=true" \
  -H "Authorization: Bearer $MINDCASE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "params": {
    "queries": [
      "rick astley never gonna give you up",
      "gangnam style",
      "米津玄師 Lemon"
    ]
  }
}'
```

```python Python theme={null}
import os, requests

r = requests.post(
    "https://api.mindcase.co/v1/data/google/videos/run",
    params={"wait": "true"},
    headers={"Authorization": f"Bearer {os.environ['MINDCASE_API_KEY']}"},
    json={"params": {
    "queries": [
        "rick astley never gonna give you up",
        "gangnam style",
        "米津玄師 Lemon"
    ]
}},
)
job = r.json()
rows = job.get("data", [])  # if job["status"] == "running", poll /v1/jobs/{job_id}/results
```

```javascript Node.js theme={null}
const r = await fetch("https://api.mindcase.co/v1/data/google/videos/run?wait=true", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.MINDCASE_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({ params: {
  "queries": [
    "rick astley never gonna give you up",
    "gangnam style",
    "米津玄師 Lemon"
  ]
} }),
});
const job = await r.json();
const rows = job.data ?? []; // if job.status === "running", poll /v1/jobs/{job_id}/results
```

## Response fields

Each row in `data` is one video, keyed by these fields.

| Field | Name | Type |
| - | - | - |
| `rank` | Rank | number |
| `title` | Title | text |
| `videoUrl` | Video URL | url |
| `source` | Source | text |
| `channel` | Channel | text |
| `durationS` | Duration S | number |
| `publishedDate` | Published Date | text |
| `snippet` | Snippet | text |
| `thumbnailUrl` | Thumbnail URL | url |

## Example response

Abridged: long text and lists are shortened.

```json theme={null}
{
  "job_id": "7f3a1c2e-0b9d-4c55-9a51-3f2e8d1b6a40",
  "agent": "google/videos",
  "status": "completed",
  "row_count": 1,
  "truncated": false,
  "data": [
    {
      "publishedDate": "Oct 25, 2009",
      "channel": "Rick Astley",
      "videoUrl": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
      "thumbnailUrl": "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcS6tvabFVndPVfIfL8N-2CSW3rxRF4vlbbDqqtjkaXSCBu31PrLQg7KQg&s",
      "rank": 1,
      "title": "Rick Astley - Never Gonna Give You Up (Official Video) (4K ...",
      "source": "YouTube",
      "snippet": "The official video for “Never Gonna Give You Up” by Rick Astley. Never: The Autobiography OUT NOW! Follow this link to get your copy and ...",
      "durationS": 214
    }
  ]
}
```

## Related APIs

For YouTube data with engagement use [`youtube/videos`](https://docs.mindcase.co/apis/youtube/videos).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.