├── LICENSE ├── README.md ├── nodejs ├── baidusearch.js ├── baidusearchquery.js ├── bingsearch.js ├── bingsearchquery.js ├── googleads.js ├── googlehotels.js ├── googleimages.js ├── googlesearch.js ├── googlesearchurl.js ├── googleshopping.js ├── googleshoppingpricing.js ├── googleshoppingproduct.js ├── googlesuggest.js ├── googletravel.js ├── googletrendsexplore.js ├── yandexsearch.js └── yandexsearchquery.js ├── php ├── baidusearch.php ├── baidusearchquery.php ├── bingsearch.php ├── bingsearchquery.php ├── googleads.php ├── googlehotels.php ├── googleimages.php ├── googlesearch.php ├── googlesearchurl.php ├── googleshopping.php ├── googleshoppingpricing.php ├── googleshoppingproduct.php ├── googlesuggest.php ├── googletravel.php ├── googletrendsexplore.php ├── yandexsearch.php └── yandexsearchquery.php └── python ├── baidusearch.py ├── baidusearchquery.py ├── bingsearch.py ├── bingsearchquery.py ├── googleads.py ├── googlehotels.py ├── googleimages.py ├── googlesearch.py ├── googlesearchurl.py ├── googleshopping.py ├── googleshoppingpricing.py ├── googleshoppingproduct.py ├── googlesuggest.py ├── googletravel.py ├── googletrendsexplore.py ├── yandexsearch.py └── yandexsearchquery.py /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2022 Smartproxy 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 2 | # SERP Scraping API 3 | 4 |
7 | 8 | [](https://discord.gg/sCr34yVDVB) 9 | 10 | ## List of contents 11 | - [Introduction](#introduction) 12 | - [Authentication](#authentication) 13 | - [Google](#google) 14 | - [Baidu](#baidu) 15 | - [Bing](#bing) 16 | - [Yandex](#yandex) 17 | - [Parameters](#parameters) 18 | - [Targets](#targets) 19 | - [Languages](#languages) 20 | - [Response Codes](#response-codes) 21 | - [Postman Collection](#postman-collection) 22 | - [License](#license) 23 | 24 | ## Introduction 25 | 26 | With [our SERP Scraping API](https://smartproxy.com/scraping/serp 27 | ), you can scrape all popular search engines. Most notably and in depth, Google, but also Baidu, Bing, and Yandex. 28 | 29 | ## Authentication 30 | 31 | Once you have an active SERP subscription, you can try sending a request right from the dashboard SERP > Authentication method tab simply by entering your username, password, and clicking on Generate. You will also see an example of curl request generated right below your entered ``` user:pass. ``` 32 | 33 | Note that this is only an example with preset values to get you on the right track for forming your own request, meaning you will not be able to change the request values in the dashboard itself – that will have to be done in your code. 34 | 35 | 36 | 37 | ## Google 38 | 39 | 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. 40 | 41 | 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. 42 | 43 | For available parameters, you can refer to [Parameters](#parameters). 44 | 45 | ### Google Search 46 | 47 | API Link: https://scraper-api.smartproxy.com/v2/scrape 48 | 49 | ```http 50 | POST /scrape 51 | ``` 52 | 53 | ### Target: ```google_search``` (parseable) 54 | Required parameters: ```query``` (history in this example) 55 | 56 | | Parameter | Type | Description | 57 | | :-------- | :------- | :------------------------- | 58 | | `query` | `string` | Google Search query | 59 | | `target` | `url` | Scraping target | 60 | 61 | ### Response 62 | 63 | First 2 organic results 64 | ```http 65 | "organic": [ 66 | { 67 | "pos": 1, 68 | "url": "https://www.worldbank.org/en/home", 69 | "desc": "With 189 member countries, the World Bank Group is a unique global partnership fighting poverty worldwide through sustainable solutions.", 70 | "title": "World Bank Group - International Development, Poverty ...", 71 | "url_shown": "https://www.worldbank.org› ...", 72 | "pos_overall": 2 73 | }, 74 | { 75 | "pos": 2, 76 | "url": "https://www.who.int/", 77 | "desc": "WHO's primary role is to direct international health within the United Nations' system and to lead partners in global health responses.", 78 | "title": "WHO | World Health Organization", 79 | "url_shown": "https://www.who.int", 80 | "pos_overall": 3 81 | } 82 | 83 | ``` 84 | ### Examples 85 | 86 | | Programming Language | Example location | Download | 87 | | -------------------- | ------------------------ | -------- | 88 | | Python | [python/googlesearch.py](https://github.com/Smartproxy/SERP-Scraping-API/blob/main/python/googlesearch.py) |``` curl https://raw.githubusercontent.com/Smartproxy/SERP-Scraping-API/main/python/googlesearch.py > googlesearch.py ``` | 89 | | PHP | [php/googlesearch.php](https://github.com/Smartproxy/SERP-Scraping-API/blob/main/php/googlesearch.php) | ``` curl https://raw.githubusercontent.com/Smartproxy/SERP-Scraping-API/main/php/googlesearch.php > googlesearch.php ``` | 90 | | Node.js | [nodejs/googlesearch.js](https://github.com/Smartproxy/SERP-Scraping-API/blob/main/nodejs/googlesearch.js) | ``` curl https://raw.githubusercontent.com/Smartproxy/SERP-Scraping-API/main/nodejs/googlesearch.js > googlesearch.js ``` | 91 | 92 | ### Target: ```google``` (parseable) 93 | Required parameters: ```url``` 94 | 95 | | Parameter | Type | Description | 96 | | :-------- | :------- | :------------------------- | 97 | | `url` | `url` | Google Search URL | 98 | | `target` | `url` | Scraping target | 99 | 100 | ### Examples 101 | 102 | | Programming Language | Example location | Download | 103 | | -------------------- | ------------------------ | -------- | 104 | | Python | [python/googlesearchurl.py](https://github.com/Smartproxy/SERP-Scraping-API/blob/main/python/googlesearchurl.py) |``` curl https://raw.githubusercontent.com/Smartproxy/SERP-Scraping-API/main/python/googlesearchurl.py > googlesearchurl.py ``` | 105 | | PHP | [php/googlesearchurl.php](https://github.com/Smartproxy/SERP-Scraping-API/blob/main/php/googlesearchurl.php) | ``` curl https://raw.githubusercontent.com/Smartproxy/SERP-Scraping-API/main/php/googlesearchurl.php > googlesearchurl.php ``` | 106 | | Node.js | [nodejs/googlesearchurl.js](https://github.com/Smartproxy/SERP-Scraping-API/blob/main/nodejs/googlesearchurl.js) | ``` curl https://raw.githubusercontent.com/Smartproxy/SERP-Scraping-API/main/nodejs/googlesearchurl.js > googlesearchurl.js ``` | 107 | 108 | ### Target: ```google_hotels``` (not parseable) 109 | Required parameters: ```query``` 110 | 111 | Returns search results from Google hotels. This target is not parseable, meaning it will return HTML. 112 | 113 | | Parameter | Type | Description | 114 | | :-------- | :------- | :------------------------- | 115 | | `query` | `string` | Google Search query | 116 | | `target` | `url` | Scraping target | 117 | 118 | ### Examples 119 | 120 | | Programming Language | Example location | Download | 121 | | -------------------- | ------------------------ | -------- | 122 | | Python | [python/googlehotels.py](https://github.com/Smartproxy/SERP-Scraping-API/blob/main/python/googlehotels.py) |``` curl https://raw.githubusercontent.com/Smartproxy/SERP-Scraping-API/main/python/googlehotels.py > googlehotels.py ``` | 123 | | PHP | [php/googlehotels.php](https://github.com/Smartproxy/SERP-Scraping-API/blob/main/php/googlehotels.php) | ``` curl https://raw.githubusercontent.com/Smartproxy/SERP-Scraping-API/main/php/googlehotels.php > googlehotels.php ``` | 124 | | Node.js | [nodejs/googlehotels.js](https://github.com/Smartproxy/SERP-Scraping-API/blob/main/nodejs/googlehotels.js) | ``` curl https://raw.githubusercontent.com/Smartproxy/SERP-Scraping-API/main/nodejs/googlehotels.js > googlehotels.js ``` | 125 | 126 | ### Target: ```google_travel_hotels``` (not parseable) 127 | Required parameters: ```query``` 128 | 129 | Returns hotel search results from Google Travel service in HTML. 130 | 131 | | Parameter | Type | Description | 132 | | :-------- | :------- | :------------------------- | 133 | | `query` | `string` | Google Search query | 134 | | `target` | `url` | Scraping target | 135 | | `stars` | `integer` | Star rating, 1-5 stars | 136 | | `guests` | `integer` | Guest count | 137 | | `date_range` | `string` | Y-m-d,Y-m-d | 138 | 139 | ### Examples 140 | 141 | | Programming Language | Example location | Download | 142 | | -------------------- | ------------------------ | -------- | 143 | | Python | [python/googletravel.py](https://github.com/Smartproxy/SERP-Scraping-API/blob/main/python/googletravel.py) |``` curl https://raw.githubusercontent.com/Smartproxy/SERP-Scraping-API/main/python/googletravel.py > googletravel.py ``` | 144 | | PHP | [php/googletravel.php](https://github.com/Smartproxy/SERP-Scraping-API/blob/main/php/googletravel.php) | ``` curl https://raw.githubusercontent.com/Smartproxy/SERP-Scraping-API/main/php/googletravel.php > googletravel.php ``` | 145 | | Node.js | [nodejs/googletravel.js](https://github.com/Smartproxy/SERP-Scraping-API/blob/main/nodejs/googletravel.js) | ``` curl https://raw.githubusercontent.com/Smartproxy/SERP-Scraping-API/main/nodejs/googletravel.js > googletravel.js ``` | 146 | 147 | ### Target: ```google_shopping_search``` (parseable) 148 | Required parameters: ```query``` 149 | 150 | Returns results from Google Shopping search. 151 | 152 | | Parameter | Type | Description | 153 | | :-------- | :------- | :------------------------- | 154 | | `query` | `string` | Google Search query | 155 | | `target` | `url` | Scraping target | 156 | 157 | ### Examples 158 | 159 | | Programming Language | Example location | Download | 160 | | -------------------- | ------------------------ | -------- | 161 | | Python | [python/googleshopping.py](https://github.com/Smartproxy/SERP-Scraping-API/blob/main/python/googleshopping.py) |``` curl https://raw.githubusercontent.com/Smartproxy/SERP-Scraping-API/main/python/googleshopping.py > googleshopping.py ``` | 162 | | PHP | [php/googleshopping.php](https://github.com/Smartproxy/SERP-Scraping-API/blob/main/php/googleshopping.php) | ``` curl https://raw.githubusercontent.com/Smartproxy/SERP-Scraping-API/main/php/googleshopping.php > googleshopping.php ``` | 163 | | Node.js | [nodejs/googleshopping.js](https://github.com/Smartproxy/SERP-Scraping-API/blob/main/nodejs/googleshopping.js) | ``` curl https://raw.githubusercontent.com/Smartproxy/SERP-Scraping-API/main/nodejs/googleshopping.js > googleshopping.js ``` | 164 | 165 | ### Target: ```google_shopping_product``` (parseable) 166 | Required parameters: ```query``` (as item ID from Google Shopping) 167 | 168 | Returns results from Google Shopping based on supplied item ID. 169 | 170 | | Parameter | Type | Description | 171 | | :-------- | :------- | :------------------------- | 172 | | `query` | `string` | Google Search query | 173 | | `target` | `url` | Scraping target | 174 | 175 | ### Examples 176 | 177 | | Programming Language | Example location | Download | 178 | | -------------------- | ------------------------ | -------- | 179 | | Python | [python/googleshoppingproduct.py](https://github.com/Smartproxy/SERP-Scraping-API/blob/main/python/googleshoppingproduct.py) |``` curl https://raw.githubusercontent.com/Smartproxy/SERP-Scraping-API/main/python/googleshoppingproduct.py > googleshoppingproduct.py ``` | 180 | | PHP | [php/googleshoppingproduct.php](https://github.com/Smartproxy/SERP-Scraping-API/blob/main/php/googleshoppingproduct.php) | ``` curl https://raw.githubusercontent.com/Smartproxy/SERP-Scraping-API/main/php/googleshoppingproduct.php > googleshoppingproduct.php ``` | 181 | | Node.js | [nodejs/googleshoppingproduct.js](https://github.com/Smartproxy/SERP-Scraping-API/blob/main/nodejs/googleshoppingproduct.js) | ``` curl https://raw.githubusercontent.com/Smartproxy/SERP-Scraping-API/main/nodejs/googleshoppingproduct.js > googleshoppingproduct.js ``` | 182 | 183 | ### Target: ```google_shopping_pricing``` (parseable) 184 | Required parameters: ```query``` (as item ID from Google Shopping) 185 | 186 | | Parameter | Type | Description | 187 | | :-------- | :------- | :------------------------- | 188 | | `query` | `string` | Google Search query | 189 | | `target` | `url` | Scraping target | 190 | 191 | ### Examples 192 | 193 | | Programming Language | Example location | Download | 194 | | -------------------- | ------------------------ | -------- | 195 | | Python | [python/googleshoppingpricing.py](https://github.com/Smartproxy/SERP-Scraping-API/blob/main/python/googleshoppingpricing.py) |``` curl https://raw.githubusercontent.com/Smartproxy/SERP-Scraping-API/main/python/googleshoppingpricing.py > googleshoppingpricing.py ``` | 196 | | PHP | [php/googleshoppingpricing.php](https://github.com/Smartproxy/SERP-Scraping-API/blob/main/php/googleshoppingpricing.php) | ``` curl https://raw.githubusercontent.com/Smartproxy/SERP-Scraping-API/main/php/googleshoppingpricing.php > googleshoppingpricing.php ``` | 197 | | Node.js | [nodejs/googleshoppingpricing.js](https://github.com/Smartproxy/SERP-Scraping-API/blob/main/nodejs/googleshoppingpricing.js) | ``` curl https://raw.githubusercontent.com/Smartproxy/SERP-Scraping-API/main/nodejs/googleshoppingpricing.js > googleshoppingpricing.js ``` | 198 | 199 | ### Target: ```google_images``` (not parseable) 200 | Required parameters: ```query``` 201 | 202 | Returns links of images similar to the provided image link. 203 | 204 | | Parameter | Type | Description | 205 | | :-------- | :------- | :------------------------- | 206 | | `query` | `url` | Image URL | 207 | | `target` | `url` | Scraping target | 208 | 209 | ### Examples 210 | 211 | | Programming Language | Example location | Download | 212 | | -------------------- | ------------------------ | -------- | 213 | | Python | [python/googleimages.py](https://github.com/Smartproxy/SERP-Scraping-API/blob/main/python/googleimages.py) |``` curl https://raw.githubusercontent.com/Smartproxy/SERP-Scraping-API/main/python/googleimages.py > googleimages.py ``` | 214 | | PHP | [php/googleimages.php](https://github.com/Smartproxy/SERP-Scraping-API/blob/main/php/googleimages.php) | ``` curl https://raw.githubusercontent.com/Smartproxy/SERP-Scraping-API/main/php/googleimages.php > googleimages.php ``` | 215 | | Node.js | [nodejs/googleimages.js](https://github.com/Smartproxy/SERP-Scraping-API/blob/main/nodejs/googleimages.js) | ``` curl https://raw.githubusercontent.com/Smartproxy/SERP-Scraping-API/main/nodejs/googleimages.js > googleimages.js ``` | 216 | 217 | ### Target: ```google_suggest``` (not parseable) 218 | Required parameters: ```query```, ```geo``` in ISO 2 format 219 | 220 | Returns Google keyword suggestions based on the supplied query. 221 | 222 | | Parameter | Type | Description | 223 | | :-------- | :------- | :------------------------- | 224 | | `query` | `string` | Google Search query | 225 | | `geo` | `string` | Geo-targeting location | 226 | | `target` | `url` | Scraping target | 227 | 228 | ### Examples 229 | 230 | | Programming Language | Example location | Download | 231 | | -------------------- | ------------------------ | -------- | 232 | | Python | [python/googlesuggest.py](https://github.com/Smartproxy/SERP-Scraping-API/blob/main/python/googlesuggest.py) |``` curl https://raw.githubusercontent.com/Smartproxy/SERP-Scraping-API/main/python/googlesuggest.py > googlesuggest.py ``` | 233 | | PHP | [php/googlesuggest.php](https://github.com/Smartproxy/SERP-Scraping-API/blob/main/php/googlesuggest.php) | ``` curl https://raw.githubusercontent.com/Smartproxy/SERP-Scraping-API/main/php/googlesuggest.php > googlesuggest.php ``` | 234 | | Node.js | [nodejs/googlesuggest.js](https://github.com/Smartproxy/SERP-Scraping-API/blob/main/nodejs/googlesuggest.js) | ``` curl https://raw.githubusercontent.com/Smartproxy/SERP-Scraping-API/main/nodejs/googlesuggest.js > googlesuggest.js ``` | 235 | 236 | ### Target: ```google_trends_explore``` (not parseable,already returns structured data) 237 | 238 | Required parameters: ```query``` 239 | 240 | Retrieve Google Trends results. This target returns structured data so there is no need to use the parse parameter. 241 | 242 | 243 | | Parameter | Type | Description | 244 | | :-------- | :------- | :------------------------- | 245 | | `query` | `string` | Google Search query | 246 | | `geo` | `string` | Geo-targeting location | 247 | | `target` | `url` | Scraping target | 248 | 249 | ### Examples 250 | 251 | | Programming Language | Example location | Download | 252 | | -------------------- | ------------------------ | -------- | 253 | | Python | [python/googletrendsexplore.py](https://github.com/Smartproxy/SERP-Scraping-API/blob/main/python/googletrendsexplore.py) |``` curl https://raw.githubusercontent.com/Smartproxy/SERP-Scraping-API/main/python/googletrendsexplore.py > googletrendsexplore.py ``` | 254 | | PHP | [php/googletrendsexplore.php](https://github.com/Smartproxy/SERP-Scraping-API/blob/main/php/googletrendsexplore.php) | ``` curl https://raw.githubusercontent.com/Smartproxy/SERP-Scraping-API/main/php/googletrendsexplore.php > googletrendsexplore.php ``` | 255 | | Node.js | [nodejs/googletrendsexplore.js](https://github.com/Smartproxy/SERP-Scraping-API/blob/main/nodejs/googletrendsexplore.js) | ``` curl https://raw.githubusercontent.com/Smartproxy/SERP-Scraping-API/main/nodejs/googletrendsexplore.js > googletrendsexplore.js ``` | 256 | 257 | ### Target: ```google_ads``` (parseable) 258 | Required parameters: ```query``` 259 | 260 | Returns Google search results with paid ads. 261 | 262 | | Parameter | Type | Description | 263 | | :-------- | :------- | :------------------------- | 264 | | `query` | `string` | Google Search query | 265 | | `target` | `url` | Scraping target | 266 | 267 | ### Examples 268 | 269 | | Programming Language | Example location | Download | 270 | | -------------------- | ------------------------ | -------- | 271 | | Python | [python/googleads.py](https://github.com/Smartproxy/SERP-Scraping-API/blob/main/python/googleads.py) |``` curl https://raw.githubusercontent.com/Smartproxy/SERP-Scraping-API/main/python/googleads.py > googleads.py ``` | 272 | | PHP | [php/googleads.php](https://github.com/Smartproxy/SERP-Scraping-API/blob/main/php/googleads.php) | ``` curl https://raw.githubusercontent.com/Smartproxy/SERP-Scraping-API/main/php/googleads.php > googleads.php ``` | 273 | | Node.js | [nodejs/googleads.js](https://github.com/Smartproxy/SERP-Scraping-API/blob/main/nodejs/googleads.js) | ``` curl https://raw.githubusercontent.com/Smartproxy/SERP-Scraping-API/main/nodejs/googleads.js > googleads.js ``` | 274 | 275 | ## Baidu 276 | Baidu can be targeted either using direct URL or by using the query parameter to the Baidu search bar. 277 | 278 | ### Target: ```baidu``` (not parseable) 279 | Required parameters: ```url``` 280 | 281 | Target by supplying direct URL link. 282 | 283 | | Parameter | Type | Description | 284 | | :-------- | :------- | :------------------------- | 285 | | `url` | `url` | Baidu Search URL | 286 | | `target` | `url` | Scraping target | 287 | 288 | ### Examples 289 | 290 | | Programming Language | Example location | Download | 291 | | -------------------- | ------------------------ | -------- | 292 | | Python | [python/baidusearch.py](https://github.com/Smartproxy/SERP-Scraping-API/blob/main/python/baidusearch.py) |``` curl https://raw.githubusercontent.com/Smartproxy/SERP-Scraping-API/main/python/baidusearch.py > baidusearch.py ``` | 293 | | PHP | [php/baidusearch.php](https://github.com/Smartproxy/SERP-Scraping-API/blob/main/php/baidusearch.php) | ``` curl https://raw.githubusercontent.com/Smartproxy/SERP-Scraping-API/main/php/baidusearch.php > baidusearch.php ``` | 294 | | Node.js | [nodejs/baidusearch.js](https://github.com/Smartproxy/SERP-Scraping-API/blob/main/nodejs/baidusearch.js) | ``` curl https://raw.githubusercontent.com/Smartproxy/SERP-Scraping-API/main/nodejs/baidusearch.js > baidusearch.js ``` | 295 | 296 | ### Target: ```baidu_search```(not parseable) 297 | Required parameters: ```query``` 298 | 299 | Target by supplying your query to the Baidu search bar. 300 | 301 | | Parameter | Type | Description | 302 | | :-------- | :------- | :------------------------- | 303 | | `query` | `string` | Baidu Search query | 304 | | `target` | `url` | Scraping target | 305 | 306 | ### Examples 307 | 308 | | Programming Language | Example location | Download | 309 | | -------------------- | ------------------------ | -------- | 310 | | Python | [python/baidusearchquery.py](https://github.com/Smartproxy/SERP-Scraping-API/blob/main/python/baidusearchquery.py) |``` curl https://raw.githubusercontent.com/Smartproxy/SERP-Scraping-API/main/python/baidusearchquery.py > baidusearchquery.py ``` | 311 | | PHP | [php/baidusearchquery.php](https://github.com/Smartproxy/SERP-Scraping-API/blob/main/php/baidusearchquery.php) | ``` curl https://raw.githubusercontent.com/Smartproxy/SERP-Scraping-API/main/php/baidusearchquery.php > baidusearchquery.php ``` | 312 | | Node.js | [nodejs/baidusearchquery.js](https://github.com/Smartproxy/SERP-Scraping-API/blob/main/nodejs/baidusearchquery.js) | ``` curl https://raw.githubusercontent.com/Smartproxy/SERP-Scraping-API/main/nodejs/baidusearchquery.js > baidusearchquery.js ``` | 313 | 314 | ## Bing 315 | 316 | Bing can be targeted either using direct URL or by using the query parameter to the Bing search bar. 317 | 318 | ### Target: ```bing``` (parseable) 319 | Required parameters: ```url``` 320 | 321 | Target by supplying direct URL link. 322 | 323 | | Parameter | Type | Description | 324 | | :-------- | :------- | :------------------------- | 325 | | `url` | `url` | Bing Search URL | 326 | | `target` | `url` | Scraping target | 327 | 328 | ### Response 329 | 330 | ``` 331 | { 332 | "results": [ 333 | { 334 | "content": { 335 | "url": "https://www.bing.com/search?q=history", 336 | "page": 1, 337 | "results": { 338 | "paid": [], 339 | "organic": [ 340 | { 341 | "pos": 1, 342 | "url": "https://www.history.com/", 343 | "desc": "Watch full episodes of your favorite HISTORY series, and dive into thousands of historical articles and videos. To know History is to know life. By submitting your information, you agree to ...", 344 | "title": "HISTORY | Watch Full Episodes of Your Favorite Shows", 345 | "url_shown": "https://www.history.com", 346 | "pos_overall": 1 347 | }, 348 | { 349 | "pos": 2, 350 | "url": "https://ejje.weblio.jp/content/history", 351 | "desc": "history とは 意味・読み方・使い方. 発音を聞く. プレーヤー再生. ピン留め. 単語を追加. 意味・対訳. 歴史、史学、歴史書、史書、史劇、 (学問・言語などの)発達史、変遷、経歴、来歴、沿革. 音節 his・to・ry 発音記号・読み方.", 352 | "title": "英語「history」の意味・使い方・読み方 | Weblio英和 …", 353 | "url_shown": "https://ejje.weblio.jp/content/history", 354 | "pos_overall": 2 355 | }, 356 | { 357 | "pos": 3, 358 | "url": "https://www.bing.com/profile/history", 359 | "desc": "Microsoft gives you tools to manage your privacy and data. L e a r n m o r e. S i g n i n to see your search history on different browsers and computers.", 360 | "title": "Search - Search History - Bing", 361 | "url_shown": "https://www.bing.com/profile/history", 362 | "pos_overall": 3 363 | }, 364 | { 365 | "pos": 4, 366 | "url": "https://jp.history.com/", 367 | "desc": "ヒストリーチャンネルは、上質な番組を放送する世界最大で日本唯一の歴史&エンターテインメント専門チャンネルです。 長期刑の判決を受けた犯罪者たちは、刑務所に収監される前の最後の24時間をどう過ごすのか?過ちを謝罪する者、幼い子どもの親権を手放す者、崩壊した家族を修 …", 368 | "title": "日本・世界の歴史&エンタメ | THE HISTORY CHANNEL JAPAN ...", 369 | "url_shown": "https://jp.history.com", 370 | "pos_overall": 4 371 | }, 372 | { 373 | "pos": 5, 374 | "url": "https://history.google.com/", 375 | "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 for, websites you’ve visited, and videos you’ve watched. Learn more.", 376 | "title": "Welcome to My Activity", 377 | "url_shown": "https://history.google.com", 378 | "pos_overall": 5 379 | }, 380 | { 381 | "pos": 6, 382 | "url": "https://www.youtube.com/HISTORYjp", 383 | "desc": "世界最大の歴史エンターテイメントブランド「HISTORY」ヒストリーチャンネル の公式YouTubeチャンネルです。人気シリーズを続々公開!最新情報は ...", 384 | "title": "HISTORY公式 - YouTube", 385 | "url_shown": "https://www.youtube.com/HISTORYjp", 386 | "pos_overall": 6 387 | }, 388 | { 389 | "pos": 7, 390 | "url": "https://eow.alc.co.jp/search?q=history", 391 | "desc": "history 【名】 歴史、歴史学 過去のこと[もの]・I'm history. : 私の時代は終わった。/私は過去の人間...【発音】hístəri【カナ】ヒストリィ【変化】《複》histories - アルクがお届けするオンライン英和・和英辞書検索サービス。", 392 | "title": "historyの意味・使い方・読み方|英辞郎 on the WEB", 393 | "url_shown": "https://eow.alc.co.jp/search?q=history", 394 | "pos_overall": 7 395 | }, 396 | { 397 | "pos": 8, 398 | "url": "https://history.gt/index.html", 399 | "desc": "2022年07月22日 『HISTORY Advanced』新発売!. 他シリーズとの違いを徹底比較!. 2022年04月26日 新商品「Performanceシリーズ」についてYouNiqueのお二人に語って頂きました!. 2022年04月01日 皆様のおかげで10万本販売達成!. 感謝キャンペーンスタート!. 2021年11 …", 400 | "title": "HISTORY ヒストリー HISTORY -島村楽器", 401 | "url_shown": "https://www.history.gt", 402 | "pos_overall": 8 403 | }, 404 | { 405 | "pos": 9, 406 | "url": "https://jp.history.com/timetable/", 407 | "desc": "ヒストリーチャンネルは、上質な番組を放送する世界最大で日本唯一の歴史&エンターテインメント専門チャンネルです。 TEL: 0570-001-607(ナビダイヤル) ヒストリーチャンネルカスタマーセンター 受付時間(10:00 – 20:00/年中無休) ※PHS・IP電話等からは、03-4333-1031", 408 | "title": "日別番組表 | ヒストリーチャンネル", 409 | "url_shown": "https://jp.history.com/timetable", 410 | "pos_overall": 9 411 | } 412 | ] 413 | }, 414 | "parse_status_code": 12000 415 | }, 416 | "status_code": 200, 417 | "url": "https://www.bing.com/search?q=history", 418 | "task_id": "6970716517377789953", 419 | "created_at": "2022-08-31 12:18:47", 420 | "updated_at": "2022-08-31 12:18:51" 421 | } 422 | ] 423 | } 424 | ``` 425 | 426 | ### Examples 427 | 428 | | Programming Language | Example location | Download | 429 | | -------------------- | ------------------------ | -------- | 430 | | Python | [python/bingsearch.py](https://github.com/Smartproxy/SERP-Scraping-API/blob/main/python/bingsearch.py) |``` curl https://raw.githubusercontent.com/Smartproxy/SERP-Scraping-API/main/python/bingsearch.py > bingsearch.py ``` | 431 | | PHP | [php/bingsearch.php](https://github.com/Smartproxy/SERP-Scraping-API/blob/main/php/bingsearch.php) | ``` curl https://raw.githubusercontent.com/Smartproxy/SERP-Scraping-API/main/php/bingsearch.php > bingsearch.php ``` | 432 | | Node.js | [nodejs/bingsearch.js](https://github.com/Smartproxy/SERP-Scraping-API/blob/main/nodejs/bingsearch.js) | ``` curl https://raw.githubusercontent.com/Smartproxy/SERP-Scraping-API/main/nodejs/bingsearch.js > bingsearch.js ``` | 433 | 434 | ### Target: ```bing_search```(parseable) 435 | Required parameters: ```query``` 436 | 437 | Target by supplying your query to the Bing search bar. 438 | 439 | | Parameter | Type | Description | 440 | | :-------- | :------- | :------------------------- | 441 | | `query` | `string` | Bing Search query | 442 | | `target` | `url` | Scraping target | 443 | 444 | ### Examples 445 | 446 | | Programming Language | Example location | Download | 447 | | -------------------- | ------------------------ | -------- | 448 | | Python | [python/bingsearchquery.py](https://github.com/Smartproxy/SERP-Scraping-API/blob/main/python/bingsearchquery.py) |``` curl https://raw.githubusercontent.com/Smartproxy/SERP-Scraping-API/main/python/bingsearchquery.py > bingsearchquery.py ``` | 449 | | PHP | [php/bingsearchquery.php](https://github.com/Smartproxy/SERP-Scraping-API/blob/main/php/bingsearchquery.php) | ``` curl https://raw.githubusercontent.com/Smartproxy/SERP-Scraping-API/main/php/bingsearchquery.php > bingsearchquery.php ``` | 450 | | Node.js | [nodejs/bingsearchquery.js](https://github.com/Smartproxy/SERP-Scraping-API/blob/main/nodejs/bingsearchquery.js) | ``` curl https://raw.githubusercontent.com/Smartproxy/SERP-Scraping-API/main/nodejs/bingsearchquery.js > bingsearchquery.js ``` | 451 | 452 | ## Yandex 453 | 454 | Yandex can be targeted either using direct URL or by using the query parameter to the Yandex search bar. 455 | 456 | ### Target: ```yandex``` (not parseable) 457 | Required parameters: ```url``` 458 | 459 | Target by supplying direct URL link. 460 | 461 | | Parameter | Type | Description | 462 | | :-------- | :------- | :------------------------- | 463 | | `url` | `url` | Yandex Search URL | 464 | | `target` | `url` | Scraping target | 465 | 466 | ### Examples 467 | 468 | | Programming Language | Example location | Download | 469 | | -------------------- | ------------------------ | -------- | 470 | | Python | [python/yandexsearch.py](https://github.com/Smartproxy/SERP-Scraping-API/blob/main/python/yandexsearch.py) |``` curl https://raw.githubusercontent.com/Smartproxy/SERP-Scraping-API/main/python/yandexsearch.py > yandexsearch.py ``` | 471 | | PHP | [php/yandexsearch.php](https://github.com/Smartproxy/SERP-Scraping-API/blob/main/php/yandexsearch.php) | ``` curl https://raw.githubusercontent.com/Smartproxy/SERP-Scraping-API/main/php/yandexsearch.php > yandexsearch.php ``` | 472 | | Node.js | [nodejs/yandexsearch.js](https://github.com/Smartproxy/SERP-Scraping-API/blob/main/nodejs/yandexsearch.js) | ``` curl https://raw.githubusercontent.com/Smartproxy/SERP-Scraping-API/main/nodejs/yandexsearch.js > yandexsearch.js ``` | 473 | 474 | 475 | ### Target: ```yandex_search``` (not parseable) 476 | Required parameters: ```query``` 477 | 478 | Target by supplying your query to the Yandex search bar. 479 | 480 | | Parameter | Type | Description | 481 | | :-------- | :------- | :------------------------- | 482 | | `query` | `string` | Yandex Search query | 483 | | `target` | `url` | Scraping target | 484 | 485 | ### Examples 486 | 487 | | Programming Language | Example location | Download | 488 | | -------------------- | ------------------------ | -------- | 489 | | Python | [python/yandexsearchquery.py](https://github.com/Smartproxy/SERP-Scraping-API/blob/main/python/yandexsearchquery.py) |``` curl https://raw.githubusercontent.com/Smartproxy/SERP-Scraping-API/main/python/yandexsearchquery.py > yandexsearchquery.py ``` | 490 | | PHP | [php/yandexsearchquery.php](https://github.com/Smartproxy/SERP-Scraping-API/blob/main/php/yandexsearchquery.php) | ``` curl https://raw.githubusercontent.com/Smartproxy/SERP-Scraping-API/main/php/yandexsearchquery.php > yandexsearchquery.php ``` | 491 | | Node.js | [nodejs/yandexsearchquery.js](https://github.com/Smartproxy/SERP-Scraping-API/blob/main/nodejs/yandexsearchquery.js) | ``` curl https://raw.githubusercontent.com/Smartproxy/SERP-Scraping-API/main/nodejs/yandexsearchquery.js > yandexsearchquery.js ``` | 492 | 493 | ## Parameters 494 | 495 | | Parameter | Type | Description | 496 | | :-------- | :------- | :------------------------- | 497 | | `target` | `string` | Data source. Available targets are listed [here](#targets). | 498 | | `url` | `url` | Direct URL (link) | 499 | | `domain` | `url` | Any available Google Top-level domain. | 500 | | `query` | `string` | | 501 | | `page_from` | `integer` | Starting page number. | 502 | | `num_pages` | `integer` | Starting page number. | 503 | | `locale` | `string` | This will change the Google search page web interface language (not the results). Example: – en-US – en-GB | 504 | | `geo` | `string` | The geographical location that the result depends on. City location names, state names, country names, coordinates and radius, Google’s Canonical | 505 | | `device_type` | `string` | Device type and browser. Supported: ```desktop```, ```desktop_chrome```, ```desktop_firefox```, ```mobile```, ```mobile_android```, ```mobile_ios```. | 506 | | `parse` | `boolean` | 'true' will return parsed output in JSON format. Leave blank for HTML – not all data sources can be parsed. | 507 | | `google_nfpr` | `boolean` | Auto-correction.| 508 | | `google_results_language ` | `string` | Shows results in a particular language. All of the supported languages are listed [here](#languages).| 509 | | `google_tbm ` | `string` | This parameter lets you filter Google Search results for specific types of content (news, apps, videos...). | 510 | | `google_tbs` | `string` | This parameter contains parameters, like limiting/sorting results by date. | 511 | | `google_safe_search` | `string` | Used to hide explicit content from the results. | 512 | | `stars` | `integer` | 1-5 stars, used with ```google_travel_hotels``` target | 513 | | `guests` | `integer` | Used with ```google_travel_hotels``` target | 514 | | `date_range` | `string` | Y-m-d,Y-m-d used with ```google_travel_hotels``` target | 515 | | `headless` | `string` | Enable JavaScript rendering. Supported: ```html```, ```png``` | 516 | 517 | ## Targets 518 | 519 | ### List of supported targets for the 'target' parameter 520 | ``` 521 | google_search 522 | google_hotels 523 | google_travel_hotels 524 | google_shopping_search 525 | google_shopping_product 526 | google_shopping_pricing 527 | google 528 | google_images 529 | google_suggest 530 | google_ads 531 | google_trends_explore 532 | baidu 533 | baidu_search 534 | bing 535 | bing_search 536 | yandex 537 | yandex_search 538 | ``` 539 | 540 | ## Languages 541 | 542 | | ISO 639-1 Code | Language | 543 | | :-------- | :------- | 544 | | `af` | `Afrikaans` | 545 | | `ar` | `Arabic` | 546 | | `hy` | `Armenian` | 547 | | `be` | `Belarussian` | 548 | | `bg` | `Bulgarian` | 549 | | `ca` | `Catalan` | 550 | | `zh-CN` | `Chinese - Simplified` | 551 | | `zh-TW` | `Chinese - Traditional` | 552 | | `hr` | `Croatian` | 553 | | `cs` | `Czech` | 554 | | `da` | `Danish` | 555 | | `nl` | `Dutch` | 556 | | `en` | `English` | 557 | | `eo` | `Esperanto` | 558 | | `et` | `Estonian` | 559 | | `tl` | `Filipino` | 560 | | `fi` | `Finnish` | 561 | | `fr` | `French` | 562 | | `de` | `German` | 563 | | `el` | `Greek` | 564 | | `ie` | `Hebrew` | 565 | | `hi` | `Hindi` | 566 | | `hu` | `Hungarian` | 567 | | `is` | `Icelandic` | 568 | | `id` | `Indonesian` | 569 | | `it` | `Italian` | 570 | | `ja` | `Japanese` | 571 | | `ko` | `Korean` | 572 | | `lv` | `Latvian` | 573 | | `lt` | `Lithuanian` | 574 | | `no` | `Norwegian` | 575 | | `fa` | `Persian` | 576 | | `pl` | `Polish` | 577 | | `pt` | `Portuguese` | 578 | | `ro` | `Romanian` | 579 | | `ru` | `Russian` | 580 | | `sr` | `Serbian` | 581 | | `sk` | `Slovak` | 582 | | `sl` | `Slovenian` | 583 | | `es` | `Spanish` | 584 | | `sw` | `Swahili` | 585 | | `sv` | `Swedish` | 586 | | `th` | `Thai` | 587 | | `tr` | `Turkish` | 588 | | `uk` | `Ukrainian` | 589 | | `vi` | `Vietnamese` | 590 | 591 | ## Response Codes 592 | 593 | ### HTTP Response Codes 594 | 595 | | Response | Description | Solution | 596 | | :-------- | :------- | :------------------------- | 597 | | **200** - Success | Server has replied and given requested response. | Celebrate! | 598 | | **204** - No content | Job not completed yet. | Wait a few seconds before trying again. | 599 | | **400** - Multiple error messages | Bad structure of the request. | Re-check your request to make sure it is in the correct format. | 600 | | **401** - Invalid / not provided authorization header (client not found) | Incorrect login credentials or missing authorization. | Re-check your provided credentials for authorization. | 601 | | **403** - Forbidden | Your account does not have access to this resource. | Make sure the target is supported by us | 602 | | **404** - Not found | Your target was not found. | Re-check your targeted URL. | 603 | | **429** - Too many requests | Exceeded rate limit for your subscription. | Make sure you still have at least one request left. Wait a couple minutes and try again. If you are encountering the error often – chat with us to see if your rate limit can be increased. | 604 | | **500** - Internal error | Service unavailable, possibly due to some issues we are encountering. | Wait a couple minutes and send another request. Contact us for more information. | 605 | | **524** - Timeout | Service unavailable, possibly due to some issues we are encountering. | Wait a couple minutes and send another request. Contact us for more information. | 606 | 607 | ### Parsed Result Response Codes 608 | 609 | | Response | Description | 610 | | :-------- | :------- | 611 | | **12000** - Success | Server has replied and given the requested response. | 612 | | **12002** - Error | Parsing has failed completely. | 613 | | **12003** - Not supported | Targeted website parsing is not supported. | 614 | | **12004** - Response not full | Some fields were not parsed and are missing. | 615 | | **12005** - Response not fully parsed | Some fields might not have been parsed and are returned unparsed. | 616 | | **12006** - Error | Unexpected error. Let us know the task ID and we will check what went wrong. | 617 | | **12007** - Unknown | We could not determine whether the data was parsed correctly. | 618 | | **12008** - Error | Failed to parse all the data. | 619 | | **12009** - Error | Target not found. Make sure the parameters you passed are correct and supported. | 620 | 621 | ## Postman Collection 622 | 623 | [](https://app.getpostman.com/run-collection/23304112-1d93adb3-88f5-4dd5-ae14-22a52b99c6f9?action=collection%2Ffork&collection-url=entityId%3D23304112-1d93adb3-88f5-4dd5-ae14-22a52b99c6f9%26entityType%3Dcollection%26workspaceId%3D52705bab-433c-4fbf-afce-ccbfc97430fe) 624 | 625 | 626 | ## License 627 | 628 | All code is released under [MIT License](https://github.com/Smartproxy/Smartproxy/blob/master/LICENSE) 629 | -------------------------------------------------------------------------------- /nodejs/baidusearch.js: -------------------------------------------------------------------------------- 1 | const response = await fetch( 2 | 'https://scraper-api.smartproxy.com/v2/scrape', { 3 | method: 'POST', 4 | body: { 5 | target: 'baidu', 6 | parse: false, 7 | url: 'https://www.baidu.com/s?ie=utf-8&f=8&rsv_bp=1&rsv_idx=1&tn=baidu&wd=donuts&fenlei=256&rsv_pq=dc12cef9000cecd5&rsv_t=eb7dbdneGaOeG8buqmqpjMaLZ8tiygOJCtkEqqboaIRy1vnbiFlpef4ieJg&rqlang=cn&rsv_enter=1&rsv_dl=tb&rsv_sug3=6&rsv_sug1=1&rsv_sug7=100&rsv_sug2=0&rsv_btype=i&inputT=6940&rsv_sug4=6940' 8 | }, 9 | headers: { 10 | 'Content-Type': 'application/json', 11 | 'Authorization': 'Basic AUTH' 12 | }, 13 | } 14 | ).catch(error => console.log(error)); 15 | 16 | console.log(response) 17 | -------------------------------------------------------------------------------- /nodejs/baidusearchquery.js: -------------------------------------------------------------------------------- 1 | const response = await fetch( 2 | 'https://scraper-api.smartproxy.com/v2/scrape', { 3 | method: 'POST', 4 | body: { 5 | target: 'baidu_search', 6 | parse: false, 7 | query: 'donuts' 8 | }, 9 | headers: { 10 | 'Content-Type': 'application/json', 11 | 'Authorization': 'Basic AUTH' 12 | }, 13 | } 14 | ).catch(error => console.log(error)); 15 | 16 | console.log(response) 17 | -------------------------------------------------------------------------------- /nodejs/bingsearch.js: -------------------------------------------------------------------------------- 1 | const response = await fetch( 2 | 'https://scraper-api.smartproxy.com/v2/scrape', { 3 | method: 'POST', 4 | body: { 5 | target: 'bing', 6 | parse: true, 7 | url: 'https://www.bing.com/search?q=history' 8 | }, 9 | headers: { 10 | 'Content-Type': 'application/json', 11 | 'Authorization': 'Basic AUTH' 12 | }, 13 | } 14 | ).catch(error => console.log(error)); 15 | 16 | console.log(response) 17 | -------------------------------------------------------------------------------- /nodejs/bingsearchquery.js: -------------------------------------------------------------------------------- 1 | const response = await fetch( 2 | 'https://scraper-api.smartproxy.com/v2/scrape', { 3 | method: 'POST', 4 | body: { 5 | target: 'bing', 6 | parse: true, 7 | query: 'history' 8 | }, 9 | headers: { 10 | 'Content-Type': 'application/json', 11 | 'Authorization': 'Basic AUTH' 12 | }, 13 | } 14 | ).catch(error => console.log(error)); 15 | 16 | console.log(response) 17 | -------------------------------------------------------------------------------- /nodejs/googleads.js: -------------------------------------------------------------------------------- 1 | const response = await fetch( 2 | 'https://scraper-api.smartproxy.com/v2/scrape', { 3 | method: 'POST', 4 | body: { 5 | target: 'google_ads', 6 | parse: true, 7 | query: 'sneakers' 8 | }, 9 | headers: { 10 | 'Content-Type': 'application/json', 11 | 'Authorization': 'Basic AUTH' 12 | }, 13 | } 14 | ).catch(error => console.log(error)); 15 | 16 | console.log(response) 17 | -------------------------------------------------------------------------------- /nodejs/googlehotels.js: -------------------------------------------------------------------------------- 1 | const response = await fetch( 2 | 'https://scraper-api.smartproxy.com/v2/scrape', { 3 | method: 'POST', 4 | body: { 5 | target: 'google_hotels', 6 | parse: false, 7 | query: 'hilton' 8 | }, 9 | headers: { 10 | 'Content-Type': 'application/json', 11 | 'Authorization': 'Basic AUTH' 12 | }, 13 | } 14 | ).catch(error => console.log(error)); 15 | 16 | console.log(response) 17 | -------------------------------------------------------------------------------- /nodejs/googleimages.js: -------------------------------------------------------------------------------- 1 | const response = await fetch( 2 | 'https://scraper-api.smartproxy.com/v2/scrape', { 3 | method: 'POST', 4 | body: { 5 | target: 'google_images', 6 | parse: false, 7 | query: 'https://upload.wikimedia.org/wikipedia/commons/7/73/Lion_waiting_in_Namibia.jpg' 8 | }, 9 | headers: { 10 | 'Content-Type': 'application/json', 11 | 'Authorization': 'Basic AUTH' 12 | }, 13 | } 14 | ).catch(error => console.log(error)); 15 | 16 | console.log(response) 17 | -------------------------------------------------------------------------------- /nodejs/googlesearch.js: -------------------------------------------------------------------------------- 1 | const response = await fetch( 2 | 'https://scraper-api.smartproxy.com/v2/scrape', { 3 | method: 'POST', 4 | body: { 5 | target: 'google_search', 6 | query: 'Adidas', 7 | parse: true, 8 | domain: 'com', 9 | page_from: 1, 10 | num_pages: 10, 11 | locale: 'en-us', 12 | geo: 'Detroit,Maine,United States', 13 | device_type: 'desktop', 14 | google_results_language: 'en' 15 | }, 16 | headers: { 17 | 'Content-Type': 'application/json', 18 | 'Authorization': 'Basic AUTH' 19 | }, 20 | } 21 | ).catch(error => console.log(error)); 22 | 23 | console.log(response) 24 | -------------------------------------------------------------------------------- /nodejs/googlesearchurl.js: -------------------------------------------------------------------------------- 1 | const response = await fetch( 2 | 'https://scraper-api.smartproxy.com/v2/scrape', { 3 | method: 'POST', 4 | body: { 5 | target: 'google', 6 | parse: true, 7 | url: 'https://www.google.com/search?q=history' 8 | }, 9 | headers: { 10 | 'Content-Type': 'application/json', 11 | 'Authorization': 'Basic AUTH' 12 | }, 13 | } 14 | ).catch(error => console.log(error)); 15 | 16 | console.log(response) 17 | -------------------------------------------------------------------------------- /nodejs/googleshopping.js: -------------------------------------------------------------------------------- 1 | const response = await fetch( 2 | 'https://scraper-api.smartproxy.com/v2/scrape', { 3 | method: 'POST', 4 | body: { 5 | target: 'google_shopping_search', 6 | parse: true, 7 | query: 'sneakers' 8 | }, 9 | headers: { 10 | 'Content-Type': 'application/json', 11 | 'Authorization': 'Basic AUTH' 12 | }, 13 | } 14 | ).catch(error => console.log(error)); 15 | 16 | console.log(response) 17 | -------------------------------------------------------------------------------- /nodejs/googleshoppingpricing.js: -------------------------------------------------------------------------------- 1 | const response = await fetch( 2 | 'https://scraper-api.smartproxy.com/v2/scrape', { 3 | method: 'POST', 4 | body: { 5 | target: 'google_shopping_pricing' 6 | parse: true, 7 | query: '1487724521556311753' 8 | }, 9 | headers: { 10 | 'Content-Type': 'application/json', 11 | 'Authorization': 'Basic AUTH' 12 | }, 13 | } 14 | ).catch(error => console.log(error)); 15 | 16 | console.log(response) 17 | -------------------------------------------------------------------------------- /nodejs/googleshoppingproduct.js: -------------------------------------------------------------------------------- 1 | const response = await fetch( 2 | 'https://scraper-api.smartproxy.com/v2/scrape', { 3 | method: 'POST', 4 | body: { 5 | target: 'google_shopping_product', 6 | parse: true, 7 | query: '8129397700139936548' 8 | }, 9 | headers: { 10 | 'Content-Type': 'application/json', 11 | 'Authorization': 'Basic AUTH' 12 | }, 13 | } 14 | ).catch(error => console.log(error)); 15 | 16 | console.log(response) 17 | 18 | -------------------------------------------------------------------------------- /nodejs/googlesuggest.js: -------------------------------------------------------------------------------- 1 | const response = await fetch( 2 | 'https://scraper-api.smartproxy.com/v2/scrape', { 3 | method: 'POST', 4 | body: { 5 | target: 'google_suggest', 6 | parse: false, 7 | query: 'world' 8 | }, 9 | headers: { 10 | 'Content-Type': 'application/json', 11 | 'Authorization': 'Basic AUTH' 12 | }, 13 | } 14 | ).catch(error => console.log(error)); 15 | 16 | console.log(response) 17 | 18 | -------------------------------------------------------------------------------- /nodejs/googletravel.js: -------------------------------------------------------------------------------- 1 | const response = await fetch( 2 | 'https://scraper-api.smartproxy.com/v2/scrape', { 3 | method: 'POST', 4 | body: { 5 | target: 'google_travel_hotels', 6 | parse: false, 7 | query: 'hilton' 8 | }, 9 | headers: { 10 | 'Content-Type': 'application/json', 11 | 'Authorization': 'Basic AUTH' 12 | }, 13 | } 14 | ).catch(error => console.log(error)); 15 | 16 | console.log(response) 17 | 18 | -------------------------------------------------------------------------------- /nodejs/googletrendsexplore.js: -------------------------------------------------------------------------------- 1 | const response = await fetch( 2 | 'https://scraper-api.smartproxy.com/v2/scrape', { 3 | method: 'POST', 4 | body: { 5 | target:'google_trends_explore', 6 | query: 'pizza', 7 | search_type:'web_search', 8 | date_start: '2022-01-10', 9 | date_end: '2023-01-10', 10 | geo:'US', 11 | locale:'en-us', 12 | device_type:'desktop' 13 | }, 14 | headers: { 15 | 'Content-Type': 'application/json', 16 | 'Authorization': 'Basic AUTH' 17 | }, 18 | } 19 | ).catch(error => console.log(error)); 20 | 21 | console.log(response) 22 | -------------------------------------------------------------------------------- /nodejs/yandexsearch.js: -------------------------------------------------------------------------------- 1 | const response = await fetch( 2 | 'https://scraper-api.smartproxy.com/v2/scrape', { 3 | method: 'POST', 4 | body: { 5 | target: 'yandex', 6 | parse: false, 7 | url: 'https://yandex.com/search/?text=cookies&lr=10393' 8 | }, 9 | headers: { 10 | 'Content-Type': 'application/json', 11 | 'Authorization': 'Basic AUTH' 12 | }, 13 | } 14 | ).catch(error => console.log(error)); 15 | 16 | console.log(response) 17 | -------------------------------------------------------------------------------- /nodejs/yandexsearchquery.js: -------------------------------------------------------------------------------- 1 | const response = await fetch( 2 | 'https://scraper-api.smartproxy.com/v2/scrape', { 3 | method: 'POST', 4 | body: { 5 | target: 'yandex_search', 6 | parse: false, 7 | query: 'cookies' 8 | }, 9 | headers: { 10 | 'Content-Type': 'application/json', 11 | 'Authorization': 'Basic AUTH' 12 | }, 13 | } 14 | ).catch(error => console.log(error)); 15 | 16 | console.log(response) 17 | -------------------------------------------------------------------------------- /php/baidusearch.php: -------------------------------------------------------------------------------- 1 | 'baidu', 5 | 'url' => 'https://www.baidu.com/s?ie=utf-8&f=8&rsv_bp=1&rsv_idx=1&tn=baidu&wd=donuts&fenlei=256&rsv_pq=dc12cef9000cecd5&rsv_t=eb7dbdneGaOeG8buqmqpjMaLZ8tiygOJCtkEqqboaIRy1vnbiFlpef4ieJg&rqlang=cn&rsv_enter=1&rsv_dl=tb&rsv_sug3=6&rsv_sug1=1&rsv_sug7=100&rsv_sug2=0&rsv_btype=i&inputT=6940&rsv_sug4=6940', 6 | 'parse' => False 7 | ); 8 | 9 | $ch = curl_init(); 10 | 11 | curl_setopt($ch, CURLOPT_URL, 'https://scraper-api.smartproxy.com/v2/scrape'); 12 | curl_setopt($ch, CURLOPT_USERPWD, 'SPusername' . ':' . 'SPpassword'); 13 | curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); 14 | curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($params)); 15 | curl_setopt($ch, CURLOPT_POST, 1); 16 | 17 | $headers = array(); 18 | $headers[] = 'Content-Type: application/json'; 19 | curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); 20 | 21 | $result = curl_exec($ch); 22 | echo $result; 23 | 24 | if (curl_errno($ch)) { 25 | echo 'Error:' . curl_error($ch); 26 | } 27 | curl_close ($ch); 28 | ?> 29 | -------------------------------------------------------------------------------- /php/baidusearchquery.php: -------------------------------------------------------------------------------- 1 | 'baidu_search', 5 | 'query' => 'donuts', 6 | 'parse' => False 7 | ); 8 | 9 | $ch = curl_init(); 10 | 11 | curl_setopt($ch, CURLOPT_URL, 'https://scraper-api.smartproxy.com/v2/scrape'); 12 | curl_setopt($ch, CURLOPT_USERPWD, 'SPusername' . ':' . 'SPpassword'); 13 | curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); 14 | curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($params)); 15 | curl_setopt($ch, CURLOPT_POST, 1); 16 | 17 | $headers = array(); 18 | $headers[] = 'Content-Type: application/json'; 19 | curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); 20 | 21 | $result = curl_exec($ch); 22 | echo $result; 23 | 24 | if (curl_errno($ch)) { 25 | echo 'Error:' . curl_error($ch); 26 | } 27 | curl_close ($ch); 28 | ?> 29 | -------------------------------------------------------------------------------- /php/bingsearch.php: -------------------------------------------------------------------------------- 1 | 'bing', 5 | 'url' => 'https://www.bing.com/search?q=history', 6 | 'parse' => True 7 | ); 8 | 9 | $ch = curl_init(); 10 | 11 | curl_setopt($ch, CURLOPT_URL, 'https://scraper-api.smartproxy.com/v2/scrape'); 12 | curl_setopt($ch, CURLOPT_USERPWD, 'SPusername' . ':' . 'SPpassword'); 13 | curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); 14 | curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($params)); 15 | curl_setopt($ch, CURLOPT_POST, 1); 16 | 17 | $headers = array(); 18 | $headers[] = 'Content-Type: application/json'; 19 | curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); 20 | 21 | $result = curl_exec($ch); 22 | echo $result; 23 | 24 | if (curl_errno($ch)) { 25 | echo 'Error:' . curl_error($ch); 26 | } 27 | curl_close ($ch); 28 | ?> 29 | -------------------------------------------------------------------------------- /php/bingsearchquery.php: -------------------------------------------------------------------------------- 1 | 'bing_search', 5 | 'query' => 'history', 6 | 'parse' => True 7 | ); 8 | 9 | $ch = curl_init(); 10 | 11 | curl_setopt($ch, CURLOPT_URL, 'https://scraper-api.smartproxy.com/v2/scrape'); 12 | curl_setopt($ch, CURLOPT_USERPWD, 'SPusername' . ':' . 'SPpassword'); 13 | curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); 14 | curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($params)); 15 | curl_setopt($ch, CURLOPT_POST, 1); 16 | 17 | $headers = array(); 18 | $headers[] = 'Content-Type: application/json'; 19 | curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); 20 | 21 | $result = curl_exec($ch); 22 | echo $result; 23 | 24 | if (curl_errno($ch)) { 25 | echo 'Error:' . curl_error($ch); 26 | } 27 | curl_close ($ch); 28 | ?> 29 | -------------------------------------------------------------------------------- /php/googleads.php: -------------------------------------------------------------------------------- 1 | 'google_ads', 5 | 'query' => 'sneakers', 6 | 'parse' => True, 7 | 'geo' => 'London,England,United Kingdom' 8 | ); 9 | 10 | $ch = curl_init(); 11 | 12 | curl_setopt($ch, CURLOPT_URL, 'https://scraper-api.smartproxy.com/v2/scrape'); 13 | curl_setopt($ch, CURLOPT_USERPWD, 'SPsupport' . ':' . 'SPpassword'); 14 | curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); 15 | curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($params)); 16 | curl_setopt($ch, CURLOPT_POST, 1); 17 | 18 | $headers = array(); 19 | $headers[] = 'Content-Type: application/json'; 20 | curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); 21 | 22 | $result = curl_exec($ch); 23 | echo $result; 24 | 25 | if (curl_errno($ch)) { 26 | echo 'Error:' . curl_error($ch); 27 | } 28 | curl_close ($ch); 29 | ?> 30 | -------------------------------------------------------------------------------- /php/googlehotels.php: -------------------------------------------------------------------------------- 1 | 'google_hotels', 5 | 'query' => 'hilton', 6 | 'parse' => False, 7 | 'geo' => 'London,England,United Kingdom' 8 | ); 9 | 10 | $ch = curl_init(); 11 | 12 | curl_setopt($ch, CURLOPT_URL, 'https://scraper-api.smartproxy.com/v2/scrape'); 13 | curl_setopt($ch, CURLOPT_USERPWD, 'SPusername' . ':' . 'SPpassword'); 14 | curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); 15 | curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($params)); 16 | curl_setopt($ch, CURLOPT_POST, 1); 17 | 18 | $headers = array(); 19 | $headers[] = 'Content-Type: application/json'; 20 | curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); 21 | 22 | $result = curl_exec($ch); 23 | echo $result; 24 | 25 | if (curl_errno($ch)) { 26 | echo 'Error:' . curl_error($ch); 27 | } 28 | curl_close ($ch); 29 | ?> 30 | -------------------------------------------------------------------------------- /php/googleimages.php: -------------------------------------------------------------------------------- 1 | 'google_images', 5 | 'query' => 'https://upload.wikimedia.org/wikipedia/commons/7/73/Lion_waiting_in_Namibia.jpg', 6 | 'parse' => False, 7 | 'geo' => 'London,England,United Kingdom' 8 | ); 9 | 10 | $ch = curl_init(); 11 | 12 | curl_setopt($ch, CURLOPT_URL, 'https://scraper-api.smartproxy.com/v2/scrape'); 13 | curl_setopt($ch, CURLOPT_USERPWD, 'SPusername' . ':' . 'SPpassword'); 14 | curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); 15 | curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($params)); 16 | curl_setopt($ch, CURLOPT_POST, 1); 17 | 18 | $headers = array(); 19 | $headers[] = 'Content-Type: application/json'; 20 | curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); 21 | 22 | $result = curl_exec($ch); 23 | echo $result; 24 | 25 | if (curl_errno($ch)) { 26 | echo 'Error:' . curl_error($ch); 27 | } 28 | curl_close ($ch); 29 | ?> 30 | -------------------------------------------------------------------------------- /php/googlesearch.php: -------------------------------------------------------------------------------- 1 | 'google_search', 5 | 'query' => 'history', 6 | 'parse' => True, 7 | 'geo' => 'London,England,United Kingdom' 8 | ); 9 | 10 | $ch = curl_init(); 11 | 12 | curl_setopt($ch, CURLOPT_URL, 'https://scraper-api.smartproxy.com/v2/scrape'); 13 | curl_setopt($ch, CURLOPT_USERPWD, 'SPusername' . ':' . 'SPpassword'); 14 | curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); 15 | curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($params)); 16 | curl_setopt($ch, CURLOPT_POST, 1); 17 | 18 | $headers = array(); 19 | $headers[] = 'Content-Type: application/json'; 20 | curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); 21 | 22 | $result = curl_exec($ch); 23 | echo $result; 24 | 25 | if (curl_errno($ch)) { 26 | echo 'Error:' . curl_error($ch); 27 | } 28 | curl_close ($ch); 29 | ?> 30 | -------------------------------------------------------------------------------- /php/googlesearchurl.php: -------------------------------------------------------------------------------- 1 | 'google', 5 | 'url' => 'https://www.google.com/search?q=history', 6 | 'parse' => True 7 | ); 8 | 9 | $ch = curl_init(); 10 | 11 | curl_setopt($ch, CURLOPT_URL, 'https://scraper-api.smartproxy.com/v2/scrape'); 12 | curl_setopt($ch, CURLOPT_USERPWD, 'SPusername' . ':' . 'SPpassword'); 13 | curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); 14 | curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($params)); 15 | curl_setopt($ch, CURLOPT_POST, 1); 16 | 17 | $headers = array(); 18 | $headers[] = 'Content-Type: application/json'; 19 | curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); 20 | 21 | $result = curl_exec($ch); 22 | echo $result; 23 | 24 | if (curl_errno($ch)) { 25 | echo 'Error:' . curl_error($ch); 26 | } 27 | curl_close ($ch); 28 | ?> 29 | -------------------------------------------------------------------------------- /php/googleshopping.php: -------------------------------------------------------------------------------- 1 | 'google_shopping_search', 5 | 'query' => 'sneakers', 6 | 'parse' => True, 7 | 'geo' => 'London,England,United Kingdom' 8 | ); 9 | 10 | $ch = curl_init(); 11 | 12 | curl_setopt($ch, CURLOPT_URL, 'https://scraper-api.smartproxy.com/v2/scrape'); 13 | curl_setopt($ch, CURLOPT_USERPWD, 'SPusername' . ':' . 'SPpassword'); 14 | curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); 15 | curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($params)); 16 | curl_setopt($ch, CURLOPT_POST, 1); 17 | 18 | $headers = array(); 19 | $headers[] = 'Content-Type: application/json'; 20 | curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); 21 | 22 | $result = curl_exec($ch); 23 | echo $result; 24 | 25 | if (curl_errno($ch)) { 26 | echo 'Error:' . curl_error($ch); 27 | } 28 | curl_close ($ch); 29 | ?> 30 | -------------------------------------------------------------------------------- /php/googleshoppingpricing.php: -------------------------------------------------------------------------------- 1 | 'google_shopping_pricing', 5 | 'query' => '1487724521556311753', 6 | 'parse' => True, 7 | 'geo' => 'London,England,United Kingdom' 8 | ); 9 | 10 | $ch = curl_init(); 11 | 12 | curl_setopt($ch, CURLOPT_URL, 'https://scraper-api.smartproxy.com/v2/scrape'); 13 | curl_setopt($ch, CURLOPT_USERPWD, 'SPusername' . ':' . 'SPpassword'); 14 | curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); 15 | curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($params)); 16 | curl_setopt($ch, CURLOPT_POST, 1); 17 | 18 | $headers = array(); 19 | $headers[] = 'Content-Type: application/json'; 20 | curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); 21 | 22 | $result = curl_exec($ch); 23 | echo $result; 24 | 25 | if (curl_errno($ch)) { 26 | echo 'Error:' . curl_error($ch); 27 | } 28 | curl_close ($ch); 29 | ?> 30 | -------------------------------------------------------------------------------- /php/googleshoppingproduct.php: -------------------------------------------------------------------------------- 1 | 'google_shopping_product', 5 | 'query' => '8129397700139936548', 6 | 'parse' => True, 7 | 'geo' => 'London,England,United Kingdom' 8 | ); 9 | 10 | $ch = curl_init(); 11 | 12 | curl_setopt($ch, CURLOPT_URL, 'https://scraper-api.smartproxy.com/v2/scrape'); 13 | curl_setopt($ch, CURLOPT_USERPWD, 'SPusername' . ':' . 'SPpassword'); 14 | curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); 15 | curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($params)); 16 | curl_setopt($ch, CURLOPT_POST, 1); 17 | 18 | $headers = array(); 19 | $headers[] = 'Content-Type: application/json'; 20 | curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); 21 | 22 | $result = curl_exec($ch); 23 | echo $result; 24 | 25 | if (curl_errno($ch)) { 26 | echo 'Error:' . curl_error($ch); 27 | } 28 | curl_close ($ch); 29 | ?> 30 | -------------------------------------------------------------------------------- /php/googlesuggest.php: -------------------------------------------------------------------------------- 1 | request('POST', 'https://scraper-api.smartproxy.com/v2/scrape', [ 7 | 'body' => '{"target":"google_suggest","query":"world","parse":false}', 8 | 'headers' => [ 9 | 'Content-Type' => 'application/json', 10 | 'accept' => 'application/json', 11 | 'authorization' => 'Basic AUTH', 12 | ], 13 | ]); 14 | 15 | echo $response->getBody(); 16 | -------------------------------------------------------------------------------- /php/googletravel.php: -------------------------------------------------------------------------------- 1 | 'google_travel_hotels', 5 | 'query' => 'hilton', 6 | 'parse' => False, 7 | 'geo' => 'London,England,United Kingdom' 8 | ); 9 | 10 | $ch = curl_init(); 11 | 12 | curl_setopt($ch, CURLOPT_URL, 'https://scraper-api.smartproxy.com/v2/scrape'); 13 | curl_setopt($ch, CURLOPT_USERPWD, 'SPusername' . ':' . 'SPpassword'); 14 | curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); 15 | curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($params)); 16 | curl_setopt($ch, CURLOPT_POST, 1); 17 | 18 | $headers = array(); 19 | $headers[] = 'Content-Type: application/json'; 20 | curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); 21 | 22 | $result = curl_exec($ch); 23 | echo $result; 24 | 25 | if (curl_errno($ch)) { 26 | echo 'Error:' . curl_error($ch); 27 | } 28 | curl_close ($ch); 29 | ?> 30 | -------------------------------------------------------------------------------- /php/googletrendsexplore.php: -------------------------------------------------------------------------------- 1 | 'google_trends_explore', 5 | 'query' => 'pizza', 6 | 'search_type' => 'web_search', 7 | 'date_start' => '2022-01-10', 8 | 'date_end' => '2023-01-10', 9 | 'geo' => 'US', 10 | 'locale' => 'en-us', 11 | 'device_type' => 'desktop' 12 | ); 13 | 14 | $ch = curl_init(); 15 | 16 | curl_setopt($ch, CURLOPT_URL, 'https://scraper-api.smartproxy.com/v2/scrape'); 17 | curl_setopt($ch, CURLOPT_USERPWD, 'SPusername' . ':' . 'SPpassword'); 18 | curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); 19 | curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($params)); 20 | curl_setopt($ch, CURLOPT_POST, 1); 21 | 22 | $headers = array(); 23 | $headers[] = 'Content-Type: application/json'; 24 | curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); 25 | 26 | $result = curl_exec($ch); 27 | echo $result; 28 | 29 | if (curl_errno($ch)) { 30 | echo 'Error:' . curl_error($ch); 31 | } 32 | curl_close ($ch); 33 | ?> 34 | -------------------------------------------------------------------------------- /php/yandexsearch.php: -------------------------------------------------------------------------------- 1 | 'yandex', 5 | 'url' => 'https://yandex.com/search/?text=cookies&lr=10393', 6 | 'parse' => False 7 | ); 8 | 9 | $ch = curl_init(); 10 | 11 | curl_setopt($ch, CURLOPT_URL, 'https://scraper-api.smartproxy.com/v2/scrape'); 12 | curl_setopt($ch, CURLOPT_USERPWD, 'SPusername' . ':' . 'SPpassword'); 13 | curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); 14 | curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($params)); 15 | curl_setopt($ch, CURLOPT_POST, 1); 16 | 17 | $headers = array(); 18 | $headers[] = 'Content-Type: application/json'; 19 | curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); 20 | 21 | $result = curl_exec($ch); 22 | echo $result; 23 | 24 | if (curl_errno($ch)) { 25 | echo 'Error:' . curl_error($ch); 26 | } 27 | curl_close ($ch); 28 | ?> 29 | -------------------------------------------------------------------------------- /php/yandexsearchquery.php: -------------------------------------------------------------------------------- 1 | 'yandex_search', 5 | 'query' => 'cookies', 6 | 'parse' => False 7 | ); 8 | 9 | $ch = curl_init(); 10 | 11 | curl_setopt($ch, CURLOPT_URL, 'https://scraper-api.smartproxy.com/v2/scrape'); 12 | curl_setopt($ch, CURLOPT_USERPWD, 'SPusername' . ':' . 'SPpassword'); 13 | curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); 14 | curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($params)); 15 | curl_setopt($ch, CURLOPT_POST, 1); 16 | 17 | $headers = array(); 18 | $headers[] = 'Content-Type: application/json'; 19 | curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); 20 | 21 | $result = curl_exec($ch); 22 | echo $result; 23 | 24 | if (curl_errno($ch)) { 25 | echo 'Error:' . curl_error($ch); 26 | } 27 | curl_close ($ch); 28 | ?> 29 | -------------------------------------------------------------------------------- /python/baidusearch.py: -------------------------------------------------------------------------------- 1 | import requests 2 | 3 | task_params = { 4 | 'target': 'baidu', 5 | 'url': 'https://www.baidu.com/s?ie=utf-8&f=8&rsv_bp=1&rsv_idx=1&tn=baidu&wd=donuts&fenlei=256&rsv_pq=dc12cef9000cecd5&rsv_t=eb7dbdneGaOeG8buqmqpjMaLZ8tiygOJCtkEqqboaIRy1vnbiFlpef4ieJg&rqlang=cn&rsv_enter=1&rsv_dl=tb&rsv_sug3=6&rsv_sug1=1&rsv_sug7=100&rsv_sug2=0&rsv_btype=i&inputT=6940&rsv_sug4=6940', 6 | 'parse': False 7 | } 8 | 9 | username = 'SPusername' 10 | password = 'SPpassword' 11 | 12 | response = requests.post( 13 | 'https://scraper-api.smartproxy.com/v2/scrape', 14 | json = task_params, 15 | auth = (username, password) 16 | ) 17 | 18 | print(response.text) 19 | -------------------------------------------------------------------------------- /python/baidusearchquery.py: -------------------------------------------------------------------------------- 1 | import requests 2 | 3 | task_params = { 4 | 'target': 'baidu_search', 5 | 'query': 'donuts', 6 | 'parse': False 7 | } 8 | 9 | username = 'SPusername' 10 | password = 'SPpassword' 11 | 12 | response = requests.post( 13 | 'https://scraper-api.smartproxy.com/v2/scrape', 14 | json = task_params, 15 | auth = (username, password) 16 | ) 17 | 18 | print(response.text) 19 | -------------------------------------------------------------------------------- /python/bingsearch.py: -------------------------------------------------------------------------------- 1 | import requests 2 | 3 | task_params = { 4 | 'target': 'bing', 5 | 'url': 'https://www.bing.com/search?q=history', 6 | 'parse': True, 7 | } 8 | 9 | username = 'SPusername' 10 | password = 'SPpassword' 11 | 12 | response = requests.post( 13 | 'https://scraper-api.smartproxy.com/v2/scrape', 14 | json = task_params, 15 | auth = (username, password) 16 | ) 17 | 18 | print(response.text) 19 | -------------------------------------------------------------------------------- /python/bingsearchquery.py: -------------------------------------------------------------------------------- 1 | import requests 2 | 3 | task_params = { 4 | 'target': 'bing_search', 5 | 'query': 'history', 6 | 'parse': True, 7 | } 8 | 9 | username = 'SPusername' 10 | password = 'SPpassword' 11 | 12 | response = requests.post( 13 | 'https://scraper-api.smartproxy.com/v2/scrape', 14 | json = task_params, 15 | auth = (username, password) 16 | ) 17 | 18 | print(response.text) 19 | -------------------------------------------------------------------------------- /python/googleads.py: -------------------------------------------------------------------------------- 1 | import requests 2 | 3 | task_params = { 4 | 'target': 'google_ads', 5 | 'query': 'sneakers', 6 | 'parse': True, 7 | 'geo': 'London,England,United Kingdom' 8 | } 9 | 10 | username = 'SPusername' 11 | password = 'SPpassword' 12 | 13 | response = requests.post( 14 | 'https://scraper-api.smartproxy.com/v2/scrape', 15 | json = task_params, 16 | auth = (username, password) 17 | ) 18 | 19 | print(response.text) 20 | -------------------------------------------------------------------------------- /python/googlehotels.py: -------------------------------------------------------------------------------- 1 | import requests 2 | 3 | task_params = { 4 | 'target': 'google_hotels', 5 | 'query': 'hilton', 6 | 'parse': False, 7 | 'geo': 'London,England,United Kingdom' 8 | } 9 | 10 | username = 'SPusername' 11 | password = 'SPpassword' 12 | 13 | response = requests.post( 14 | 'https://scraper-api.smartproxy.com/v2/scrape', 15 | json = task_params, 16 | auth = (username, password) 17 | ) 18 | 19 | print(response.text) 20 | -------------------------------------------------------------------------------- /python/googleimages.py: -------------------------------------------------------------------------------- 1 | import requests 2 | 3 | task_params = { 4 | 'target': 'google_images', 5 | 'query': 'https://upload.wikimedia.org/wikipedia/commons/7/73/Lion_waiting_in_Namibia.jpg', 6 | 'parse': False, 7 | 'geo': 'London,England,United Kingdom' 8 | } 9 | 10 | username = 'SPusername' 11 | password = 'SPpassword' 12 | 13 | response = requests.post( 14 | 'https://scraper-api.smartproxy.com/v2/scrape', 15 | json = task_params, 16 | auth = (username, password) 17 | ) 18 | 19 | print(response.text) 20 | -------------------------------------------------------------------------------- /python/googlesearch.py: -------------------------------------------------------------------------------- 1 | import requests 2 | 3 | task_params = { 4 | 'target': 'google_search', 5 | 'query': 'history', 6 | 'parse': True, 7 | 'geo': 'London,England,United Kingdom' 8 | } 9 | 10 | username = 'SPusername' 11 | password = 'SPpassword' 12 | 13 | response = requests.post( 14 | 'https://scraper-api.smartproxy.com/v2/scrape', 15 | json = task_params, 16 | auth = (username, password) 17 | ) 18 | 19 | print(response.text) 20 | -------------------------------------------------------------------------------- /python/googlesearchurl.py: -------------------------------------------------------------------------------- 1 | import requests 2 | 3 | task_params = { 4 | 'target': 'google', 5 | 'url': 'https://www.google.com/search?q=history', 6 | 'parse': True, 7 | } 8 | 9 | username = 'SPusername' 10 | password = 'SPpassword' 11 | 12 | response = requests.post( 13 | 'https://scraper-api.smartproxy.com/v2/scrape', 14 | json = task_params, 15 | auth = (username, password) 16 | ) 17 | 18 | print(response.text) 19 | -------------------------------------------------------------------------------- /python/googleshopping.py: -------------------------------------------------------------------------------- 1 | import requests 2 | 3 | task_params = { 4 | 'target': 'google_shopping_search', 5 | 'query': 'sneakers', 6 | 'parse': True, 7 | 'geo': 'London,England,United Kingdom' 8 | } 9 | 10 | username = 'SPusername' 11 | password = 'SPpassword' 12 | 13 | response = requests.post( 14 | 'https://scraper-api.smartproxy.com/v2/scrape', 15 | json = task_params, 16 | auth = (username, password) 17 | ) 18 | 19 | print(response.text) 20 | -------------------------------------------------------------------------------- /python/googleshoppingpricing.py: -------------------------------------------------------------------------------- 1 | import requests 2 | 3 | task_params = { 4 | 'target': 'google_shopping_pricing', 5 | 'query': '1487724521556311753', 6 | 'parse': True, 7 | 'geo': 'London,England,United Kingdom' 8 | } 9 | 10 | username = 'SPusername' 11 | password = 'SPpassword' 12 | 13 | response = requests.post( 14 | 'https://scraper-api.smartproxy.com/v2/scrape', 15 | json = task_params, 16 | auth = (username, password) 17 | ) 18 | 19 | print(response.text) 20 | -------------------------------------------------------------------------------- /python/googleshoppingproduct.py: -------------------------------------------------------------------------------- 1 | import requests 2 | 3 | task_params = { 4 | 'target': 'google_shopping_product', 5 | 'query': '8129397700139936548', 6 | 'parse': True, 7 | 'geo': 'London,England,United Kingdom' 8 | } 9 | 10 | username = 'SPusername' 11 | password = 'SPpassword' 12 | 13 | response = requests.post( 14 | 'https://scraper-api.smartproxy.com/v2/scrape', 15 | json = task_params, 16 | auth = (username, password) 17 | ) 18 | 19 | print(response.text) 20 | -------------------------------------------------------------------------------- /python/googlesuggest.py: -------------------------------------------------------------------------------- 1 | import requests 2 | 3 | task_params = { 4 | 'target': 'google_suggest', 5 | 'query': 'world', 6 | 'parse': False 7 | } 8 | 9 | username = 'SPusername' 10 | password = 'SPpassword' 11 | 12 | response = requests.post( 13 | 'https://scraper-api.smartproxy.com/v2/scrape', 14 | json = task_params, 15 | auth = (username, password) 16 | ) 17 | 18 | print(response.text) 19 | -------------------------------------------------------------------------------- /python/googletravel.py: -------------------------------------------------------------------------------- 1 | import requests 2 | 3 | task_params = { 4 | 'target': 'google_travel_hotels', 5 | 'query': 'hilton', 6 | 'parse': False, 7 | 'geo': 'London,England,United Kingdom' 8 | } 9 | 10 | username = 'SPusername' 11 | password = 'SPpassword' 12 | 13 | response = requests.post( 14 | 'https://scraper-api.smartproxy.com/v2/scrape', 15 | json = task_params, 16 | auth = (username, password) 17 | ) 18 | 19 | print(response.text) 20 | -------------------------------------------------------------------------------- /python/googletrendsexplore.py: -------------------------------------------------------------------------------- 1 | import requests 2 | 3 | task_params = { 4 | 5 | 'target':'google_trends_explore', 6 | 'query': 'pizza', 7 | 'search_type':'web_search', 8 | 'date_start': '2022-01-10', 9 | 'date_end': '2023-01-10', 10 | 'geo':'US', 11 | 'locale':'en-us', 12 | 'device_type':'desktop' 13 | } 14 | 15 | username = 'SPusername' 16 | password = 'SPpassword' 17 | 18 | response = requests.post( 19 | 'https://scraper-api.smartproxy.com/v2/scrape', 20 | json = task_params, 21 | auth = (username, password) 22 | ) 23 | 24 | print(response.text) 25 | -------------------------------------------------------------------------------- /python/yandexsearch.py: -------------------------------------------------------------------------------- 1 | import requests 2 | 3 | task_params = { 4 | 'target': 'yandex', 5 | 'url': 'https://yandex.com/search/?text=cookies&lr=10393', 6 | 'parse': False, 7 | } 8 | 9 | username = 'SPusername' 10 | password = 'SPpassword' 11 | 12 | response = requests.post( 13 | 'https://scraper-api.smartproxy.com/v2/scrape', 14 | json = task_params, 15 | auth = (username, password) 16 | ) 17 | 18 | print(response.text) 19 | -------------------------------------------------------------------------------- /python/yandexsearchquery.py: -------------------------------------------------------------------------------- 1 | import requests 2 | 3 | task_params = { 4 | 'target': 'yandex_search', 5 | 'query': 'cookies', 6 | 'parse': False, 7 | } 8 | 9 | username = 'SPusername' 10 | password = 'SPpassword' 11 | 12 | response = requests.post( 13 | 'https://scraper-api.smartproxy.com/v2/scrape', 14 | json = task_params, 15 | auth = (username, password) 16 | ) 17 | 18 | print(response.text) 19 | --------------------------------------------------------------------------------