Google

Google can be scraped using multiple different targets, including the Google search bar, direct URL, or more specific targets like Google suggest, Google ads, etc.

Below you will find every target, whether it can be parsed to JSON, its required parameters, and ready to use code examples for cURL, Python and PHP, where you only need to change the username and password for your SERP Scraping API user for the code to work.

For available parameters, you can refer to Parameters.

Target: google_search (parseable)
Required parameters: query (history in this example)
Optional parameters: domain, page_from, num_pages, locale, geo, device_type, parse, google_nfpr, google_results_language, google_tbm, google_tbs, google_safe_search

For this target, you need to supply the query parameter, which is what you would type in the Google search bar.

curl -u SPusername:SPpassword -X POST --url https://scrape.smartproxy.com/v1/tasks -H "Content-Type: application/json" -d "{\"target\": \"google_search\", \"query\": \"history\", \"parse\": \"true\", \"geo\": \"London,England,United Kingdom\"}"
import requests

task_params = {
    'target': 'google_search',
    'query': 'history',
    'parse': True,
    'geo': 'London,England,United Kingdom'
}

username = 'SPusername'
password = 'SPpassword'

response = requests.post(
    'https://scrape.smartproxy.com/v1/tasks',
    json = task_params,
    auth = (username, password)
)

print(response.text)
<?php

$params = array(
    'target' => 'google_search',
    'query' => 'history',
    'parse' => True,
    'geo' => 'London,England,United Kingdom'
);

$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, 'https://scrape.smartproxy.com/v1/tasks');
curl_setopt($ch, CURLOPT_USERPWD, 'SPusername' . ':' . 'SPpassword');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($params));
curl_setopt($ch, CURLOPT_POST, 1);

$headers = array();
$headers[] = 'Content-Type: application/json';
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);

$result = curl_exec($ch);
echo $result;

if (curl_errno($ch)) {
    echo 'Error:' . curl_error($ch);
}
curl_close ($ch);
?>
685685

Result of the code and screenshot above:

