# Google Videos API

You have to send a GET request to **`http://api.scrapingdog.com/google_videos`** with the below-given parameters.

Google Videos API pricing is available [here](https://www.scrapingdog.com/google-search-api).

| Parameter                                                          | Description                                                                                                                                                                                                                                                                                                                                            |
| ------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| <p>api\_key<br></p><p><mark style="color:red;">required</mark></p> | <p>Your personal API key. Available on your dashboard <br><br>Type: <em><strong>String</strong></em></p>                                                                                                                                                                                                                                               |
| <p>query<br></p><p><mark style="color:red;">required</mark></p>    | <p>This is a Google query.<br><br> Example1 - <strong><code>query=shoes</code></strong></p>                                                                                                                                                                                                                                                            |
| country                                                            | <p>This is the <a href="https://en.wikipedia.org/wiki/ISO_3166-1">ISO code</a> of the country from which you are seeking Google search results.<br><br>Default Value - <strong><code>us</code></strong></p><p><br>Type - <strong>String</strong></p>                                                                                                   |
| page                                                               | <p>This is the page number of Google searches. Its value can be 0 for the first page, 1 for the second page, and so on.</p><p><br>Default Value - <strong><code>0</code></strong> <br><br>Type - <strong>String</strong></p>                                                                                                                           |
| domain                                                             | <p>To obtain local results from a specific country, for example, for India, it will be "google.co.in," and for the UK, it will be "google.co.uk".<br><br>Type: <code>String</code></p><p><br>Default: <code>"google.com"</code></p>                                                                                                                    |
| language                                                           | <p>Language of the results. Possible Values - <strong><code>en</code></strong>, <strong><code>es</code></strong>, <strong><code>fr</code></strong>, <strong><code>de</code></strong>, etc. <br><br>Default Value - en<br><br>Type - <strong>String</strong></p>                                                                                        |
| lr                                                                 | <p>Limit the search to one or multiple languages. It is used as <code>lang\_{language code}</code><em>.</em> <br><br>Type: <code>String</code> <br><br>For example <em>- "</em>lang\_us"</p>                                                                                                                                                           |
| result\_time                                                       | <p>The <em><strong>"tbs"</strong></em> parameter is often accompanied by additional parameters that define specific search options. <br><br>These options can include parameters such as time range, language, country, file type, and more. <br><br>Possible Value - <strong><code>qdr:d</code></strong></p><p><br>Type - <strong>String</strong></p> |
| uule                                                               | <p>It is a parameter that specifies the geographic location or locale for which the search results should be tailored. Possible Value could be <strong><code>w+CAIQIFJlbGF5IFN0YXRlcw==</code></strong></p><p><br>Type - <strong>String</strong></p>                                                                                                   |
| tbs                                                                | <p>To be searched - An advanced parameter to filter search results.<br><br>Type: <code>String</code></p>                                                                                                                                                                                                                                               |
| safe                                                               | <p>To filter the adult content set <code>safe</code> to <code>active</code> or to disable it set <code>off</code>. <br><br>Type: String <code>\[active/off]</code></p><p><br>Default: <code>off</code></p>                                                                                                                                             |
| nfpr                                                               | <p>It can be set to <code>1</code> to exclude these results or <code>0</code> to include them. <br><br>Type: <code>Boolean</code></p><p><br>Default: <code>0</code> <br><br>It excludes the result from an auto-corrected query that is spelled wrong.</p>                                                                                             |
| html                                                               | <p>To render the response as raw HTML.</p><p><br>Type: <code>Boolean</code> <br><br>Default: <code>false</code></p>                                                                                                                                                                                                                                    |

### API Example

{% tabs %}
{% tab title="cURL" %}

```json
curl "https://api.scrapingdog.com/google_videos/?api_key=5eaa61a6e562fc52fe763tr516e4653&query=football&results=10&country=us"
```

{% endtab %}

{% tab title="Python" %}

```python
import requests

api_key = "5eaa61a6e562fc52fe763tr516e4653"
url = "https://api.scrapingdog.com/google_videos"

params = {
    "api_key": api_key,
    "query": "football",
    "results": 10,
    "country": "us"
}

response = requests.get(url, params=params)

if response.status_code == 200:
    data = response.json()
    print(data)
else:
    print(f"Request failed with status code: {response.status_code}")

```

{% endtab %}

{% tab title="Node JS" %}

```javascript
const axios = require('axios');

const api_key = '5eaa61a6e562fc52fe763tr516e4653';
const url = 'https://api.scrapingdog.com/google_videos';

const params = {
  api_key: api_key,
  query: 'football',
  results: 10,
  country: 'us'
};

axios
  .get(url, { params: params })
  .then(function (response) {
    if (response.status === 200) {
      const data = response.data;
      console.log(data)
    } else {
      console.log('Request failed with status code: ' + response.status);
    }
  })
  .catch(function (error) {
    console.error('Error making the request: ' + error.message);
  });

```

{% endtab %}

{% tab title="PHP" %}

```php
<?php

// Set the API key and request parameters
$api_key = '5eaa61a6e562fc52fe763tr516e4653';
$query = 'football';
$results = 10;
$country = 'us';

// Set the API endpoint
$url = 'https://api.scrapingdog.com/google_videos/?api_key=' . $api_key . '&query=' . $query . '&results=' . $results . '&country=' . $country;

// Initialize cURL session
$ch = curl_init($url);

// Set cURL options
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

// Execute the cURL request
$response = curl_exec($ch);

// Check if the request was successful
if ($response === false) {
    echo 'cURL error: ' . curl_error($ch);
} else {
    // Process the response data as needed
    echo $response;
}

// Close the cURL session
curl_close($ch);

```

{% endtab %}

{% tab title="Ruby" %}

```ruby
require 'net/http'
require 'uri'

# Set the API key and request parameters
api_key = '5eaa61a6e562fc52fe763tr516e4653'
query = 'football'
results = 10
country = 'us'

# Construct the API endpoint URL
url = URI.parse("https://api.scrapingdog.com/google_videos/?api_key=#{api_key}&query=#{query}&results=#{results}&country=#{country}")

# Create an HTTP GET request
request = Net::HTTP::Get.new(url)

# Create an HTTP client
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true # Enable SSL (https)

# Send the request and get the response
response = http.request(request)

# Check if the request was successful
if response.is_a?(Net::HTTPSuccess)
  puts response.body # Process the response data as needed
else
  puts "HTTP request failed with code: #{response.code}, message: #{response.message}"
end

```

{% endtab %}

{% tab title="Java" %}

```java
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.URL;
import java.io.IOException;

public class Main {
    public static void main(String[] args) {
        try {
            // Set the API key and request parameters
            String apiKey = "5eaa61a6e562fc52fe763tr516e4653";
            String query = "football";
            int results = 10;
            String country = "us";

            // Construct the API endpoint URL
            String apiUrl = "https://api.scrapingdog.com/google_videos/?api_key=" + apiKey
                    + "&query=" + query
                    + "&results=" + results
                    + "&country=" + country

            // Create a URL object from the API URL string
            URL url = new URL(apiUrl);

            // Open a connection to the URL
            HttpURLConnection connection = (HttpURLConnection) url.openConnection();

            // Set the request method to GET
            connection.setRequestMethod("GET");

            // Get the response code
            int responseCode = connection.getResponseCode();

            if (responseCode == 200) {
                // Read the response from the connection
                BufferedReader reader = new BufferedReader(new InputStreamReader(connection.getInputStream()));
                String inputLine;
                StringBuilder response = new StringBuilder();

                while ((inputLine = reader.readLine()) != null) {
                    response.append(inputLine);
                }
                reader.close();

                // Process the response data as needed
                System.out.println(response.toString());
            } else {
                System.out.println("HTTP request failed with response code: " + responseCode);
            }

            // Close the connection
            connection.disconnect();
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}
```

{% endtab %}
{% endtabs %}

### Response

```json
{
  "video_results": [
    {
      "title": "NFL \"Backyard Football\" Moments - YouTube",
      "thumbnail": "data:image/gif;base64,R0lGODlhAQABAIAAAP///////yH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",
      "link": "https://www.youtube.com/watch?v=ET0G1FYxWqc",
      "displayed_link": "www.youtube.com › watch",
      "time": "14:04",
      "rank": "1"
    },
    {
      "title": "First NFL Africa Camp gives young athletes chance to show off ...",
      "thumbnail": "data:image/gif;base64,R0lGODlhAQABAIAAAP///////yH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",
      "link": "https://www.nfl.com/news/first-nfl-africa-camp-gives-young-athletes-chance-to-show-off-football-skills",
      "displayed_link": "www.nfl.com › news › first-nfl-africa-camp-gives-young-...",
      "time": "",
      "rank": "2"
    },
    {
      "title": "£10 vs £4,000 Football (WORLD'S MOST EXPENSIVE ...",
      "thumbnail": "data:image/gif;base64,R0lGODlhAQABAIAAAP///////yH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",
      "link": "https://www.youtube.com/watch?v=WIOz9svLs_U",
      "displayed_link": "www.youtube.com › watch",
      "time": "17:12",
      "rank": "3"
    },
    {
      "title": "Sky Sports Football - YouTube",
      "link": "https://www.youtube.com/channel/UCNAf1k0yIjyGu3k9BwAg3lg",
      "displayed_link": "www.youtube.com › channel",
      "time": "",
      "rank": "4"
    },
    {
      "title": "Revenge Moments in Football - YouTube",
      "thumbnail": "data:image/gif;base64,R0lGODlhAQABAIAAAP///////yH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",
      "link": "https://www.youtube.com/watch?v=z7WzDlanZmg",
      "displayed_link": "www.youtube.com › watch",
      "time": "8:41",
      "rank": "5"
    },
    {
      "title": "Texas skyrockets into top 10 after landing Arch Manning - ESPN",
      "thumbnail": "data:image/gif;base64,R0lGODlhAQABAIAAAP///////yH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",
      "link": "https://www.espn.com/college-football/insider/story/_/id/34136150/2023-college-football-recruiting-class-rankings-texas-skyrockets-top-10-landing-arch-manning",
      "displayed_link": "www.espn.com › college-football › insider › story › 2023...",
      "time": "2:13",
      "rank": "6"
    },
    {
      "title": "1 in a Trillion Football Moments - YouTube",
      "thumbnail": "data:image/gif;base64,R0lGODlhAQABAIAAAP///////yH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",
      "link": "https://www.youtube.com/watch?v=HL8Er3cP2b4&vl=en",
      "displayed_link": "www.youtube.com › watch",
      "time": "6:32",
      "rank": "7"
    },
    {
      "title": "Financial Football - Practical Money Skills",
      "thumbnail": "data:image/gif;base64,R0lGODlhAQABAIAAAP///////yH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",
      "link": "https://www.practicalmoneyskills.com/play/financial_football",
      "displayed_link": "www.practicalmoneyskills.com › play › financial_footb...",
      "time": "1:21",
      "rank": "8"
    },
    {
      "title": "PFT Mailbag: Can Deshaun Watson save his reputation?",
      "thumbnail": "data:image/gif;base64,R0lGODlhAQABAIAAAP///////yH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",
      "link": "https://www.youtube.com/watch?v=1xqZaDt0j1E",
      "displayed_link": "www.youtube.com › watch",
      "time": "11:36",
      "rank": "9"
    },
    {
      "title": "Chelsea must learn from Man United mistakes when replacing ...",
      "thumbnail": "data:image/gif;base64,R0lGODlhAQABAIAAAP///////yH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",
      "link": "https://www.espn.com/soccer/chelsea-engchelsea/story/4689969/chelsea-must-learn-from-man-united-mistakes-when-replacing-marina-granovskaiathe-most-powerful-woman-in-football",
      "displayed_link": "www.espn.com › soccer › chelsea-engchelsea › story › ch...",
      "time": "1:32",
      "rank": "10"
    }
  ],
  "pagination": {
    "current": "1",
    "next": "https://www.google.com/search?q=football&lr=&hl=en&gl=us&tbm=vid&ei=pJq4YtPiFvahiLMP7eyOmAI&start=10&sa=N&ved=2ahUKEwjTxJqt1cv4AhX2EGIAHW22AyMQ8NMDegQIARBg",
    "page_no": {
      "2": "https://www.google.com/search?q=football&lr=&hl=en&gl=us&tbm=vid&ei=pJq4YtPiFvahiLMP7eyOmAI&start=10&sa=N&ved=2ahUKEwjTxJqt1cv4AhX2EGIAHW22AyMQ8tMDegQIARBO",
      "3": "https://www.google.com/search?q=football&lr=&hl=en&gl=us&tbm=vid&ei=pJq4YtPiFvahiLMP7eyOmAI&start=20&sa=N&ved=2ahUKEwjTxJqt1cv4AhX2EGIAHW22AyMQ8tMDegQIARBQ",
      "4": "https://www.google.com/search?q=football&lr=&hl=en&gl=us&tbm=vid&ei=pJq4YtPiFvahiLMP7eyOmAI&start=30&sa=N&ved=2ahUKEwjTxJqt1cv4AhX2EGIAHW22AyMQ8tMDegQIARBS",
      "5": "https://www.google.com/search?q=football&lr=&hl=en&gl=us&tbm=vid&ei=pJq4YtPiFvahiLMP7eyOmAI&start=40&sa=N&ved=2ahUKEwjTxJqt1cv4AhX2EGIAHW22AyMQ8tMDegQIARBU",
      "6": "https://www.google.com/search?q=football&lr=&hl=en&gl=us&tbm=vid&ei=pJq4YtPiFvahiLMP7eyOmAI&start=50&sa=N&ved=2ahUKEwjTxJqt1cv4AhX2EGIAHW22AyMQ8tMDegQIARBW",
      "7": "https://www.google.com/search?q=football&lr=&hl=en&gl=us&tbm=vid&ei=pJq4YtPiFvahiLMP7eyOmAI&start=60&sa=N&ved=2ahUKEwjTxJqt1cv4AhX2EGIAHW22AyMQ8tMDegQIARBY",
      "8": "https://www.google.com/search?q=football&lr=&hl=en&gl=us&tbm=vid&ei=pJq4YtPiFvahiLMP7eyOmAI&start=70&sa=N&ved=2ahUKEwjTxJqt1cv4AhX2EGIAHW22AyMQ8tMDegQIARBa",
      "9": "https://www.google.com/search?q=football&lr=&hl=en&gl=us&tbm=vid&ei=pJq4YtPiFvahiLMP7eyOmAI&start=80&sa=N&ved=2ahUKEwjTxJqt1cv4AhX2EGIAHW22AyMQ8tMDegQIARBc",
      "10": "https://www.google.com/search?q=football&lr=&hl=en&gl=us&tbm=vid&ei=pJq4YtPiFvahiLMP7eyOmAI&start=90&sa=N&ved=2ahUKEwjTxJqt1cv4AhX2EGIAHW22AyMQ8tMDegQIARBe"
    }
  },
  "scrapingdog_pagination": {
    "current": "1",
    "page_no": {
      "2": "https://api.scrapingdog.com/videos?api_key=APIKEY&q=football&gl=us&start=10",
      "3": "https://api.scrapingdog.com/videos?api_key=APIKEY&q=football&gl=us&start=20",
      "4": "https://api.scrapingdog.com/videos?api_key=APIKEY&q=football&gl=us&start=30",
      "5": "https://api.scrapingdog.com/videos?api_key=APIKEY&q=football&gl=us&start=40",
      "6": "https://api.scrapingdog.com/videos?api_key=APIKEY&q=football&gl=us&start=50",
      "7": "https://api.scrapingdog.com/videos?api_key=APIKEY&q=football&gl=us&start=60",
      "8": "https://api.scrapingdog.com/videos?api_key=APIKEY&q=football&gl=us&start=70",
      "9": "https://api.scrapingdog.com/videos?api_key=APIKEY&q=football&gl=us&start=80",
      "10": "https://api.scrapingdog.com/videos?api_key=APIKEY&q=football&gl=us&start=90"
    }
  }
}
```
