All URIs are relative to https://scrapebadger.com
| Method | HTTP request | Description |
|---|---|---|
| bing_bing_scraper_health_check | GET /v1/bing/health | Bing scraper health check |
| bing_bing_scraper_health_check_head | HEAD /v1/bing/health | Bing scraper health check |
| bing_image_search | GET /v1/bing/images | Image search |
| bing_list_supported_markets | GET /v1/bing/markets | List supported markets |
| bing_news_search | GET /v1/bing/news | News search |
| bing_search_suggestions | GET /v1/bing/autocomplete | Search suggestions |
| bing_video_search | GET /v1/bing/videos | Video search |
| bing_web_search | GET /v1/bing/search | Web search |
Object bing_bing_scraper_health_check
Bing scraper health check
Check health of the Bing scraper service (accepts HEAD for UptimeRobot).
require 'time'
require 'scrapebadger'
# setup authorization
ScrapeBadger.configure do |config|
# Configure API key authorization: ApiKeyAuth
config.api_key['X-API-Key'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
# config.api_key_prefix['X-API-Key'] = 'Bearer'
end
api_instance = ScrapeBadger::BingApi.new
begin
# Bing scraper health check
result = api_instance.bing_bing_scraper_health_check
p result
rescue ScrapeBadger::ApiError => e
puts "Error when calling BingApi->bing_bing_scraper_health_check: #{e}"
endThis returns an Array which contains the response data, status code and headers.
<Array(Object, Integer, Hash)> bing_bing_scraper_health_check_with_http_info
begin
# Bing scraper health check
data, status_code, headers = api_instance.bing_bing_scraper_health_check_with_http_info
p status_code # => 2xx
p headers # => { ... }
p data # => Object
rescue ScrapeBadger::ApiError => e
puts "Error when calling BingApi->bing_bing_scraper_health_check_with_http_info: #{e}"
endThis endpoint does not need any parameter.
Object
- Content-Type: Not defined
- Accept: application/json
Object bing_bing_scraper_health_check_head
Bing scraper health check
Check health of the Bing scraper service (accepts HEAD for UptimeRobot).
require 'time'
require 'scrapebadger'
# setup authorization
ScrapeBadger.configure do |config|
# Configure API key authorization: ApiKeyAuth
config.api_key['X-API-Key'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
# config.api_key_prefix['X-API-Key'] = 'Bearer'
end
api_instance = ScrapeBadger::BingApi.new
begin
# Bing scraper health check
result = api_instance.bing_bing_scraper_health_check_head
p result
rescue ScrapeBadger::ApiError => e
puts "Error when calling BingApi->bing_bing_scraper_health_check_head: #{e}"
endThis returns an Array which contains the response data, status code and headers.
<Array(Object, Integer, Hash)> bing_bing_scraper_health_check_head_with_http_info
begin
# Bing scraper health check
data, status_code, headers = api_instance.bing_bing_scraper_health_check_head_with_http_info
p status_code # => 2xx
p headers # => { ... }
p data # => Object
rescue ScrapeBadger::ApiError => e
puts "Error when calling BingApi->bing_bing_scraper_health_check_head_with_http_info: #{e}"
endThis endpoint does not need any parameter.
Object
- Content-Type: Not defined
- Accept: application/json
Object bing_image_search(query, opts)
Image search
Bing Images — thumbnail, full-size and source URL per result.
require 'time'
require 'scrapebadger'
# setup authorization
ScrapeBadger.configure do |config|
# Configure API key authorization: ApiKeyAuth
config.api_key['X-API-Key'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
# config.api_key_prefix['X-API-Key'] = 'Bearer'
end
api_instance = ScrapeBadger::BingApi.new
query = 'query_example' # String | Search keywords, e.g. 'golden retriever'
opts = {
market: 'market_example', # String | Bing market code, e.g. 'en-US', 'en-GB', 'de-DE'. See /markets.
count: 56, # Integer | Results to return
safe_search: 'safe_search_example' # String | off | moderate | strict
}
begin
# Image search
result = api_instance.bing_image_search(query, opts)
p result
rescue ScrapeBadger::ApiError => e
puts "Error when calling BingApi->bing_image_search: #{e}"
endThis returns an Array which contains the response data, status code and headers.
<Array(Object, Integer, Hash)> bing_image_search_with_http_info(query, opts)
begin
# Image search
data, status_code, headers = api_instance.bing_image_search_with_http_info(query, opts)
p status_code # => 2xx
p headers # => { ... }
p data # => Object
rescue ScrapeBadger::ApiError => e
puts "Error when calling BingApi->bing_image_search_with_http_info: #{e}"
end| Name | Type | Description | Notes |
|---|---|---|---|
| query | String | Search keywords, e.g. 'golden retriever' | |
| market | String | Bing market code, e.g. 'en-US', 'en-GB', 'de-DE'. See /markets. | [optional][default to 'en-US'] |
| count | Integer | Results to return | [optional][default to 35] |
| safe_search | String | off | moderate |
Object
- Content-Type: Not defined
- Accept: application/json
Object bing_list_supported_markets
List supported markets
Supported Bing market codes. Free — costs no credits.
require 'time'
require 'scrapebadger'
# setup authorization
ScrapeBadger.configure do |config|
# Configure API key authorization: ApiKeyAuth
config.api_key['X-API-Key'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
# config.api_key_prefix['X-API-Key'] = 'Bearer'
end
api_instance = ScrapeBadger::BingApi.new
begin
# List supported markets
result = api_instance.bing_list_supported_markets
p result
rescue ScrapeBadger::ApiError => e
puts "Error when calling BingApi->bing_list_supported_markets: #{e}"
endThis returns an Array which contains the response data, status code and headers.
<Array(Object, Integer, Hash)> bing_list_supported_markets_with_http_info
begin
# List supported markets
data, status_code, headers = api_instance.bing_list_supported_markets_with_http_info
p status_code # => 2xx
p headers # => { ... }
p data # => Object
rescue ScrapeBadger::ApiError => e
puts "Error when calling BingApi->bing_list_supported_markets_with_http_info: #{e}"
endThis endpoint does not need any parameter.
Object
- Content-Type: Not defined
- Accept: application/json
Object bing_news_search(query, opts)
News search
Bing News — headline, source, published time and snippet per article.
require 'time'
require 'scrapebadger'
# setup authorization
ScrapeBadger.configure do |config|
# Configure API key authorization: ApiKeyAuth
config.api_key['X-API-Key'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
# config.api_key_prefix['X-API-Key'] = 'Bearer'
end
api_instance = ScrapeBadger::BingApi.new
query = 'query_example' # String | Search keywords, e.g. 'interest rates'
opts = {
market: 'market_example', # String | Bing market code, e.g. 'en-US', 'en-GB', 'de-DE'. See /markets.
freshness: 'freshness_example' # String | day | week | month — restrict to recent articles
}
begin
# News search
result = api_instance.bing_news_search(query, opts)
p result
rescue ScrapeBadger::ApiError => e
puts "Error when calling BingApi->bing_news_search: #{e}"
endThis returns an Array which contains the response data, status code and headers.
<Array(Object, Integer, Hash)> bing_news_search_with_http_info(query, opts)
begin
# News search
data, status_code, headers = api_instance.bing_news_search_with_http_info(query, opts)
p status_code # => 2xx
p headers # => { ... }
p data # => Object
rescue ScrapeBadger::ApiError => e
puts "Error when calling BingApi->bing_news_search_with_http_info: #{e}"
end| Name | Type | Description | Notes |
|---|---|---|---|
| query | String | Search keywords, e.g. 'interest rates' | |
| market | String | Bing market code, e.g. 'en-US', 'en-GB', 'de-DE'. See /markets. | [optional][default to 'en-US'] |
| freshness | String | day | week |
Object
- Content-Type: Not defined
- Accept: application/json
Object bing_search_suggestions(query, opts)
Search suggestions
Bing search-box query suggestions.
require 'time'
require 'scrapebadger'
# setup authorization
ScrapeBadger.configure do |config|
# Configure API key authorization: ApiKeyAuth
config.api_key['X-API-Key'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
# config.api_key_prefix['X-API-Key'] = 'Bearer'
end
api_instance = ScrapeBadger::BingApi.new
query = 'query_example' # String | Partial search term, e.g. 'coff'
opts = {
market: 'market_example' # String | Bing market code, e.g. 'en-US', 'en-GB', 'de-DE'. See /markets.
}
begin
# Search suggestions
result = api_instance.bing_search_suggestions(query, opts)
p result
rescue ScrapeBadger::ApiError => e
puts "Error when calling BingApi->bing_search_suggestions: #{e}"
endThis returns an Array which contains the response data, status code and headers.
<Array(Object, Integer, Hash)> bing_search_suggestions_with_http_info(query, opts)
begin
# Search suggestions
data, status_code, headers = api_instance.bing_search_suggestions_with_http_info(query, opts)
p status_code # => 2xx
p headers # => { ... }
p data # => Object
rescue ScrapeBadger::ApiError => e
puts "Error when calling BingApi->bing_search_suggestions_with_http_info: #{e}"
end| Name | Type | Description | Notes |
|---|---|---|---|
| query | String | Partial search term, e.g. 'coff' | |
| market | String | Bing market code, e.g. 'en-US', 'en-GB', 'de-DE'. See /markets. | [optional][default to 'en-US'] |
Object
- Content-Type: Not defined
- Accept: application/json
Object bing_video_search(query, opts)
Video search
Bing Videos — title, thumbnail, duration, publisher and source per result.
require 'time'
require 'scrapebadger'
# setup authorization
ScrapeBadger.configure do |config|
# Configure API key authorization: ApiKeyAuth
config.api_key['X-API-Key'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
# config.api_key_prefix['X-API-Key'] = 'Bearer'
end
api_instance = ScrapeBadger::BingApi.new
query = 'query_example' # String | Search keywords, e.g. 'espresso tutorial'
opts = {
market: 'market_example', # String | Bing market code, e.g. 'en-US', 'en-GB', 'de-DE'. See /markets.
count: 56, # Integer | Results to return
safe_search: 'safe_search_example' # String | off | moderate | strict
}
begin
# Video search
result = api_instance.bing_video_search(query, opts)
p result
rescue ScrapeBadger::ApiError => e
puts "Error when calling BingApi->bing_video_search: #{e}"
endThis returns an Array which contains the response data, status code and headers.
<Array(Object, Integer, Hash)> bing_video_search_with_http_info(query, opts)
begin
# Video search
data, status_code, headers = api_instance.bing_video_search_with_http_info(query, opts)
p status_code # => 2xx
p headers # => { ... }
p data # => Object
rescue ScrapeBadger::ApiError => e
puts "Error when calling BingApi->bing_video_search_with_http_info: #{e}"
end| Name | Type | Description | Notes |
|---|---|---|---|
| query | String | Search keywords, e.g. 'espresso tutorial' | |
| market | String | Bing market code, e.g. 'en-US', 'en-GB', 'de-DE'. See /markets. | [optional][default to 'en-US'] |
| count | Integer | Results to return | [optional][default to 35] |
| safe_search | String | off | moderate |
Object
- Content-Type: Not defined
- Accept: application/json
Object bing_web_search(query, opts)
Web search
Bing web SERP — organic results, ads, related searches and total count.
require 'time'
require 'scrapebadger'
# setup authorization
ScrapeBadger.configure do |config|
# Configure API key authorization: ApiKeyAuth
config.api_key['X-API-Key'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
# config.api_key_prefix['X-API-Key'] = 'Bearer'
end
api_instance = ScrapeBadger::BingApi.new
query = 'query_example' # String | Search keywords, e.g. 'coffee machine'
opts = {
market: 'market_example', # String | Bing market code, e.g. 'en-US', 'en-GB', 'de-DE'. See /markets.
count: 56, # Integer | Results per page (1-50)
offset: 56, # Integer | Zero-based result offset for pagination
safe_search: 'safe_search_example' # String | off | moderate | strict (default moderate)
}
begin
# Web search
result = api_instance.bing_web_search(query, opts)
p result
rescue ScrapeBadger::ApiError => e
puts "Error when calling BingApi->bing_web_search: #{e}"
endThis returns an Array which contains the response data, status code and headers.
<Array(Object, Integer, Hash)> bing_web_search_with_http_info(query, opts)
begin
# Web search
data, status_code, headers = api_instance.bing_web_search_with_http_info(query, opts)
p status_code # => 2xx
p headers # => { ... }
p data # => Object
rescue ScrapeBadger::ApiError => e
puts "Error when calling BingApi->bing_web_search_with_http_info: #{e}"
end| Name | Type | Description | Notes |
|---|---|---|---|
| query | String | Search keywords, e.g. 'coffee machine' | |
| market | String | Bing market code, e.g. 'en-US', 'en-GB', 'de-DE'. See /markets. | [optional][default to 'en-US'] |
| count | Integer | Results per page (1-50) | [optional][default to 10] |
| offset | Integer | Zero-based result offset for pagination | [optional][default to 0] |
| safe_search | String | off | moderate |
Object
- Content-Type: Not defined
- Accept: application/json