"organic": [
  {
    "pos": 1,
    "url": "https://myactivity.google.com/",
    "desc": "Welcome to My Activity. Data helps make Google services more useful for you. Sign in to review and manage your activity, including things you've searched ...",
    "title": "Welcome to My Activity",
    "sitelinks": {
      "expanded": [
        {
          "url": "https://support.google.com/accounts/answer/7028918?hl=en&co=GENIE.Platform%3DAndroid",
          "title": "Android - Google Account Help"
        },
        {
          "url": "https://myactivity.google.com/lite",
          "title": "Use your Google Account"
        }
      ]
    },
    "url_shown": "https://myactivity.google.com",
    "pos_overall": 1
  },
  {
    "pos": 2,
    "url": "https://en.wikipedia.org/wiki/History",
    "desc": "History (from Greek ἱστορία, historia, meaning \"inquiry; knowledge acquired by investigation\") is the study and the documentation of the past.",
    "title": "History - Wikipedia",
    "url_shown": "https://en.wikipedia.org› wiki › History",
    "pos_overall": 11
  }
{
  "results": [
    {
      "content": {
        "url": "https://www.google.com/search?q=history&lr=lang_en&nfpr=1&hl=en",
        "page": 1,
        "results": {
          "paid": [],
          "videos": [
            {
              "url": "https://www.youtube.com/watch?v=gajqdrpNeHE",
              "title": "History of London",
              "author": "New London Architecture",
              "source": "3 Aug 2015",
              "key_moments": [
                {
                  "desc": "History of London",
                  "timestamp": "00:12"
                },
                {
                  "desc": "Medieval City of London",
                  "timestamp": "01:18"
                },
                {
                  "desc": "Georgian London",
                  "timestamp": "02:12"
                },
                {
                  "desc": "The 19th Century",
                  "timestamp": "02:21"
                }
              ],
              "pos_overall": 8
            },
            {
              "url": "https://www.youtube.com/watch?v=hRVfCplkKq4",
              "title": "Olivia Holt - History (Official Video)",
              "author": "OliviaHoltVEVO",
              "source": "21 Nov 2016",
              "pos_overall": 9
            },
            {
              "url": "https://www.youtube.com/watch?v=BeoZHGn8_HA",
              "title": "The history of the Red Army (2/2) | DW Documentary",
              "author": "DW Documentary",
              "source": "2 days ago",
              "pos_overall": 10
            }
          ],
          "organic": [
            {
              "pos": 1,
              "url": "https://myactivity.google.com/",
              "desc": "Welcome to My Activity. Data helps make Google services more useful for you. Sign in to review and manage your activity, including things you've searched ...",
              "title": "Welcome to My Activity",
              "sitelinks": {
                "expanded": [
                  {
                    "url": "https://support.google.com/accounts/answer/7028918?hl=en&co=GENIE.Platform%3DAndroid",
                    "title": "Android - Google Account Help"
                  },
                  {
                    "url": "https://myactivity.google.com/lite",
                    "title": "Use your Google Account"
                  }
                ]
              },
              "url_shown": "https://myactivity.google.com",
              "pos_overall": 1
            },
            {
              "pos": 2,
              "url": "https://en.wikipedia.org/wiki/History",
              "desc": "History (from Greek ἱστορία, historia, meaning \"inquiry; knowledge acquired by investigation\") is the study and the documentation of the past.",
              "title": "History - Wikipedia",
              "url_shown": "https://en.wikipedia.org› wiki › History",
              "pos_overall": 11
            },
            {
              "pos": 3,
              "url": "https://www.history.co.uk/",
              "desc": "Find out more about the shows on Sky HISTORY's TV channel, with plenty to read and watch on your favourite historical topics.",
              "title": "Homepage | Sky HISTORY UK TV Channel",
              "url_shown": "https://www.history.co.uk",
              "pos_overall": 12
            },
            {
              "pos": 4,
              "url": "https://support.google.com/chrome/answer/95589?hl=en-GB&co=GENIE.Platform%3DAndroid",
              "desc": "At the top right, tap More More and then History. If your address bar is at the bottom, swipe up on the address bar. Tap History History · To visit a site, tap ...",
              "title": "View and delete your Chrome browsing history - Android",
              "url_shown": "https://support.google.com› chrome › answer",
              "pos_overall": 13
            },
            {
              "pos": 5,
              "url": "https://www.nhm.ac.uk/",
              "desc": "Book tickets. Explore our galleries, science, news, videos and amazing images. South Kensington Tube. London, UK.",
              "title": "Natural History Museum: Home",
              "url_shown": "https://www.nhm.ac.uk",
              "pos_overall": 14
            },
            {
              "pos": 6,
              "url": "https://www.history.ac.uk/",
              "desc": "The Institute of Historical Research is the UK's national centre for history, dedicated to supporting historians of all kinds. 2021 is the centenary of the ...",
              "title": "Institute of Historical Research",
              "url_shown": "https://www.history.ac.uk",
              "pos_overall": 15
            },
            {
              "pos": 7,
              "url": "https://www.historytoday.com/",
              "desc": "History Today is the world's leading serious history magazine. Read our monthly articles, features and reviews. Subscriptions to print, archive and digital ...",
              "title": "History Today | The World's Leading Serious History Magazine",
              "url_shown": "https://www.historytoday.com",
              "pos_overall": 16
            }
          ],
          "twitter": [
            {
              "pos": 1,
              "url": "https://twitter.com/HISTORY",
              "title": "",
              "tweets": [
                {
                  "url": "https://twitter.com/HISTORY/status/1518400147067076608?ref_src=twsrc%5Egoogle%7Ctwcamp%5Eserp%7Ctwgr%5Etweet",
                  "content": "How it started vs. How it's going",
                  "timeframe": "9 hours ago"
                },
                {
                  "url": "https://twitter.com/HISTORY/status/1518349252853788672?ref_src=twsrc%5Egoogle%7Ctwcamp%5Eserp%7Ctwgr%5Etweet",
                  "content": "We're getting hungry! \nDon't miss a delicious new episode of The Food That Built America, TONIGHT at 9/8c",
                  "timeframe": "13 hours ago"
                },
                {
                  "url": "https://twitter.com/HISTORY/status/1518245939953094656?ref_src=twsrc%5Egoogle%7Ctwcamp%5Eserp%7Ctwgr%5Etweet",
                  "content": "The Library of Congress was established on #ThisDayInHistory in 1800 when President John Adams approved legislation appropriating $5,000 to purchase “such books as may be necessary for the use of Congress.” www.history.com/topics/…",
                  "timeframe": "20 hours ago"
                }
              ],
              "pos_overall": 6
            }
          ],
          "instant_answers": [
            {
              "type": "unknown",
              "_parsed": false,
              "pos_overall": 7
            }
          ],
          "related_searches": {
            "pos_overall": 20,
            "related_searches": [
              "my history",
              "history google",
              "search history",
              "delete history",
              "history chrome",
              "history of the world",
              "history youtube"
            ]
          },
          "related_questions": [
            {
              "pos": 1,
              "search": {
                "url": "/search?lr=lang_en&nfpr=1&hl=en&q=How+do+I+see+all+my+history%3F&sa=X&ved=2ahUKEwiA563JhK_3AhWGGLkGHV8jAdgQzmd6BAgeEAU",
                "title": "How do I see all my history?"
              },
              "source": {
                "url": "https://support.google.com/chrome/answer/95589?hl=en&co=GENIE.Platform%3DAndroid",
                "title": "View & delete your Chrome browsing history - Android - Google Support",
                "url_shown": "https://support.google.com › chrome › answer"
              },
              "question": "How do I see all my history?",
              "pos_overall": 2
            },
            {
              "pos": 2,
              "search": {
                "url": "/search?lr=lang_en&nfpr=1&hl=en&q=How+can+I+delete+history%3F&sa=X&ved=2ahUKEwiA563JhK_3AhWGGLkGHV8jAdgQzmd6BAgbEAU",
                "title": "How can I delete history?"
              },
              "source": {
                "url": "https://support.google.com/chrome/answer/95589?hl=en&co=GENIE.Platform%3DDesktop",
                "title": "View & delete your Chrome browsing history - Computer - Google Help",
                "url_shown": "https://support.google.com › chrome › answer"
              },
              "question": "How can I delete history?",
              "pos_overall": 3
            },
            {
              "pos": 3,
              "answer": "On the left navigation panel, click Data & privacy. Under \"History settings,\" click My Activity. To view your activity: Browse your activity, organized by day and time.",
              "search": {
                "url": "/search?lr=lang_en&nfpr=1&hl=en&q=Can+I+see+my+Google+search+history%3F&sa=X&ved=2ahUKEwiA563JhK_3AhWGGLkGHV8jAdgQzmd6BAgdEAU",
                "title": "Can I see my Google search history?"
              },
              "source": {
                "url": "https://support.google.com/accounts/answer/7028918?hl=en&co=GENIE.Platform%3DDesktop",
                "title": "View & control activity in your account - Computer - Google Support",
                "url_shown": "https://support.google.com › accounts › answer"
              },
              "question": "Can I see my Google search history?",
              "pos_overall": 4
            },
            {
              "pos": 4,
              "answer": "In any Chrome window, use the keyboard shortcut Ctrl+H, or navigate to the URL chrome://history . Or, click the Menu button, which is located near the top-right side of the browser window, and choose History, then History again.22 May 2017",
              "search": {
                "url": "/search?lr=lang_en&nfpr=1&hl=en&q=Can+I+see+my+history%3F&sa=X&ved=2ahUKEwiA563JhK_3AhWGGLkGHV8jAdgQzmd6BAgcEAU",
                "title": "Can I see my history?"
              },
              "source": {
                "url": "https://www.telegraph.co.uk/technology/0/view-delete-browser-history/",
                "title": "How to view and delete your browser history - The Telegraph",
                "url_shown": "https://www.telegraph.co.uk › technology › view-delete-b..."
              },
              "question": "Can I see my history?",
              "pos_overall": 5
            }
          ],
          "search_information": {
            "query": "history",
            "showing_results_for": "history",
            "total_results_count": 5260000000
          },
          "total_results_count": 5260000000,
          "related_searches_categorized": [
            {
              "category": {
                "name": "Browser history",
                "type": "collapsed"
              },
              "pos_overall": 17
            },
            {
              "category": {
                "name": "Types of history",
                "type": "collapsed"
              },
              "pos_overall": 18
            },
            {
              "category": {
                "name": "History and historian",
                "type": "collapsed"
              },
              "pos_overall": 19
            }
          ]
        },
        "last_visible_page": 10,
        "parse_status_code": 12000
      },
      "url": "https://www.google.com/search?q=history&lr=lang_en&nfpr=1&hl=en",
      "task_id": "6924307569175454721",
      "created_at": "2022-04-25 10:46:11",
      "updated_at": "2022-04-25 10:46:19"
    }
  ]
}

Target: google (parseable)
Required parameters: url
Optional parameters: geo, device_type, parse

For this target, you need to supply a full Google URL link. In this case, additional parameters can be specified in the URL link itself.

curl -u SPusername:SPpassword -X POST --url https://scrape.smartproxy.com/v1/tasks -H "Content-Type: application/json" -d "{\"target\": \"google\", \"url\": \"https://www.google.com/search?q=history\", \"parse\": \"true\"}"
import requests

task_params = {
    'target': 'google',
    'url': 'https://www.google.com/search?q=history',
    'parse': True,
}

username = 'SPusername'
password = 'SPpassword'

response = requests.post(
    'https://scrape.smartproxy.com/v1/tasks',
    json = task_params,
    auth = (username, password)
)

print(response.text)
<?php

$params = array(
    'target' => 'google',
    'url' => 'https://www.google.com/search?q=history',
    'parse' => True
);

$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, 'https://scrape.smartproxy.com/v1/tasks');
curl_setopt($ch, CURLOPT_USERPWD, 'SPusername' . ':' . 'SPpassword');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($params));
curl_setopt($ch, CURLOPT_POST, 1);

