All URIs are relative to https://scrapebadger.com, except if the operation defines another base path.
| Method | HTTP request | Description |
|---|---|---|
| baiduBaiduImageSearch() | GET /v1/baidu/images | Baidu image search |
| baiduBaiduNewsSearch() | GET /v1/baidu/news | Baidu news search |
| baiduBaiduScraperHealthCheck() | GET /v1/baidu/health | Baidu scraper health check |
| baiduBaiduScraperHealthCheckHead() | HEAD /v1/baidu/health | Baidu scraper health check |
| baiduBaiduWebSearch() | GET /v1/baidu/search | Baidu web search |
| baiduSearchSuggestions() | GET /v1/baidu/autocomplete | Search suggestions |
baiduBaiduImageSearch($query, $page): mixedBaidu image search
Baidu image search via the acjson JSON API.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: ApiKeyAuth
$config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKey('X-API-Key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-Key', 'Bearer');
$apiInstance = new ScrapeBadger\Api\BaiduApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$query = 'query_example'; // string | Search keywords
$page = 1; // int | 30 images per page
try {
$result = $apiInstance->baiduBaiduImageSearch($query, $page);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling BaiduApi->baiduBaiduImageSearch: ', $e->getMessage(), PHP_EOL;
}| Name | Type | Description | Notes |
|---|---|---|---|
| query | string | Search keywords | |
| page | int | 30 images per page | [optional] [default to 1] |
mixed
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
baiduBaiduNewsSearch($query, $page): mixedBaidu news search
Baidu news vertical — articles with source, publish date and real URLs.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: ApiKeyAuth
$config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKey('X-API-Key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-Key', 'Bearer');
$apiInstance = new ScrapeBadger\Api\BaiduApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$query = 'query_example'; // string | Search keywords
$page = 1; // int
try {
$result = $apiInstance->baiduBaiduNewsSearch($query, $page);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling BaiduApi->baiduBaiduNewsSearch: ', $e->getMessage(), PHP_EOL;
}| Name | Type | Description | Notes |
|---|---|---|---|
| query | string | Search keywords | |
| page | int | [optional] [default to 1] |
mixed
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
baiduBaiduScraperHealthCheck(): mixedBaidu scraper health check
Check health of the Baidu scraper service (accepts HEAD for UptimeRobot).
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: ApiKeyAuth
$config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKey('X-API-Key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-Key', 'Bearer');
$apiInstance = new ScrapeBadger\Api\BaiduApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
try {
$result = $apiInstance->baiduBaiduScraperHealthCheck();
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling BaiduApi->baiduBaiduScraperHealthCheck: ', $e->getMessage(), PHP_EOL;
}This endpoint does not need any parameter.
mixed
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
baiduBaiduScraperHealthCheckHead(): mixedBaidu scraper health check
Check health of the Baidu scraper service (accepts HEAD for UptimeRobot).
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: ApiKeyAuth
$config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKey('X-API-Key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-Key', 'Bearer');
$apiInstance = new ScrapeBadger\Api\BaiduApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
try {
$result = $apiInstance->baiduBaiduScraperHealthCheckHead();
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling BaiduApi->baiduBaiduScraperHealthCheckHead: ', $e->getMessage(), PHP_EOL;
}This endpoint does not need any parameter.
mixed
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
baiduBaiduWebSearch($query, $page, $num): mixedBaidu web search
Baidu web SERP — organic results with real target URLs, related searches, total count.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: ApiKeyAuth
$config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKey('X-API-Key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-Key', 'Bearer');
$apiInstance = new ScrapeBadger\Api\BaiduApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$query = 'query_example'; // string | Search keywords, e.g. '咖啡机' or 'coffee machine'
$page = 1; // int | Result page (10 results per page)
$num = 10; // int | Results per page (rn)
try {
$result = $apiInstance->baiduBaiduWebSearch($query, $page, $num);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling BaiduApi->baiduBaiduWebSearch: ', $e->getMessage(), PHP_EOL;
}| Name | Type | Description | Notes |
|---|---|---|---|
| query | string | Search keywords, e.g. '咖啡机' or 'coffee machine' | |
| page | int | Result page (10 results per page) | [optional] [default to 1] |
| num | int | Results per page (rn) | [optional] [default to 10] |
mixed
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
baiduSearchSuggestions($query): mixedSearch suggestions
Baidu search-box suggestions.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: ApiKeyAuth
$config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKey('X-API-Key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-Key', 'Bearer');
$apiInstance = new ScrapeBadger\Api\BaiduApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$query = 'query_example'; // string | Partial search term, e.g. '咖啡' or 'coff'
try {
$result = $apiInstance->baiduSearchSuggestions($query);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling BaiduApi->baiduSearchSuggestions: ', $e->getMessage(), PHP_EOL;
}| Name | Type | Description | Notes |
|---|---|---|---|
| query | string | Partial search term, e.g. '咖啡' or 'coff' |
mixed
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]