Bing

Bing can be targeted either using direct URL or by using the query parameter to the Bing search bar.

bing

Parseable: Yes
Required parameters: url
Optional parameters: geo (City,Region,Country), device_type, session_id

Retrieve Bing search engine results page by supplying a full Bing URL to the url parameter. In this case, additional parameters can be specified in the URL itself.

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

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

username = 'SPusername'
password = 'SPpassword'

response = requests.post(
    'https://scraper-api.smartproxy.com/v2/scrape',
    json = task_params,
    auth = (username, password)
)

print(response.text)
<?php

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

$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, 'https://scraper-api.smartproxy.com/v2/scrape');
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);
?>

bing_search

Parseable: Yes
Required parameters: query
Optional parameters: domain, page_from, num_pages, locale, geo (City,Region,Country), device_type, session_id

Retrieve HTML from Bing search engine results page by supplying your query to the query parameter.

curl -u SPusername:SPpassword -X POST --url https://scraper-api.smartproxy.com/v2/scrape -H "Content-Type: application/json" -d "{\"target\": \"bing_search\", \"query\": \"history\", \"parse\": \"true\"}"
import requests

task_params = {
    'target': 'bing_search',
    'query': 'history',
    'parse': true
}

username = 'SPusername'
password = 'SPpassword'

response = requests.post(
    'https://scraper-api.smartproxy.com/v2/scrape',
    json = task_params,
    auth = (username, password)
)

print(response.text)
<?php

$params = array(
    'target' => 'bing_search',
    'query' => 'history',
    'parse' => true
);

$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, 'https://scraper-api.smartproxy.com/v2/scrape');
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);
?>