$headers = array();
$headers[] = 'Content-Type: application/json';
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);

$result = curl_exec($ch);
echo $result;

if (curl_errno($ch)) {
    echo 'Error:' . curl_error($ch);
}
curl_close ($ch);
?>

Target: google_hotels (not parseable)
Required parameters: query
Optional parameters: domain, page_from, num_pages, locale, geo, device_type, google_nfpr, google_results_language

Returns search results from Google hotels. This target is not parseable, meaning it will return HTML.

curl -u SPusername:SPpassword -X POST --url https://scrape.smartproxy.com/v1/tasks -H "Content-Type: application/json" -d "{\"target\": \"google_hotels\", \"query\": \"hilton\", \"parse\": \"False\", \"geo\": \"London,England,United Kingdom\"}"
import requests

task_params = {
    'target': 'google_hotels',
    'query': 'hilton',
    'parse': False,
    'geo': 'London,England,United Kingdom'
}

username = 'SPusername'
password = 'SPpassword'

response = requests.post(
    'https://scrape.smartproxy.com/v1/tasks',
    json = task_params,
    auth = (username, password)
)

print(response.text)
<?php

$params = array(
    'target' => 'google_hotels',
    'query' => 'hilton',
    'parse' => False,
    'geo' => 'London,England,United Kingdom'
);

