All URIs are relative to https://scrapebadger.com
| 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 |
Object BaiduBaiduImageSearch (string query, int? page = null)
Baidu image search
Baidu image search via the acjson JSON API.
using System.Collections.Generic;
using System.Diagnostics;
using System.Net.Http;
using ScrapeBadger.Api;
using ScrapeBadger.Client;
using ScrapeBadger.Model;
namespace Example
{
public class BaiduBaiduImageSearchExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://scrapebadger.com";
// Configure API key authorization: ApiKeyAuth
config.AddApiKey("X-API-Key", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// config.AddApiKeyPrefix("X-API-Key", "Bearer");
// create instances of HttpClient, HttpClientHandler to be reused later with different Api classes
HttpClient httpClient = new HttpClient();
HttpClientHandler httpClientHandler = new HttpClientHandler();
var apiInstance = new BaiduApi(httpClient, config, httpClientHandler);
var query = "query_example"; // string | Search keywords
var page = 1; // int? | 30 images per page (optional) (default to 1)
try
{
// Baidu image search
Object result = apiInstance.BaiduBaiduImageSearch(query, page);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling BaiduApi.BaiduBaiduImageSearch: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}This returns an ApiResponse object which contains the response data, status code and headers.
try
{
// Baidu image search
ApiResponse<Object> response = apiInstance.BaiduBaiduImageSearchWithHttpInfo(query, page);
Debug.Write("Status Code: " + response.StatusCode);
Debug.Write("Response Headers: " + response.Headers);
Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
Debug.Print("Exception when calling BaiduApi.BaiduBaiduImageSearchWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}| Name | Type | Description | Notes |
|---|---|---|---|
| query | string | Search keywords | |
| page | int? | 30 images per page | [optional] [default to 1] |
Object
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Successful Response | - |
| 422 | Validation Error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Object BaiduBaiduNewsSearch (string query, int? page = null)
Baidu news search
Baidu news vertical — articles with source, publish date and real URLs.
using System.Collections.Generic;
using System.Diagnostics;
using System.Net.Http;
using ScrapeBadger.Api;
using ScrapeBadger.Client;
using ScrapeBadger.Model;
namespace Example
{
public class BaiduBaiduNewsSearchExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://scrapebadger.com";
// Configure API key authorization: ApiKeyAuth
config.AddApiKey("X-API-Key", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// config.AddApiKeyPrefix("X-API-Key", "Bearer");
// create instances of HttpClient, HttpClientHandler to be reused later with different Api classes
HttpClient httpClient = new HttpClient();
HttpClientHandler httpClientHandler = new HttpClientHandler();
var apiInstance = new BaiduApi(httpClient, config, httpClientHandler);
var query = "query_example"; // string | Search keywords
var page = 1; // int? | (optional) (default to 1)
try
{
// Baidu news search
Object result = apiInstance.BaiduBaiduNewsSearch(query, page);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling BaiduApi.BaiduBaiduNewsSearch: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}This returns an ApiResponse object which contains the response data, status code and headers.
try
{
// Baidu news search
ApiResponse<Object> response = apiInstance.BaiduBaiduNewsSearchWithHttpInfo(query, page);
Debug.Write("Status Code: " + response.StatusCode);
Debug.Write("Response Headers: " + response.Headers);
Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
Debug.Print("Exception when calling BaiduApi.BaiduBaiduNewsSearchWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}| Name | Type | Description | Notes |
|---|---|---|---|
| query | string | Search keywords | |
| page | int? | [optional] [default to 1] |
Object
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Successful Response | - |
| 422 | Validation Error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Object BaiduBaiduScraperHealthCheck ()
Baidu scraper health check
Check health of the Baidu scraper service (accepts HEAD for UptimeRobot).
using System.Collections.Generic;
using System.Diagnostics;
using System.Net.Http;
using ScrapeBadger.Api;
using ScrapeBadger.Client;
using ScrapeBadger.Model;
namespace Example
{
public class BaiduBaiduScraperHealthCheckExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://scrapebadger.com";
// Configure API key authorization: ApiKeyAuth
config.AddApiKey("X-API-Key", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// config.AddApiKeyPrefix("X-API-Key", "Bearer");
// create instances of HttpClient, HttpClientHandler to be reused later with different Api classes
HttpClient httpClient = new HttpClient();
HttpClientHandler httpClientHandler = new HttpClientHandler();
var apiInstance = new BaiduApi(httpClient, config, httpClientHandler);
try
{
// Baidu scraper health check
Object result = apiInstance.BaiduBaiduScraperHealthCheck();
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling BaiduApi.BaiduBaiduScraperHealthCheck: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}This returns an ApiResponse object which contains the response data, status code and headers.
try
{
// Baidu scraper health check
ApiResponse<Object> response = apiInstance.BaiduBaiduScraperHealthCheckWithHttpInfo();
Debug.Write("Status Code: " + response.StatusCode);
Debug.Write("Response Headers: " + response.Headers);
Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
Debug.Print("Exception when calling BaiduApi.BaiduBaiduScraperHealthCheckWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}This endpoint does not need any parameter.
Object
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Successful Response | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Object BaiduBaiduScraperHealthCheckHead ()
Baidu scraper health check
Check health of the Baidu scraper service (accepts HEAD for UptimeRobot).
using System.Collections.Generic;
using System.Diagnostics;
using System.Net.Http;
using ScrapeBadger.Api;
using ScrapeBadger.Client;
using ScrapeBadger.Model;
namespace Example
{
public class BaiduBaiduScraperHealthCheckHeadExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://scrapebadger.com";
// Configure API key authorization: ApiKeyAuth
config.AddApiKey("X-API-Key", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// config.AddApiKeyPrefix("X-API-Key", "Bearer");
// create instances of HttpClient, HttpClientHandler to be reused later with different Api classes
HttpClient httpClient = new HttpClient();
HttpClientHandler httpClientHandler = new HttpClientHandler();
var apiInstance = new BaiduApi(httpClient, config, httpClientHandler);
try
{
// Baidu scraper health check
Object result = apiInstance.BaiduBaiduScraperHealthCheckHead();
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling BaiduApi.BaiduBaiduScraperHealthCheckHead: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}This returns an ApiResponse object which contains the response data, status code and headers.
try
{
// Baidu scraper health check
ApiResponse<Object> response = apiInstance.BaiduBaiduScraperHealthCheckHeadWithHttpInfo();
Debug.Write("Status Code: " + response.StatusCode);
Debug.Write("Response Headers: " + response.Headers);
Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
Debug.Print("Exception when calling BaiduApi.BaiduBaiduScraperHealthCheckHeadWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}This endpoint does not need any parameter.
Object
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Successful Response | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Object BaiduBaiduWebSearch (string query, int? page = null, int? num = null)
Baidu web search
Baidu web SERP — organic results with real target URLs, related searches, total count.
using System.Collections.Generic;
using System.Diagnostics;
using System.Net.Http;
using ScrapeBadger.Api;
using ScrapeBadger.Client;
using ScrapeBadger.Model;
namespace Example
{
public class BaiduBaiduWebSearchExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://scrapebadger.com";
// Configure API key authorization: ApiKeyAuth
config.AddApiKey("X-API-Key", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// config.AddApiKeyPrefix("X-API-Key", "Bearer");
// create instances of HttpClient, HttpClientHandler to be reused later with different Api classes
HttpClient httpClient = new HttpClient();
HttpClientHandler httpClientHandler = new HttpClientHandler();
var apiInstance = new BaiduApi(httpClient, config, httpClientHandler);
var query = "query_example"; // string | Search keywords, e.g. '咖啡机' or 'coffee machine'
var page = 1; // int? | Result page (10 results per page) (optional) (default to 1)
var num = 10; // int? | Results per page (rn) (optional) (default to 10)
try
{
// Baidu web search
Object result = apiInstance.BaiduBaiduWebSearch(query, page, num);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling BaiduApi.BaiduBaiduWebSearch: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}This returns an ApiResponse object which contains the response data, status code and headers.
try
{
// Baidu web search
ApiResponse<Object> response = apiInstance.BaiduBaiduWebSearchWithHttpInfo(query, page, num);
Debug.Write("Status Code: " + response.StatusCode);
Debug.Write("Response Headers: " + response.Headers);
Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
Debug.Print("Exception when calling BaiduApi.BaiduBaiduWebSearchWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}| 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] |
Object
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Successful Response | - |
| 422 | Validation Error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Object BaiduSearchSuggestions (string query)
Search suggestions
Baidu search-box suggestions.
using System.Collections.Generic;
using System.Diagnostics;
using System.Net.Http;
using ScrapeBadger.Api;
using ScrapeBadger.Client;
using ScrapeBadger.Model;
namespace Example
{
public class BaiduSearchSuggestionsExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://scrapebadger.com";
// Configure API key authorization: ApiKeyAuth
config.AddApiKey("X-API-Key", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// config.AddApiKeyPrefix("X-API-Key", "Bearer");
// create instances of HttpClient, HttpClientHandler to be reused later with different Api classes
HttpClient httpClient = new HttpClient();
HttpClientHandler httpClientHandler = new HttpClientHandler();
var apiInstance = new BaiduApi(httpClient, config, httpClientHandler);
var query = "query_example"; // string | Partial search term, e.g. '咖啡' or 'coff'
try
{
// Search suggestions
Object result = apiInstance.BaiduSearchSuggestions(query);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling BaiduApi.BaiduSearchSuggestions: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}This returns an ApiResponse object which contains the response data, status code and headers.
try
{
// Search suggestions
ApiResponse<Object> response = apiInstance.BaiduSearchSuggestionsWithHttpInfo(query);
Debug.Write("Status Code: " + response.StatusCode);
Debug.Write("Response Headers: " + response.Headers);
Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
Debug.Print("Exception when calling BaiduApi.BaiduSearchSuggestionsWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}| Name | Type | Description | Notes |
|---|---|---|---|
| query | string | Partial search term, e.g. '咖啡' or 'coff' |
Object
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Successful Response | - |
| 422 | Validation Error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]