$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, 'https://scrape.smartproxy.com/v1/tasks');
curl_setopt($ch, CURLOPT_USERPWD, 'SPusername' . ':' . 'SPpassword');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($params));
curl_setopt($ch, CURLOPT_POST, 1);

$headers = array();
$headers[] = 'Content-Type: application/json';
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);

$result = curl_exec($ch);
echo $result;

if (curl_errno($ch)) {
    echo 'Error:' . curl_error($ch);
}
curl_close ($ch);
?>

Target: google_travel_hotels (not parseable)
Required parameters: query
Optional parameters: domain, page_from, locale, geo, device_type, stars: [3, 4], guests: "2", date_range: "2022-11-10,2022-11-20"

Returns hotel search results from Google Travel service in HTML.

curl -u SPusername:SPpassword -X POST --url https://scrape.smartproxy.com/v1/tasks -H "Content-Type: application/json" -d "{\"target\": \"google_travel_hotels\", \"query\": \"hilton\", \"parse\": \"False\", \"geo\": \"London,England,United Kingdom\"}"
import requests

task_params = {
    'target': 'google_travel_hotels',
    'query': 'hilton',
    'parse': False,
    'geo': 'London,England,United Kingdom'
}

username = 'SPusername'
password = 'SPpassword'

response = requests.post(
    'https://scrape.smartproxy.com/v1/tasks',
    json = task_params,
    auth = (username, password)
)

print(response.text)
<?php

$params = array(
    'target' => 'google_travel_hotels',
    'query' => 'hilton',
    'parse' => False,
    'geo' => 'London,England,United Kingdom'
);

$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, 'https://scrape.smartproxy.com/v1/tasks');
curl_setopt($ch, CURLOPT_USERPWD, 'SPusername' . ':' . 'SPpassword');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($params));
curl_setopt($ch, CURLOPT_POST, 1);

$headers = array();
$headers[] = 'Content-Type: application/json';
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);

$result = curl_exec($ch);
echo $result;

if (curl_errno($ch)) {
    echo 'Error:' . curl_error($ch);
}
curl_close ($ch);
?>

Target: google_shopping_search (parseable)
Required parameters: query
Optional parameters: domain, page_from, num_pages, locale, geo, device_type, parse

Returns results from Google Shopping search.

curl -u SPusername:SPpassword -X POST --url https://scrape.smartproxy.com/v1/tasks -H "Content-Type: application/json" -d "{\"target\": \"google_shopping_search\", \"query\": \"sneakers\", \"parse\": \"true\", \"geo\": \"London,England,United Kingdom\"}"
import requests

task_params = {
    'target': 'google_shopping_search',
    'query': 'sneakers',
    'parse': True,
    'geo': 'London,England,United Kingdom'
}

username = 'SPusername'
password = 'SPpassword'

response = requests.post(
    'https://scrape.smartproxy.com/v1/tasks',
    json = task_params,
    auth = (username, password)
)

print(response.text)
<?php

$params = array(
    'target' => 'google_shopping_search',
    'query' => 'sneakers',
    'parse' => True,
    'geo' => 'London,England,United Kingdom'
);

$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, 'https://scrape.smartproxy.com/v1/tasks');
curl_setopt($ch, CURLOPT_USERPWD, 'SPusername' . ':' . 'SPpassword');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($params));
curl_setopt($ch, CURLOPT_POST, 1);

$headers = array();
$headers[] = 'Content-Type: application/json';
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);

$result = curl_exec($ch);
echo $result;

if (curl_errno($ch)) {
    echo 'Error:' . curl_error($ch);
}
curl_close ($ch);
?>

Target: google_shopping_product (parseable)
Required parameters: query (as item ID from Google Shopping)
Optional parameters: domain, locale, geo, device_type, parse

Returns results from Google Shopping based on supplied item ID.

curl -u SPusername:SPpassword -X POST --url https://scrape.smartproxy.com/v1/tasks -H "Content-Type: application/json" -d "{\"target\": \"google_shopping_product\", \"query\": \"8129397700139936548\", \"parse\": \"true\", \"geo\": \"London,England,United Kingdom\"}"
import requests

task_params = {
    'target': 'google_shopping_product',
    'query': '8129397700139936548',
    'parse': True,
    'geo': 'London,England,United Kingdom'
}

username = 'SPusername'
password = 'SPpassword'

response = requests.post(
    'https://scrape.smartproxy.com/v1/tasks',
    json = task_params,
    auth = (username, password)
)

print(response.text)
<?php

$params = array(
    'target' => 'google_shopping_product',
    'query' => '8129397700139936548',
    'parse' => True,
    'geo' => 'London,England,United Kingdom'
);

$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, 'https://scrape.smartproxy.com/v1/tasks');
curl_setopt($ch, CURLOPT_USERPWD, 'SPusername' . ':' . 'SPpassword');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($params));
curl_setopt($ch, CURLOPT_POST, 1);

$headers = array();
$headers[] = 'Content-Type: application/json';
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);

$result = curl_exec($ch);
echo $result;

if (curl_errno($ch)) {
    echo 'Error:' . curl_error($ch);
}
curl_close ($ch);
?>

Target: google_shopping_pricing (parseable)
Required parameters: query (as item ID from Google Shopping)
Optional parameters: domain, locale, geo, device_type, parse

Returns available sellers with their price and other information for the specified item ID.

curl -u SPusername:SPpassword -X POST --url https://scrape.smartproxy.com/v1/tasks -H "Content-Type: application/json" -d "{\"target\": \"google_shopping_pricing\", \"query\": \"1487724521556311753\", \"parse\": \"true\", \"geo\": \"London,England,United Kingdom\"}"
import requests

task_params = {
    'target': 'google_shopping_pricing',
    'query': '1487724521556311753',
    'parse': True,
    'geo': 'London,England,United Kingdom'
}

username = 'SPusername'
password = 'SPpassword'

response = requests.post(
    'https://scrape.smartproxy.com/v1/tasks',
    json = task_params,
    auth = (username, password)
)

print(response.text)
<?php

$params = array(
    'target' => 'google_shopping_pricing',
    'query' => '1487724521556311753',
    'parse' => True,
    'geo' => 'London,England,United Kingdom'
);

$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, 'https://scrape.smartproxy.com/v1/tasks');
curl_setopt($ch, CURLOPT_USERPWD, 'SPusername' . ':' . 'SPpassword');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($params));
curl_setopt($ch, CURLOPT_POST, 1);

$headers = array();
$headers[] = 'Content-Type: application/json';
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);

$result = curl_exec($ch);
echo $result;

if (curl_errno($ch)) {
    echo 'Error:' . curl_error($ch);
}
curl_close ($ch);
?>

Target: google_images (not parseable)
Required parameters: query
Optional parameters: domain, page_from, locale, geo, device_type, google_nfpr, google_results_language

Returns links of images similar to the provided image link.

curl -u SPusername:SPpassword -X POST --url https://scrape.smartproxy.com/v1/tasks -H "Content-Type: application/json" -d "{\"target\": \"google_images\", \"query\": \"https://upload.wikimedia.org/wikipedia/commons/7/73/Lion_waiting_in_Namibia.jpg\", \"parse\": \"False\", \"geo\": \"London,England,United Kingdom\"}"
import requests

task_params = {
    'target': 'google_images',
    'query': 'https://upload.wikimedia.org/wikipedia/commons/7/73/Lion_waiting_in_Namibia.jpg',
    'parse': False,
    'geo': 'London,England,United Kingdom'
}

username = 'SPusername'
password = 'SPpassword'

response = requests.post(
    'https://scrape.smartproxy.com/v1/tasks',
    json = task_params,
    auth = (username, password)
)

print(response.text)
<?php

$params = array(
    'target' => 'google_images',
    'query' => 'https://upload.wikimedia.org/wikipedia/commons/7/73/Lion_waiting_in_Namibia.jpg',
    'parse' => False,
    'geo' => 'London,England,United Kingdom'
);

$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, 'https://scrape.smartproxy.com/v1/tasks');
curl_setopt($ch, CURLOPT_USERPWD, 'SPusername' . ':' . 'SPpassword');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($params));
curl_setopt($ch, CURLOPT_POST, 1);

$headers = array();
$headers[] = 'Content-Type: application/json';
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);

$result = curl_exec($ch);
echo $result;

if (curl_errno($ch)) {
    echo 'Error:' . curl_error($ch);
}
curl_close ($ch);
?>

Target: google_suggest (not parseable)
Required parameters: query, geo in ISO 2 format
Optional parameters: locale, geo, device_type

Returns Google keyword suggestions based on the supplied query.

curl -u SPusername:SPpassword -X POST --url https://scrape.smartproxy.com/v1/tasks -H "Content-Type: application/json" -d "{\"target\": \"google_suggest\", \"query\": \"world\", \"parse\": \"False\"}"
import requests

task_params = {
    'target': 'google_suggest',
    'query': 'world',
    'parse': False
}

username = 'SPusername'
password = 'SPpassword'

response = requests.post(
    'https://scrape.smartproxy.com/v1/tasks',
    json = task_params,
    auth = (username, password)
)

print(response.text)
<?php

$params = array(
    'target' => 'google_suggest',
    'query' => 'world',
    'parse' => False
);

$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, 'https://scrape.smartproxy.com/v1/tasks');
curl_setopt($ch, CURLOPT_USERPWD, 'SPusername' . ':' . 'SPpassword');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($params));
curl_setopt($ch, CURLOPT_POST, 1);

$headers = array();
$headers[] = 'Content-Type: application/json';
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);

$result = curl_exec($ch);
echo $result;

if (curl_errno($ch)) {
    echo 'Error:' . curl_error($ch);
}
curl_close ($ch);
?>

Target: google_ads (parseable)
Required parameters: query
Optional parameters: domain, page_from, num_pages, locale, geo, device_type, parse, google_nfpr, google_results_language, google_tbm, google_tbs

Returns Google search results with paid ads.

curl -u SPusername:SPpassword -X POST --url https://scrape.smartproxy.com/v1/tasks -H "Content-Type: application/json" -d "{\"target\": \"google_ads\", \"query\": \"sneakers\", \"parse\": \"true\", \"geo\": \"London,England,United Kingdom\"}"
import requests

task_params = {
    'target': 'google_ads',
    'query': 'sneakers',
    'parse': True,
    'geo': 'London,England,United Kingdom'
}

username = 'SPusername'
password = 'SPpassword'

response = requests.post(
    'https://scrape.smartproxy.com/v1/tasks',
    json = task_params,
    auth = (username, password)
)

print(response.text)
<?php

$params = array(
    'target' => 'google_ads',
    'query' => 'sneakers',
    'parse' => True,
    'geo' => 'London,England,United Kingdom'
);

$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, 'https://scrape.smartproxy.com/v1/tasks');
curl_setopt($ch, CURLOPT_USERPWD, 'SPsupport' . ':' . 'SPpassword');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($params));
curl_setopt($ch, CURLOPT_POST, 1);

$headers = array();
$headers[] = 'Content-Type: application/json';
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);

$result = curl_exec($ch);
echo $result;

if (curl_errno($ch)) {
    echo 'Error:' . curl_error($ch);
}
curl_close ($ch);
?>