scrapebadger 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/Gemfile +9 -0
- data/LICENSE +21 -0
- data/README.md +548 -0
- data/Rakefile +10 -0
- data/docs/AccountApi.md +76 -0
- data/docs/AccountInfo.md +28 -0
- data/docs/AmazonApi.md +1244 -0
- data/docs/ApartmentsApi.md +373 -0
- data/docs/BaiduApi.md +447 -0
- data/docs/BillingLogListResponse.md +24 -0
- data/docs/BillingLogResponse.md +32 -0
- data/docs/BingApi.md +610 -0
- data/docs/ChatGPTApi.md +521 -0
- data/docs/DepopApi.md +542 -0
- data/docs/DuckDuckGoApi.md +700 -0
- data/docs/EBayApi.md +1019 -0
- data/docs/FacebookApi.md +1671 -0
- data/docs/FilterRuleCreate.md +28 -0
- data/docs/FilterRuleDeliveryLogListResponse.md +24 -0
- data/docs/FilterRuleDeliveryLogResponse.md +44 -0
- data/docs/FilterRuleListResponse.md +24 -0
- data/docs/FilterRuleResponse.md +40 -0
- data/docs/FilterRuleUpdate.md +30 -0
- data/docs/FilterRuleValidateRequest.md +18 -0
- data/docs/FilterRuleValidateResponse.md +22 -0
- data/docs/GoogleApi.md +3175 -0
- data/docs/HTTPValidationError.md +18 -0
- data/docs/IdealistaApi.md +822 -0
- data/docs/ImmobiliareApi.md +773 -0
- data/docs/InstagramApi.md +1673 -0
- data/docs/LeboncoinApi.md +884 -0
- data/docs/LinkedInApi.md +925 -0
- data/docs/LoopNetApi.md +529 -0
- data/docs/PortalApiRoutersV1TwitterFilterRulesFilterRulePricingResponse.md +20 -0
- data/docs/RealtorApi.md +474 -0
- data/docs/RedditApi.md +1677 -0
- data/docs/RedfinApi.md +616 -0
- data/docs/StreamMonitorCreate.md +26 -0
- data/docs/StreamMonitorListResponse.md +24 -0
- data/docs/StreamMonitorResponse.md +42 -0
- data/docs/StreamMonitorUpdate.md +28 -0
- data/docs/SubscriptionInfo.md +40 -0
- data/docs/TikTokApi.md +2104 -0
- data/docs/TweetDeliveryLogListResponse.md +24 -0
- data/docs/TweetDeliveryLogResponse.md +44 -0
- data/docs/TwitterApi.md +4091 -0
- data/docs/ValidationError.md +22 -0
- data/docs/ValidationErrorLocInner.md +15 -0
- data/docs/VintedApi.md +766 -0
- data/docs/WalmartApi.md +904 -0
- data/docs/WebApi.md +634 -0
- data/docs/WebhookCreate.md +22 -0
- data/docs/WebhookListItem.md +28 -0
- data/docs/WebhookListResponse.md +20 -0
- data/docs/WebhookResponse.md +26 -0
- data/docs/WebhookTestRequest.md +18 -0
- data/docs/WebhookTestResponse.md +24 -0
- data/docs/YahooApi.md +602 -0
- data/docs/YandexApi.md +450 -0
- data/docs/YouTubeApi.md +2872 -0
- data/docs/ZillowApi.md +622 -0
- data/git_push.sh +57 -0
- data/lib/scrapebadger/api/account_api.rb +79 -0
- data/lib/scrapebadger/api/amazon_api.rb +1165 -0
- data/lib/scrapebadger/api/apartments_api.rb +377 -0
- data/lib/scrapebadger/api/baidu_api.rb +436 -0
- data/lib/scrapebadger/api/bing_api.rb +580 -0
- data/lib/scrapebadger/api/chat_gpt_api.rb +466 -0
- data/lib/scrapebadger/api/depop_api.rb +518 -0
- data/lib/scrapebadger/api/duck_duck_go_api.rb +675 -0
- data/lib/scrapebadger/api/e_bay_api.rb +1029 -0
- data/lib/scrapebadger/api/facebook_api.rb +1492 -0
- data/lib/scrapebadger/api/google_api.rb +3191 -0
- data/lib/scrapebadger/api/idealista_api.rb +864 -0
- data/lib/scrapebadger/api/immobiliare_api.rb +734 -0
- data/lib/scrapebadger/api/instagram_api.rb +1555 -0
- data/lib/scrapebadger/api/leboncoin_api.rb +818 -0
- data/lib/scrapebadger/api/linked_in_api.rb +832 -0
- data/lib/scrapebadger/api/loop_net_api.rb +503 -0
- data/lib/scrapebadger/api/realtor_api.rb +481 -0
- data/lib/scrapebadger/api/reddit_api.rb +1601 -0
- data/lib/scrapebadger/api/redfin_api.rb +625 -0
- data/lib/scrapebadger/api/tik_tok_api.rb +2029 -0
- data/lib/scrapebadger/api/twitter_api.rb +3696 -0
- data/lib/scrapebadger/api/vinted_api.rb +705 -0
- data/lib/scrapebadger/api/walmart_api.rb +876 -0
- data/lib/scrapebadger/api/web_api.rb +547 -0
- data/lib/scrapebadger/api/yahoo_api.rb +560 -0
- data/lib/scrapebadger/api/yandex_api.rb +422 -0
- data/lib/scrapebadger/api/you_tube_api.rb +2520 -0
- data/lib/scrapebadger/api/zillow_api.rb +634 -0
- data/lib/scrapebadger/api_client.rb +394 -0
- data/lib/scrapebadger/api_error.rb +58 -0
- data/lib/scrapebadger/configuration.rb +308 -0
- data/lib/scrapebadger/models/account_info.rb +288 -0
- data/lib/scrapebadger/models/billing_log_list_response.rb +272 -0
- data/lib/scrapebadger/models/billing_log_response.rb +334 -0
- data/lib/scrapebadger/models/filter_rule_create.rb +427 -0
- data/lib/scrapebadger/models/filter_rule_delivery_log_list_response.rb +272 -0
- data/lib/scrapebadger/models/filter_rule_delivery_log_response.rb +422 -0
- data/lib/scrapebadger/models/filter_rule_list_response.rb +272 -0
- data/lib/scrapebadger/models/filter_rule_response.rb +390 -0
- data/lib/scrapebadger/models/filter_rule_update.rb +389 -0
- data/lib/scrapebadger/models/filter_rule_validate_request.rb +250 -0
- data/lib/scrapebadger/models/filter_rule_validate_response.rb +248 -0
- data/lib/scrapebadger/models/http_validation_error.rb +216 -0
- data/lib/scrapebadger/models/portal_api_routers_v1_twitter_filter_rules_filter_rule_pricing_response.rb +238 -0
- data/lib/scrapebadger/models/stream_monitor_create.rb +373 -0
- data/lib/scrapebadger/models/stream_monitor_list_response.rb +272 -0
- data/lib/scrapebadger/models/stream_monitor_response.rb +406 -0
- data/lib/scrapebadger/models/stream_monitor_update.rb +335 -0
- data/lib/scrapebadger/models/subscription_info.rb +352 -0
- data/lib/scrapebadger/models/tweet_delivery_log_list_response.rb +272 -0
- data/lib/scrapebadger/models/tweet_delivery_log_response.rb +422 -0
- data/lib/scrapebadger/models/validation_error.rb +255 -0
- data/lib/scrapebadger/models/validation_error_loc_inner.rb +104 -0
- data/lib/scrapebadger/models/webhook_create.rb +282 -0
- data/lib/scrapebadger/models/webhook_list_item.rb +302 -0
- data/lib/scrapebadger/models/webhook_list_response.rb +240 -0
- data/lib/scrapebadger/models/webhook_response.rb +286 -0
- data/lib/scrapebadger/models/webhook_test_request.rb +223 -0
- data/lib/scrapebadger/models/webhook_test_response.rb +259 -0
- data/lib/scrapebadger/version.rb +15 -0
- data/lib/scrapebadger.rb +96 -0
- data/scrapebadger.gemspec +39 -0
- data/spec/api/account_api_spec.rb +46 -0
- data/spec/api/amazon_api_spec.rb +258 -0
- data/spec/api/apartments_api_spec.rb +98 -0
- data/spec/api/baidu_api_spec.rb +109 -0
- data/spec/api/bing_api_spec.rb +141 -0
- data/spec/api/chat_gpt_api_spec.rb +123 -0
- data/spec/api/depop_api_spec.rb +132 -0
- data/spec/api/duck_duck_go_api_spec.rb +162 -0
- data/spec/api/e_bay_api_spec.rb +222 -0
- data/spec/api/facebook_api_spec.rb +326 -0
- data/spec/api/google_api_spec.rb +649 -0
- data/spec/api/idealista_api_spec.rb +197 -0
- data/spec/api/immobiliare_api_spec.rb +174 -0
- data/spec/api/instagram_api_spec.rb +309 -0
- data/spec/api/leboncoin_api_spec.rb +184 -0
- data/spec/api/linked_in_api_spec.rb +197 -0
- data/spec/api/loop_net_api_spec.rb +127 -0
- data/spec/api/realtor_api_spec.rb +123 -0
- data/spec/api/reddit_api_spec.rb +331 -0
- data/spec/api/redfin_api_spec.rb +147 -0
- data/spec/api/tik_tok_api_spec.rb +413 -0
- data/spec/api/twitter_api_spec.rb +735 -0
- data/spec/api/vinted_api_spec.rb +169 -0
- data/spec/api/walmart_api_spec.rb +192 -0
- data/spec/api/web_api_spec.rb +136 -0
- data/spec/api/yahoo_api_spec.rb +137 -0
- data/spec/api/yandex_api_spec.rb +111 -0
- data/spec/api/you_tube_api_spec.rb +500 -0
- data/spec/api/zillow_api_spec.rb +150 -0
- data/spec/models/account_info_spec.rb +66 -0
- data/spec/models/billing_log_list_response_spec.rb +54 -0
- data/spec/models/billing_log_response_spec.rb +78 -0
- data/spec/models/filter_rule_create_spec.rb +66 -0
- data/spec/models/filter_rule_delivery_log_list_response_spec.rb +54 -0
- data/spec/models/filter_rule_delivery_log_response_spec.rb +114 -0
- data/spec/models/filter_rule_list_response_spec.rb +54 -0
- data/spec/models/filter_rule_response_spec.rb +102 -0
- data/spec/models/filter_rule_update_spec.rb +72 -0
- data/spec/models/filter_rule_validate_request_spec.rb +36 -0
- data/spec/models/filter_rule_validate_response_spec.rb +48 -0
- data/spec/models/http_validation_error_spec.rb +36 -0
- data/spec/models/portal_api_routers_v1_twitter_filter_rules_filter_rule_pricing_response_spec.rb +42 -0
- data/spec/models/stream_monitor_create_spec.rb +60 -0
- data/spec/models/stream_monitor_list_response_spec.rb +54 -0
- data/spec/models/stream_monitor_response_spec.rb +108 -0
- data/spec/models/stream_monitor_update_spec.rb +66 -0
- data/spec/models/subscription_info_spec.rb +102 -0
- data/spec/models/tweet_delivery_log_list_response_spec.rb +54 -0
- data/spec/models/tweet_delivery_log_response_spec.rb +114 -0
- data/spec/models/validation_error_loc_inner_spec.rb +21 -0
- data/spec/models/validation_error_spec.rb +48 -0
- data/spec/models/webhook_create_spec.rb +48 -0
- data/spec/models/webhook_list_item_spec.rb +66 -0
- data/spec/models/webhook_list_response_spec.rb +42 -0
- data/spec/models/webhook_response_spec.rb +60 -0
- data/spec/models/webhook_test_request_spec.rb +36 -0
- data/spec/models/webhook_test_response_spec.rb +54 -0
- data/spec/spec_helper.rb +111 -0
- metadata +324 -0
data/docs/GoogleApi.md
ADDED
|
@@ -0,0 +1,3175 @@
|
|
|
1
|
+
# ScrapeBadger::GoogleApi
|
|
2
|
+
|
|
3
|
+
All URIs are relative to *https://scrapebadger.com*
|
|
4
|
+
|
|
5
|
+
| Method | HTTP request | Description |
|
|
6
|
+
| ------ | ------------ | ----------- |
|
|
7
|
+
| [**google_get_author_citations_per_year_chart**](GoogleApi.md#google_get_author_citations_per_year_chart) | **GET** /v1/google/scholar/author/citation | Get author citations-per-year chart |
|
|
8
|
+
| [**google_get_business_posts**](GoogleApi.md#google_get_business_posts) | **GET** /v1/google/maps/posts | Get business posts |
|
|
9
|
+
| [**google_get_citation_formats_for_a_scholar_paper**](GoogleApi.md#google_get_citation_formats_for_a_scholar_paper) | **GET** /v1/google/scholar/cite | Get citation formats for a Scholar paper |
|
|
10
|
+
| [**google_get_place_details**](GoogleApi.md#google_get_place_details) | **GET** /v1/google/maps/place | Get place details |
|
|
11
|
+
| [**google_get_place_photos**](GoogleApi.md#google_get_place_photos) | **GET** /v1/google/maps/photos | Get place photos |
|
|
12
|
+
| [**google_get_place_reviews**](GoogleApi.md#google_get_place_reviews) | **GET** /v1/google/maps/reviews | Get place reviews |
|
|
13
|
+
| [**google_get_scholar_author_profile**](GoogleApi.md#google_get_scholar_author_profile) | **GET** /v1/google/scholar/author | Get Scholar author profile |
|
|
14
|
+
| [**google_get_stock_index_quote**](GoogleApi.md#google_get_stock_index_quote) | **GET** /v1/google/finance/quote | Get stock/index quote |
|
|
15
|
+
| [**google_google_ai_mode_search**](GoogleApi.md#google_google_ai_mode_search) | **GET** /v1/google/ai-mode/search | Google AI Mode search |
|
|
16
|
+
| [**google_google_ai_overview_inline_serp_block**](GoogleApi.md#google_google_ai_overview_inline_serp_block) | **GET** /v1/google/ai-overview | Google AI Overview (inline SERP block) |
|
|
17
|
+
| [**google_google_flights_calendar_cheapest_fare_per_date**](GoogleApi.md#google_google_flights_calendar_cheapest_fare_per_date) | **GET** /v1/google/flights/calendar | Google Flights calendar — cheapest fare per date |
|
|
18
|
+
| [**google_google_flights_search**](GoogleApi.md#google_google_flights_search) | **GET** /v1/google/flights/search | Google Flights search |
|
|
19
|
+
| [**google_google_lens_visual_search**](GoogleApi.md#google_google_lens_visual_search) | **GET** /v1/google/lens/search | Google Lens visual search |
|
|
20
|
+
| [**google_google_scraper_health_check**](GoogleApi.md#google_google_scraper_health_check) | **GET** /v1/google/health | Google scraper health check |
|
|
21
|
+
| [**google_google_scraper_health_check_head**](GoogleApi.md#google_google_scraper_health_check_head) | **HEAD** /v1/google/health | Google scraper health check |
|
|
22
|
+
| [**google_google_search_suggestions**](GoogleApi.md#google_google_search_suggestions) | **GET** /v1/google/autocomplete | Google search suggestions |
|
|
23
|
+
| [**google_google_shorts_search**](GoogleApi.md#google_google_shorts_search) | **GET** /v1/google/shorts/search | Google Shorts search |
|
|
24
|
+
| [**google_google_web_search**](GoogleApi.md#google_google_web_search) | **GET** /v1/google/search | Google web search |
|
|
25
|
+
| [**google_hotel_details**](GoogleApi.md#google_hotel_details) | **GET** /v1/google/hotels/details | Hotel details |
|
|
26
|
+
| [**google_immersive_product_detail**](GoogleApi.md#google_immersive_product_detail) | **GET** /v1/google/products/detail | Immersive product detail |
|
|
27
|
+
| [**google_interest_by_region**](GoogleApi.md#google_interest_by_region) | **GET** /v1/google/trends/regions | Interest by region |
|
|
28
|
+
| [**google_interest_over_time**](GoogleApi.md#google_interest_over_time) | **GET** /v1/google/trends/interest | Interest over time |
|
|
29
|
+
| [**google_multi_seller_offers_by_barcode**](GoogleApi.md#google_multi_seller_offers_by_barcode) | **GET** /v1/google/shopping/offers | Multi-seller offers by barcode |
|
|
30
|
+
| [**google_news_by_topic**](GoogleApi.md#google_news_by_topic) | **GET** /v1/google/news/topics | News by topic |
|
|
31
|
+
| [**google_patent_details**](GoogleApi.md#google_patent_details) | **GET** /v1/google/patents/detail | Patent details |
|
|
32
|
+
| [**google_related_topics_queries**](GoogleApi.md#google_related_topics_queries) | **GET** /v1/google/trends/related | Related topics & queries |
|
|
33
|
+
| [**google_search_google_images**](GoogleApi.md#google_search_google_images) | **GET** /v1/google/images/search | Search Google Images |
|
|
34
|
+
| [**google_search_google_jobs**](GoogleApi.md#google_search_google_jobs) | **GET** /v1/google/jobs/search | Search Google Jobs |
|
|
35
|
+
| [**google_search_google_maps_places**](GoogleApi.md#google_search_google_maps_places) | **GET** /v1/google/maps/search | Search Google Maps places |
|
|
36
|
+
| [**google_search_google_news**](GoogleApi.md#google_search_google_news) | **GET** /v1/google/news/search | Search Google News |
|
|
37
|
+
| [**google_search_google_scholar**](GoogleApi.md#google_search_google_scholar) | **GET** /v1/google/scholar/search | Search Google Scholar |
|
|
38
|
+
| [**google_search_google_videos**](GoogleApi.md#google_search_google_videos) | **GET** /v1/google/videos/search | Search Google Videos |
|
|
39
|
+
| [**google_search_hotels**](GoogleApi.md#google_search_hotels) | **GET** /v1/google/hotels/search | Search hotels |
|
|
40
|
+
| [**google_search_patents**](GoogleApi.md#google_search_patents) | **GET** /v1/google/patents/search | Search patents |
|
|
41
|
+
| [**google_search_products**](GoogleApi.md#google_search_products) | **GET** /v1/google/shopping/search | Search products |
|
|
42
|
+
| [**google_search_scholar_author_profiles**](GoogleApi.md#google_search_scholar_author_profiles) | **GET** /v1/google/scholar/profiles | Search Scholar author profiles |
|
|
43
|
+
| [**google_trending_news**](GoogleApi.md#google_trending_news) | **GET** /v1/google/news/trending | Trending news |
|
|
44
|
+
| [**google_trending_searches**](GoogleApi.md#google_trending_searches) | **GET** /v1/google/trends/trending | Trending searches |
|
|
45
|
+
| [**google_trends_topic_autocomplete**](GoogleApi.md#google_trends_topic_autocomplete) | **GET** /v1/google/trends/autocomplete | Trends topic autocomplete |
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
## google_get_author_citations_per_year_chart
|
|
49
|
+
|
|
50
|
+
> Object google_get_author_citations_per_year_chart(author_id, opts)
|
|
51
|
+
|
|
52
|
+
Get author citations-per-year chart
|
|
53
|
+
|
|
54
|
+
Return the citations-per-year chart for a Google Scholar author.
|
|
55
|
+
|
|
56
|
+
### Examples
|
|
57
|
+
|
|
58
|
+
```ruby
|
|
59
|
+
require 'time'
|
|
60
|
+
require 'scrapebadger'
|
|
61
|
+
# setup authorization
|
|
62
|
+
ScrapeBadger.configure do |config|
|
|
63
|
+
# Configure API key authorization: ApiKeyAuth
|
|
64
|
+
config.api_key['X-API-Key'] = 'YOUR API KEY'
|
|
65
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
66
|
+
# config.api_key_prefix['X-API-Key'] = 'Bearer'
|
|
67
|
+
end
|
|
68
|
+
|
|
69
|
+
api_instance = ScrapeBadger::GoogleApi.new
|
|
70
|
+
author_id = 'author_id_example' # String | Scholar user ID
|
|
71
|
+
opts = {
|
|
72
|
+
hl: 'hl_example' # String | Language code
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
begin
|
|
76
|
+
# Get author citations-per-year chart
|
|
77
|
+
result = api_instance.google_get_author_citations_per_year_chart(author_id, opts)
|
|
78
|
+
p result
|
|
79
|
+
rescue ScrapeBadger::ApiError => e
|
|
80
|
+
puts "Error when calling GoogleApi->google_get_author_citations_per_year_chart: #{e}"
|
|
81
|
+
end
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
#### Using the google_get_author_citations_per_year_chart_with_http_info variant
|
|
85
|
+
|
|
86
|
+
This returns an Array which contains the response data, status code and headers.
|
|
87
|
+
|
|
88
|
+
> <Array(Object, Integer, Hash)> google_get_author_citations_per_year_chart_with_http_info(author_id, opts)
|
|
89
|
+
|
|
90
|
+
```ruby
|
|
91
|
+
begin
|
|
92
|
+
# Get author citations-per-year chart
|
|
93
|
+
data, status_code, headers = api_instance.google_get_author_citations_per_year_chart_with_http_info(author_id, opts)
|
|
94
|
+
p status_code # => 2xx
|
|
95
|
+
p headers # => { ... }
|
|
96
|
+
p data # => Object
|
|
97
|
+
rescue ScrapeBadger::ApiError => e
|
|
98
|
+
puts "Error when calling GoogleApi->google_get_author_citations_per_year_chart_with_http_info: #{e}"
|
|
99
|
+
end
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
### Parameters
|
|
103
|
+
|
|
104
|
+
| Name | Type | Description | Notes |
|
|
105
|
+
| ---- | ---- | ----------- | ----- |
|
|
106
|
+
| **author_id** | **String** | Scholar user ID | |
|
|
107
|
+
| **hl** | **String** | Language code | [optional][default to 'en'] |
|
|
108
|
+
|
|
109
|
+
### Return type
|
|
110
|
+
|
|
111
|
+
**Object**
|
|
112
|
+
|
|
113
|
+
### Authorization
|
|
114
|
+
|
|
115
|
+
[ApiKeyAuth](../README.md#ApiKeyAuth)
|
|
116
|
+
|
|
117
|
+
### HTTP request headers
|
|
118
|
+
|
|
119
|
+
- **Content-Type**: Not defined
|
|
120
|
+
- **Accept**: application/json
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
## google_get_business_posts
|
|
124
|
+
|
|
125
|
+
> Object google_get_business_posts(data_id, opts)
|
|
126
|
+
|
|
127
|
+
Get business posts
|
|
128
|
+
|
|
129
|
+
### Examples
|
|
130
|
+
|
|
131
|
+
```ruby
|
|
132
|
+
require 'time'
|
|
133
|
+
require 'scrapebadger'
|
|
134
|
+
# setup authorization
|
|
135
|
+
ScrapeBadger.configure do |config|
|
|
136
|
+
# Configure API key authorization: ApiKeyAuth
|
|
137
|
+
config.api_key['X-API-Key'] = 'YOUR API KEY'
|
|
138
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
139
|
+
# config.api_key_prefix['X-API-Key'] = 'Bearer'
|
|
140
|
+
end
|
|
141
|
+
|
|
142
|
+
api_instance = ScrapeBadger::GoogleApi.new
|
|
143
|
+
data_id = 'data_id_example' # String | Maps data ID
|
|
144
|
+
opts = {
|
|
145
|
+
next_page_token: 'next_page_token_example' # String |
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
begin
|
|
149
|
+
# Get business posts
|
|
150
|
+
result = api_instance.google_get_business_posts(data_id, opts)
|
|
151
|
+
p result
|
|
152
|
+
rescue ScrapeBadger::ApiError => e
|
|
153
|
+
puts "Error when calling GoogleApi->google_get_business_posts: #{e}"
|
|
154
|
+
end
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
#### Using the google_get_business_posts_with_http_info variant
|
|
158
|
+
|
|
159
|
+
This returns an Array which contains the response data, status code and headers.
|
|
160
|
+
|
|
161
|
+
> <Array(Object, Integer, Hash)> google_get_business_posts_with_http_info(data_id, opts)
|
|
162
|
+
|
|
163
|
+
```ruby
|
|
164
|
+
begin
|
|
165
|
+
# Get business posts
|
|
166
|
+
data, status_code, headers = api_instance.google_get_business_posts_with_http_info(data_id, opts)
|
|
167
|
+
p status_code # => 2xx
|
|
168
|
+
p headers # => { ... }
|
|
169
|
+
p data # => Object
|
|
170
|
+
rescue ScrapeBadger::ApiError => e
|
|
171
|
+
puts "Error when calling GoogleApi->google_get_business_posts_with_http_info: #{e}"
|
|
172
|
+
end
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
### Parameters
|
|
176
|
+
|
|
177
|
+
| Name | Type | Description | Notes |
|
|
178
|
+
| ---- | ---- | ----------- | ----- |
|
|
179
|
+
| **data_id** | **String** | Maps data ID | |
|
|
180
|
+
| **next_page_token** | **String** | | [optional] |
|
|
181
|
+
|
|
182
|
+
### Return type
|
|
183
|
+
|
|
184
|
+
**Object**
|
|
185
|
+
|
|
186
|
+
### Authorization
|
|
187
|
+
|
|
188
|
+
[ApiKeyAuth](../README.md#ApiKeyAuth)
|
|
189
|
+
|
|
190
|
+
### HTTP request headers
|
|
191
|
+
|
|
192
|
+
- **Content-Type**: Not defined
|
|
193
|
+
- **Accept**: application/json
|
|
194
|
+
|
|
195
|
+
|
|
196
|
+
## google_get_citation_formats_for_a_scholar_paper
|
|
197
|
+
|
|
198
|
+
> Object google_get_citation_formats_for_a_scholar_paper(q, opts)
|
|
199
|
+
|
|
200
|
+
Get citation formats for a Scholar paper
|
|
201
|
+
|
|
202
|
+
Return MLA, APA, Chicago, Harvard, and Vancouver citation formats for a paper.
|
|
203
|
+
|
|
204
|
+
### Examples
|
|
205
|
+
|
|
206
|
+
```ruby
|
|
207
|
+
require 'time'
|
|
208
|
+
require 'scrapebadger'
|
|
209
|
+
# setup authorization
|
|
210
|
+
ScrapeBadger.configure do |config|
|
|
211
|
+
# Configure API key authorization: ApiKeyAuth
|
|
212
|
+
config.api_key['X-API-Key'] = 'YOUR API KEY'
|
|
213
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
214
|
+
# config.api_key_prefix['X-API-Key'] = 'Bearer'
|
|
215
|
+
end
|
|
216
|
+
|
|
217
|
+
api_instance = ScrapeBadger::GoogleApi.new
|
|
218
|
+
q = 'q_example' # String | Cluster ID from a search result
|
|
219
|
+
opts = {
|
|
220
|
+
hl: 'hl_example' # String | Language code
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
begin
|
|
224
|
+
# Get citation formats for a Scholar paper
|
|
225
|
+
result = api_instance.google_get_citation_formats_for_a_scholar_paper(q, opts)
|
|
226
|
+
p result
|
|
227
|
+
rescue ScrapeBadger::ApiError => e
|
|
228
|
+
puts "Error when calling GoogleApi->google_get_citation_formats_for_a_scholar_paper: #{e}"
|
|
229
|
+
end
|
|
230
|
+
```
|
|
231
|
+
|
|
232
|
+
#### Using the google_get_citation_formats_for_a_scholar_paper_with_http_info variant
|
|
233
|
+
|
|
234
|
+
This returns an Array which contains the response data, status code and headers.
|
|
235
|
+
|
|
236
|
+
> <Array(Object, Integer, Hash)> google_get_citation_formats_for_a_scholar_paper_with_http_info(q, opts)
|
|
237
|
+
|
|
238
|
+
```ruby
|
|
239
|
+
begin
|
|
240
|
+
# Get citation formats for a Scholar paper
|
|
241
|
+
data, status_code, headers = api_instance.google_get_citation_formats_for_a_scholar_paper_with_http_info(q, opts)
|
|
242
|
+
p status_code # => 2xx
|
|
243
|
+
p headers # => { ... }
|
|
244
|
+
p data # => Object
|
|
245
|
+
rescue ScrapeBadger::ApiError => e
|
|
246
|
+
puts "Error when calling GoogleApi->google_get_citation_formats_for_a_scholar_paper_with_http_info: #{e}"
|
|
247
|
+
end
|
|
248
|
+
```
|
|
249
|
+
|
|
250
|
+
### Parameters
|
|
251
|
+
|
|
252
|
+
| Name | Type | Description | Notes |
|
|
253
|
+
| ---- | ---- | ----------- | ----- |
|
|
254
|
+
| **q** | **String** | Cluster ID from a search result | |
|
|
255
|
+
| **hl** | **String** | Language code | [optional][default to 'en'] |
|
|
256
|
+
|
|
257
|
+
### Return type
|
|
258
|
+
|
|
259
|
+
**Object**
|
|
260
|
+
|
|
261
|
+
### Authorization
|
|
262
|
+
|
|
263
|
+
[ApiKeyAuth](../README.md#ApiKeyAuth)
|
|
264
|
+
|
|
265
|
+
### HTTP request headers
|
|
266
|
+
|
|
267
|
+
- **Content-Type**: Not defined
|
|
268
|
+
- **Accept**: application/json
|
|
269
|
+
|
|
270
|
+
|
|
271
|
+
## google_get_place_details
|
|
272
|
+
|
|
273
|
+
> Object google_get_place_details(opts)
|
|
274
|
+
|
|
275
|
+
Get place details
|
|
276
|
+
|
|
277
|
+
### Examples
|
|
278
|
+
|
|
279
|
+
```ruby
|
|
280
|
+
require 'time'
|
|
281
|
+
require 'scrapebadger'
|
|
282
|
+
# setup authorization
|
|
283
|
+
ScrapeBadger.configure do |config|
|
|
284
|
+
# Configure API key authorization: ApiKeyAuth
|
|
285
|
+
config.api_key['X-API-Key'] = 'YOUR API KEY'
|
|
286
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
287
|
+
# config.api_key_prefix['X-API-Key'] = 'Bearer'
|
|
288
|
+
end
|
|
289
|
+
|
|
290
|
+
api_instance = ScrapeBadger::GoogleApi.new
|
|
291
|
+
opts = {
|
|
292
|
+
place_id: 'place_id_example', # String |
|
|
293
|
+
data_id: 'data_id_example', # String |
|
|
294
|
+
hl: 'hl_example', # String |
|
|
295
|
+
gl: 'gl_example' # String |
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
begin
|
|
299
|
+
# Get place details
|
|
300
|
+
result = api_instance.google_get_place_details(opts)
|
|
301
|
+
p result
|
|
302
|
+
rescue ScrapeBadger::ApiError => e
|
|
303
|
+
puts "Error when calling GoogleApi->google_get_place_details: #{e}"
|
|
304
|
+
end
|
|
305
|
+
```
|
|
306
|
+
|
|
307
|
+
#### Using the google_get_place_details_with_http_info variant
|
|
308
|
+
|
|
309
|
+
This returns an Array which contains the response data, status code and headers.
|
|
310
|
+
|
|
311
|
+
> <Array(Object, Integer, Hash)> google_get_place_details_with_http_info(opts)
|
|
312
|
+
|
|
313
|
+
```ruby
|
|
314
|
+
begin
|
|
315
|
+
# Get place details
|
|
316
|
+
data, status_code, headers = api_instance.google_get_place_details_with_http_info(opts)
|
|
317
|
+
p status_code # => 2xx
|
|
318
|
+
p headers # => { ... }
|
|
319
|
+
p data # => Object
|
|
320
|
+
rescue ScrapeBadger::ApiError => e
|
|
321
|
+
puts "Error when calling GoogleApi->google_get_place_details_with_http_info: #{e}"
|
|
322
|
+
end
|
|
323
|
+
```
|
|
324
|
+
|
|
325
|
+
### Parameters
|
|
326
|
+
|
|
327
|
+
| Name | Type | Description | Notes |
|
|
328
|
+
| ---- | ---- | ----------- | ----- |
|
|
329
|
+
| **place_id** | **String** | | [optional] |
|
|
330
|
+
| **data_id** | **String** | | [optional] |
|
|
331
|
+
| **hl** | **String** | | [optional][default to 'en'] |
|
|
332
|
+
| **gl** | **String** | | [optional][default to 'us'] |
|
|
333
|
+
|
|
334
|
+
### Return type
|
|
335
|
+
|
|
336
|
+
**Object**
|
|
337
|
+
|
|
338
|
+
### Authorization
|
|
339
|
+
|
|
340
|
+
[ApiKeyAuth](../README.md#ApiKeyAuth)
|
|
341
|
+
|
|
342
|
+
### HTTP request headers
|
|
343
|
+
|
|
344
|
+
- **Content-Type**: Not defined
|
|
345
|
+
- **Accept**: application/json
|
|
346
|
+
|
|
347
|
+
|
|
348
|
+
## google_get_place_photos
|
|
349
|
+
|
|
350
|
+
> Object google_get_place_photos(data_id, opts)
|
|
351
|
+
|
|
352
|
+
Get place photos
|
|
353
|
+
|
|
354
|
+
### Examples
|
|
355
|
+
|
|
356
|
+
```ruby
|
|
357
|
+
require 'time'
|
|
358
|
+
require 'scrapebadger'
|
|
359
|
+
# setup authorization
|
|
360
|
+
ScrapeBadger.configure do |config|
|
|
361
|
+
# Configure API key authorization: ApiKeyAuth
|
|
362
|
+
config.api_key['X-API-Key'] = 'YOUR API KEY'
|
|
363
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
364
|
+
# config.api_key_prefix['X-API-Key'] = 'Bearer'
|
|
365
|
+
end
|
|
366
|
+
|
|
367
|
+
api_instance = ScrapeBadger::GoogleApi.new
|
|
368
|
+
data_id = 'data_id_example' # String | Maps data ID
|
|
369
|
+
opts = {
|
|
370
|
+
hl: 'hl_example', # String |
|
|
371
|
+
next_page_token: 'next_page_token_example' # String |
|
|
372
|
+
}
|
|
373
|
+
|
|
374
|
+
begin
|
|
375
|
+
# Get place photos
|
|
376
|
+
result = api_instance.google_get_place_photos(data_id, opts)
|
|
377
|
+
p result
|
|
378
|
+
rescue ScrapeBadger::ApiError => e
|
|
379
|
+
puts "Error when calling GoogleApi->google_get_place_photos: #{e}"
|
|
380
|
+
end
|
|
381
|
+
```
|
|
382
|
+
|
|
383
|
+
#### Using the google_get_place_photos_with_http_info variant
|
|
384
|
+
|
|
385
|
+
This returns an Array which contains the response data, status code and headers.
|
|
386
|
+
|
|
387
|
+
> <Array(Object, Integer, Hash)> google_get_place_photos_with_http_info(data_id, opts)
|
|
388
|
+
|
|
389
|
+
```ruby
|
|
390
|
+
begin
|
|
391
|
+
# Get place photos
|
|
392
|
+
data, status_code, headers = api_instance.google_get_place_photos_with_http_info(data_id, opts)
|
|
393
|
+
p status_code # => 2xx
|
|
394
|
+
p headers # => { ... }
|
|
395
|
+
p data # => Object
|
|
396
|
+
rescue ScrapeBadger::ApiError => e
|
|
397
|
+
puts "Error when calling GoogleApi->google_get_place_photos_with_http_info: #{e}"
|
|
398
|
+
end
|
|
399
|
+
```
|
|
400
|
+
|
|
401
|
+
### Parameters
|
|
402
|
+
|
|
403
|
+
| Name | Type | Description | Notes |
|
|
404
|
+
| ---- | ---- | ----------- | ----- |
|
|
405
|
+
| **data_id** | **String** | Maps data ID | |
|
|
406
|
+
| **hl** | **String** | | [optional][default to 'en'] |
|
|
407
|
+
| **next_page_token** | **String** | | [optional] |
|
|
408
|
+
|
|
409
|
+
### Return type
|
|
410
|
+
|
|
411
|
+
**Object**
|
|
412
|
+
|
|
413
|
+
### Authorization
|
|
414
|
+
|
|
415
|
+
[ApiKeyAuth](../README.md#ApiKeyAuth)
|
|
416
|
+
|
|
417
|
+
### HTTP request headers
|
|
418
|
+
|
|
419
|
+
- **Content-Type**: Not defined
|
|
420
|
+
- **Accept**: application/json
|
|
421
|
+
|
|
422
|
+
|
|
423
|
+
## google_get_place_reviews
|
|
424
|
+
|
|
425
|
+
> Object google_get_place_reviews(data_id, opts)
|
|
426
|
+
|
|
427
|
+
Get place reviews
|
|
428
|
+
|
|
429
|
+
### Examples
|
|
430
|
+
|
|
431
|
+
```ruby
|
|
432
|
+
require 'time'
|
|
433
|
+
require 'scrapebadger'
|
|
434
|
+
# setup authorization
|
|
435
|
+
ScrapeBadger.configure do |config|
|
|
436
|
+
# Configure API key authorization: ApiKeyAuth
|
|
437
|
+
config.api_key['X-API-Key'] = 'YOUR API KEY'
|
|
438
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
439
|
+
# config.api_key_prefix['X-API-Key'] = 'Bearer'
|
|
440
|
+
end
|
|
441
|
+
|
|
442
|
+
api_instance = ScrapeBadger::GoogleApi.new
|
|
443
|
+
data_id = 'data_id_example' # String | Maps data ID
|
|
444
|
+
opts = {
|
|
445
|
+
sort_by: 'sort_by_example', # String |
|
|
446
|
+
hl: 'hl_example', # String |
|
|
447
|
+
next_page_token: 'next_page_token_example', # String |
|
|
448
|
+
results: 56 # Integer |
|
|
449
|
+
}
|
|
450
|
+
|
|
451
|
+
begin
|
|
452
|
+
# Get place reviews
|
|
453
|
+
result = api_instance.google_get_place_reviews(data_id, opts)
|
|
454
|
+
p result
|
|
455
|
+
rescue ScrapeBadger::ApiError => e
|
|
456
|
+
puts "Error when calling GoogleApi->google_get_place_reviews: #{e}"
|
|
457
|
+
end
|
|
458
|
+
```
|
|
459
|
+
|
|
460
|
+
#### Using the google_get_place_reviews_with_http_info variant
|
|
461
|
+
|
|
462
|
+
This returns an Array which contains the response data, status code and headers.
|
|
463
|
+
|
|
464
|
+
> <Array(Object, Integer, Hash)> google_get_place_reviews_with_http_info(data_id, opts)
|
|
465
|
+
|
|
466
|
+
```ruby
|
|
467
|
+
begin
|
|
468
|
+
# Get place reviews
|
|
469
|
+
data, status_code, headers = api_instance.google_get_place_reviews_with_http_info(data_id, opts)
|
|
470
|
+
p status_code # => 2xx
|
|
471
|
+
p headers # => { ... }
|
|
472
|
+
p data # => Object
|
|
473
|
+
rescue ScrapeBadger::ApiError => e
|
|
474
|
+
puts "Error when calling GoogleApi->google_get_place_reviews_with_http_info: #{e}"
|
|
475
|
+
end
|
|
476
|
+
```
|
|
477
|
+
|
|
478
|
+
### Parameters
|
|
479
|
+
|
|
480
|
+
| Name | Type | Description | Notes |
|
|
481
|
+
| ---- | ---- | ----------- | ----- |
|
|
482
|
+
| **data_id** | **String** | Maps data ID | |
|
|
483
|
+
| **sort_by** | **String** | | [optional][default to 'qualityScore'] |
|
|
484
|
+
| **hl** | **String** | | [optional][default to 'en'] |
|
|
485
|
+
| **next_page_token** | **String** | | [optional] |
|
|
486
|
+
| **results** | **Integer** | | [optional][default to 10] |
|
|
487
|
+
|
|
488
|
+
### Return type
|
|
489
|
+
|
|
490
|
+
**Object**
|
|
491
|
+
|
|
492
|
+
### Authorization
|
|
493
|
+
|
|
494
|
+
[ApiKeyAuth](../README.md#ApiKeyAuth)
|
|
495
|
+
|
|
496
|
+
### HTTP request headers
|
|
497
|
+
|
|
498
|
+
- **Content-Type**: Not defined
|
|
499
|
+
- **Accept**: application/json
|
|
500
|
+
|
|
501
|
+
|
|
502
|
+
## google_get_scholar_author_profile
|
|
503
|
+
|
|
504
|
+
> Object google_get_scholar_author_profile(author_id, opts)
|
|
505
|
+
|
|
506
|
+
Get Scholar author profile
|
|
507
|
+
|
|
508
|
+
Get detailed Google Scholar author profile including articles, stats, co-authors.
|
|
509
|
+
|
|
510
|
+
### Examples
|
|
511
|
+
|
|
512
|
+
```ruby
|
|
513
|
+
require 'time'
|
|
514
|
+
require 'scrapebadger'
|
|
515
|
+
# setup authorization
|
|
516
|
+
ScrapeBadger.configure do |config|
|
|
517
|
+
# Configure API key authorization: ApiKeyAuth
|
|
518
|
+
config.api_key['X-API-Key'] = 'YOUR API KEY'
|
|
519
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
520
|
+
# config.api_key_prefix['X-API-Key'] = 'Bearer'
|
|
521
|
+
end
|
|
522
|
+
|
|
523
|
+
api_instance = ScrapeBadger::GoogleApi.new
|
|
524
|
+
author_id = 'author_id_example' # String | Scholar user ID (the `user` query parameter)
|
|
525
|
+
opts = {
|
|
526
|
+
hl: 'hl_example', # String | Language code
|
|
527
|
+
cstart: 56, # Integer | Articles pagination offset
|
|
528
|
+
pagesize: 56 # Integer | Articles per page
|
|
529
|
+
}
|
|
530
|
+
|
|
531
|
+
begin
|
|
532
|
+
# Get Scholar author profile
|
|
533
|
+
result = api_instance.google_get_scholar_author_profile(author_id, opts)
|
|
534
|
+
p result
|
|
535
|
+
rescue ScrapeBadger::ApiError => e
|
|
536
|
+
puts "Error when calling GoogleApi->google_get_scholar_author_profile: #{e}"
|
|
537
|
+
end
|
|
538
|
+
```
|
|
539
|
+
|
|
540
|
+
#### Using the google_get_scholar_author_profile_with_http_info variant
|
|
541
|
+
|
|
542
|
+
This returns an Array which contains the response data, status code and headers.
|
|
543
|
+
|
|
544
|
+
> <Array(Object, Integer, Hash)> google_get_scholar_author_profile_with_http_info(author_id, opts)
|
|
545
|
+
|
|
546
|
+
```ruby
|
|
547
|
+
begin
|
|
548
|
+
# Get Scholar author profile
|
|
549
|
+
data, status_code, headers = api_instance.google_get_scholar_author_profile_with_http_info(author_id, opts)
|
|
550
|
+
p status_code # => 2xx
|
|
551
|
+
p headers # => { ... }
|
|
552
|
+
p data # => Object
|
|
553
|
+
rescue ScrapeBadger::ApiError => e
|
|
554
|
+
puts "Error when calling GoogleApi->google_get_scholar_author_profile_with_http_info: #{e}"
|
|
555
|
+
end
|
|
556
|
+
```
|
|
557
|
+
|
|
558
|
+
### Parameters
|
|
559
|
+
|
|
560
|
+
| Name | Type | Description | Notes |
|
|
561
|
+
| ---- | ---- | ----------- | ----- |
|
|
562
|
+
| **author_id** | **String** | Scholar user ID (the `user` query parameter) | |
|
|
563
|
+
| **hl** | **String** | Language code | [optional][default to 'en'] |
|
|
564
|
+
| **cstart** | **Integer** | Articles pagination offset | [optional][default to 0] |
|
|
565
|
+
| **pagesize** | **Integer** | Articles per page | [optional][default to 20] |
|
|
566
|
+
|
|
567
|
+
### Return type
|
|
568
|
+
|
|
569
|
+
**Object**
|
|
570
|
+
|
|
571
|
+
### Authorization
|
|
572
|
+
|
|
573
|
+
[ApiKeyAuth](../README.md#ApiKeyAuth)
|
|
574
|
+
|
|
575
|
+
### HTTP request headers
|
|
576
|
+
|
|
577
|
+
- **Content-Type**: Not defined
|
|
578
|
+
- **Accept**: application/json
|
|
579
|
+
|
|
580
|
+
|
|
581
|
+
## google_get_stock_index_quote
|
|
582
|
+
|
|
583
|
+
> Object google_get_stock_index_quote(q, opts)
|
|
584
|
+
|
|
585
|
+
Get stock/index quote
|
|
586
|
+
|
|
587
|
+
Get a stock or index quote from Google Finance.
|
|
588
|
+
|
|
589
|
+
### Examples
|
|
590
|
+
|
|
591
|
+
```ruby
|
|
592
|
+
require 'time'
|
|
593
|
+
require 'scrapebadger'
|
|
594
|
+
# setup authorization
|
|
595
|
+
ScrapeBadger.configure do |config|
|
|
596
|
+
# Configure API key authorization: ApiKeyAuth
|
|
597
|
+
config.api_key['X-API-Key'] = 'YOUR API KEY'
|
|
598
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
599
|
+
# config.api_key_prefix['X-API-Key'] = 'Bearer'
|
|
600
|
+
end
|
|
601
|
+
|
|
602
|
+
api_instance = ScrapeBadger::GoogleApi.new
|
|
603
|
+
q = 'q_example' # String | Ticker and exchange (e.g. \"AAPL:NASDAQ\", \"BTC-USD\")
|
|
604
|
+
opts = {
|
|
605
|
+
hl: 'hl_example' # String | Language code
|
|
606
|
+
}
|
|
607
|
+
|
|
608
|
+
begin
|
|
609
|
+
# Get stock/index quote
|
|
610
|
+
result = api_instance.google_get_stock_index_quote(q, opts)
|
|
611
|
+
p result
|
|
612
|
+
rescue ScrapeBadger::ApiError => e
|
|
613
|
+
puts "Error when calling GoogleApi->google_get_stock_index_quote: #{e}"
|
|
614
|
+
end
|
|
615
|
+
```
|
|
616
|
+
|
|
617
|
+
#### Using the google_get_stock_index_quote_with_http_info variant
|
|
618
|
+
|
|
619
|
+
This returns an Array which contains the response data, status code and headers.
|
|
620
|
+
|
|
621
|
+
> <Array(Object, Integer, Hash)> google_get_stock_index_quote_with_http_info(q, opts)
|
|
622
|
+
|
|
623
|
+
```ruby
|
|
624
|
+
begin
|
|
625
|
+
# Get stock/index quote
|
|
626
|
+
data, status_code, headers = api_instance.google_get_stock_index_quote_with_http_info(q, opts)
|
|
627
|
+
p status_code # => 2xx
|
|
628
|
+
p headers # => { ... }
|
|
629
|
+
p data # => Object
|
|
630
|
+
rescue ScrapeBadger::ApiError => e
|
|
631
|
+
puts "Error when calling GoogleApi->google_get_stock_index_quote_with_http_info: #{e}"
|
|
632
|
+
end
|
|
633
|
+
```
|
|
634
|
+
|
|
635
|
+
### Parameters
|
|
636
|
+
|
|
637
|
+
| Name | Type | Description | Notes |
|
|
638
|
+
| ---- | ---- | ----------- | ----- |
|
|
639
|
+
| **q** | **String** | Ticker and exchange (e.g. \"AAPL:NASDAQ\", \"BTC-USD\") | |
|
|
640
|
+
| **hl** | **String** | Language code | [optional][default to 'en'] |
|
|
641
|
+
|
|
642
|
+
### Return type
|
|
643
|
+
|
|
644
|
+
**Object**
|
|
645
|
+
|
|
646
|
+
### Authorization
|
|
647
|
+
|
|
648
|
+
[ApiKeyAuth](../README.md#ApiKeyAuth)
|
|
649
|
+
|
|
650
|
+
### HTTP request headers
|
|
651
|
+
|
|
652
|
+
- **Content-Type**: Not defined
|
|
653
|
+
- **Accept**: application/json
|
|
654
|
+
|
|
655
|
+
|
|
656
|
+
## google_google_ai_mode_search
|
|
657
|
+
|
|
658
|
+
> Object google_google_ai_mode_search(q, opts)
|
|
659
|
+
|
|
660
|
+
Google AI Mode search
|
|
661
|
+
|
|
662
|
+
Get AI-generated search results from Google AI Mode. Returns the structured `text_blocks` (paragraphs, headings, comparison `table` blocks and lists), a flat `references` source list, a compact `markdown` rendering of the whole answer and — unless `include_html` is false — the raw `answer_html` body.
|
|
663
|
+
|
|
664
|
+
### Examples
|
|
665
|
+
|
|
666
|
+
```ruby
|
|
667
|
+
require 'time'
|
|
668
|
+
require 'scrapebadger'
|
|
669
|
+
# setup authorization
|
|
670
|
+
ScrapeBadger.configure do |config|
|
|
671
|
+
# Configure API key authorization: ApiKeyAuth
|
|
672
|
+
config.api_key['X-API-Key'] = 'YOUR API KEY'
|
|
673
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
674
|
+
# config.api_key_prefix['X-API-Key'] = 'Bearer'
|
|
675
|
+
end
|
|
676
|
+
|
|
677
|
+
api_instance = ScrapeBadger::GoogleApi.new
|
|
678
|
+
q = 'q_example' # String | Search query for AI-generated response
|
|
679
|
+
opts = {
|
|
680
|
+
gl: 'gl_example', # String | Country code
|
|
681
|
+
hl: 'hl_example', # String | Language code
|
|
682
|
+
include_html: true # Boolean | Include the raw `answer_html` (full answer body HTML) in the response for maximum parity. It can be 100s of KB — set false when you only need the structured `text_blocks` + `markdown`.
|
|
683
|
+
}
|
|
684
|
+
|
|
685
|
+
begin
|
|
686
|
+
# Google AI Mode search
|
|
687
|
+
result = api_instance.google_google_ai_mode_search(q, opts)
|
|
688
|
+
p result
|
|
689
|
+
rescue ScrapeBadger::ApiError => e
|
|
690
|
+
puts "Error when calling GoogleApi->google_google_ai_mode_search: #{e}"
|
|
691
|
+
end
|
|
692
|
+
```
|
|
693
|
+
|
|
694
|
+
#### Using the google_google_ai_mode_search_with_http_info variant
|
|
695
|
+
|
|
696
|
+
This returns an Array which contains the response data, status code and headers.
|
|
697
|
+
|
|
698
|
+
> <Array(Object, Integer, Hash)> google_google_ai_mode_search_with_http_info(q, opts)
|
|
699
|
+
|
|
700
|
+
```ruby
|
|
701
|
+
begin
|
|
702
|
+
# Google AI Mode search
|
|
703
|
+
data, status_code, headers = api_instance.google_google_ai_mode_search_with_http_info(q, opts)
|
|
704
|
+
p status_code # => 2xx
|
|
705
|
+
p headers # => { ... }
|
|
706
|
+
p data # => Object
|
|
707
|
+
rescue ScrapeBadger::ApiError => e
|
|
708
|
+
puts "Error when calling GoogleApi->google_google_ai_mode_search_with_http_info: #{e}"
|
|
709
|
+
end
|
|
710
|
+
```
|
|
711
|
+
|
|
712
|
+
### Parameters
|
|
713
|
+
|
|
714
|
+
| Name | Type | Description | Notes |
|
|
715
|
+
| ---- | ---- | ----------- | ----- |
|
|
716
|
+
| **q** | **String** | Search query for AI-generated response | |
|
|
717
|
+
| **gl** | **String** | Country code | [optional][default to 'us'] |
|
|
718
|
+
| **hl** | **String** | Language code | [optional][default to 'en'] |
|
|
719
|
+
| **include_html** | **Boolean** | Include the raw `answer_html` (full answer body HTML) in the response for maximum parity. It can be 100s of KB — set false when you only need the structured `text_blocks` + `markdown`. | [optional][default to true] |
|
|
720
|
+
|
|
721
|
+
### Return type
|
|
722
|
+
|
|
723
|
+
**Object**
|
|
724
|
+
|
|
725
|
+
### Authorization
|
|
726
|
+
|
|
727
|
+
[ApiKeyAuth](../README.md#ApiKeyAuth)
|
|
728
|
+
|
|
729
|
+
### HTTP request headers
|
|
730
|
+
|
|
731
|
+
- **Content-Type**: Not defined
|
|
732
|
+
- **Accept**: application/json
|
|
733
|
+
|
|
734
|
+
|
|
735
|
+
## google_google_ai_overview_inline_serp_block
|
|
736
|
+
|
|
737
|
+
> Object google_google_ai_overview_inline_serp_block(q, opts)
|
|
738
|
+
|
|
739
|
+
Google AI Overview (inline SERP block)
|
|
740
|
+
|
|
741
|
+
Get the AI Overview block Google renders inline at the top of a SERP. Deferred overviews (where Google lazy-loads the block via a follow-up ``page_token``) are chased automatically.
|
|
742
|
+
|
|
743
|
+
### Examples
|
|
744
|
+
|
|
745
|
+
```ruby
|
|
746
|
+
require 'time'
|
|
747
|
+
require 'scrapebadger'
|
|
748
|
+
# setup authorization
|
|
749
|
+
ScrapeBadger.configure do |config|
|
|
750
|
+
# Configure API key authorization: ApiKeyAuth
|
|
751
|
+
config.api_key['X-API-Key'] = 'YOUR API KEY'
|
|
752
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
753
|
+
# config.api_key_prefix['X-API-Key'] = 'Bearer'
|
|
754
|
+
end
|
|
755
|
+
|
|
756
|
+
api_instance = ScrapeBadger::GoogleApi.new
|
|
757
|
+
q = 'q_example' # String | Search query — same shape as a Google Search query
|
|
758
|
+
opts = {
|
|
759
|
+
gl: 'gl_example', # String | Country code
|
|
760
|
+
hl: 'hl_example' # String | Language code
|
|
761
|
+
}
|
|
762
|
+
|
|
763
|
+
begin
|
|
764
|
+
# Google AI Overview (inline SERP block)
|
|
765
|
+
result = api_instance.google_google_ai_overview_inline_serp_block(q, opts)
|
|
766
|
+
p result
|
|
767
|
+
rescue ScrapeBadger::ApiError => e
|
|
768
|
+
puts "Error when calling GoogleApi->google_google_ai_overview_inline_serp_block: #{e}"
|
|
769
|
+
end
|
|
770
|
+
```
|
|
771
|
+
|
|
772
|
+
#### Using the google_google_ai_overview_inline_serp_block_with_http_info variant
|
|
773
|
+
|
|
774
|
+
This returns an Array which contains the response data, status code and headers.
|
|
775
|
+
|
|
776
|
+
> <Array(Object, Integer, Hash)> google_google_ai_overview_inline_serp_block_with_http_info(q, opts)
|
|
777
|
+
|
|
778
|
+
```ruby
|
|
779
|
+
begin
|
|
780
|
+
# Google AI Overview (inline SERP block)
|
|
781
|
+
data, status_code, headers = api_instance.google_google_ai_overview_inline_serp_block_with_http_info(q, opts)
|
|
782
|
+
p status_code # => 2xx
|
|
783
|
+
p headers # => { ... }
|
|
784
|
+
p data # => Object
|
|
785
|
+
rescue ScrapeBadger::ApiError => e
|
|
786
|
+
puts "Error when calling GoogleApi->google_google_ai_overview_inline_serp_block_with_http_info: #{e}"
|
|
787
|
+
end
|
|
788
|
+
```
|
|
789
|
+
|
|
790
|
+
### Parameters
|
|
791
|
+
|
|
792
|
+
| Name | Type | Description | Notes |
|
|
793
|
+
| ---- | ---- | ----------- | ----- |
|
|
794
|
+
| **q** | **String** | Search query — same shape as a Google Search query | |
|
|
795
|
+
| **gl** | **String** | Country code | [optional][default to 'us'] |
|
|
796
|
+
| **hl** | **String** | Language code | [optional][default to 'en'] |
|
|
797
|
+
|
|
798
|
+
### Return type
|
|
799
|
+
|
|
800
|
+
**Object**
|
|
801
|
+
|
|
802
|
+
### Authorization
|
|
803
|
+
|
|
804
|
+
[ApiKeyAuth](../README.md#ApiKeyAuth)
|
|
805
|
+
|
|
806
|
+
### HTTP request headers
|
|
807
|
+
|
|
808
|
+
- **Content-Type**: Not defined
|
|
809
|
+
- **Accept**: application/json
|
|
810
|
+
|
|
811
|
+
|
|
812
|
+
## google_google_flights_calendar_cheapest_fare_per_date
|
|
813
|
+
|
|
814
|
+
> Object google_google_flights_calendar_cheapest_fare_per_date(departure_id, arrival_id, outbound_date_from, outbound_date_to, opts)
|
|
815
|
+
|
|
816
|
+
Google Flights calendar — cheapest fare per date
|
|
817
|
+
|
|
818
|
+
Price a whole range of dates in one call — up to 200 dates per request. Google Flights' own price graph / date grid: the cheapest fare per departure date instead of one search per date. Prices match `/flights/search` exactly.
|
|
819
|
+
|
|
820
|
+
### Examples
|
|
821
|
+
|
|
822
|
+
```ruby
|
|
823
|
+
require 'time'
|
|
824
|
+
require 'scrapebadger'
|
|
825
|
+
# setup authorization
|
|
826
|
+
ScrapeBadger.configure do |config|
|
|
827
|
+
# Configure API key authorization: ApiKeyAuth
|
|
828
|
+
config.api_key['X-API-Key'] = 'YOUR API KEY'
|
|
829
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
830
|
+
# config.api_key_prefix['X-API-Key'] = 'Bearer'
|
|
831
|
+
end
|
|
832
|
+
|
|
833
|
+
api_instance = ScrapeBadger::GoogleApi.new
|
|
834
|
+
departure_id = 'departure_id_example' # String | Departure airport IATA code or location ID
|
|
835
|
+
arrival_id = 'arrival_id_example' # String | Arrival airport IATA code or location ID
|
|
836
|
+
outbound_date_from = 'outbound_date_from_example' # String | First outbound date to price (YYYY-MM-DD)
|
|
837
|
+
outbound_date_to = 'outbound_date_to_example' # String | Last outbound date to price (YYYY-MM-DD). At most 200 days from outbound_date_from, or 14 in date-grid mode.
|
|
838
|
+
opts = {
|
|
839
|
+
trip_type: 'trip_type_example', # String | one_way | round_trip
|
|
840
|
+
trip_length_days: 56, # Integer | Round-trip stay length in nights (price-graph mode). Defaults to 7.
|
|
841
|
+
return_date_from: 'return_date_from_example', # String | Date-grid mode: first return date. With return_date_to, returns the full outbound x return matrix (each range at most 14 days). Round-trip only.
|
|
842
|
+
return_date_to: 'return_date_to_example', # String | Date-grid mode: last return date
|
|
843
|
+
adults: 56, # Integer |
|
|
844
|
+
children: 56, # Integer |
|
|
845
|
+
infants_in_seat: 56, # Integer |
|
|
846
|
+
infants_on_lap: 56, # Integer |
|
|
847
|
+
travel_class: 'travel_class_example', # String |
|
|
848
|
+
currency: 'currency_example', # String | ISO-4217 currency
|
|
849
|
+
gl: 'gl_example', # String |
|
|
850
|
+
hl: 'hl_example' # String |
|
|
851
|
+
}
|
|
852
|
+
|
|
853
|
+
begin
|
|
854
|
+
# Google Flights calendar — cheapest fare per date
|
|
855
|
+
result = api_instance.google_google_flights_calendar_cheapest_fare_per_date(departure_id, arrival_id, outbound_date_from, outbound_date_to, opts)
|
|
856
|
+
p result
|
|
857
|
+
rescue ScrapeBadger::ApiError => e
|
|
858
|
+
puts "Error when calling GoogleApi->google_google_flights_calendar_cheapest_fare_per_date: #{e}"
|
|
859
|
+
end
|
|
860
|
+
```
|
|
861
|
+
|
|
862
|
+
#### Using the google_google_flights_calendar_cheapest_fare_per_date_with_http_info variant
|
|
863
|
+
|
|
864
|
+
This returns an Array which contains the response data, status code and headers.
|
|
865
|
+
|
|
866
|
+
> <Array(Object, Integer, Hash)> google_google_flights_calendar_cheapest_fare_per_date_with_http_info(departure_id, arrival_id, outbound_date_from, outbound_date_to, opts)
|
|
867
|
+
|
|
868
|
+
```ruby
|
|
869
|
+
begin
|
|
870
|
+
# Google Flights calendar — cheapest fare per date
|
|
871
|
+
data, status_code, headers = api_instance.google_google_flights_calendar_cheapest_fare_per_date_with_http_info(departure_id, arrival_id, outbound_date_from, outbound_date_to, opts)
|
|
872
|
+
p status_code # => 2xx
|
|
873
|
+
p headers # => { ... }
|
|
874
|
+
p data # => Object
|
|
875
|
+
rescue ScrapeBadger::ApiError => e
|
|
876
|
+
puts "Error when calling GoogleApi->google_google_flights_calendar_cheapest_fare_per_date_with_http_info: #{e}"
|
|
877
|
+
end
|
|
878
|
+
```
|
|
879
|
+
|
|
880
|
+
### Parameters
|
|
881
|
+
|
|
882
|
+
| Name | Type | Description | Notes |
|
|
883
|
+
| ---- | ---- | ----------- | ----- |
|
|
884
|
+
| **departure_id** | **String** | Departure airport IATA code or location ID | |
|
|
885
|
+
| **arrival_id** | **String** | Arrival airport IATA code or location ID | |
|
|
886
|
+
| **outbound_date_from** | **String** | First outbound date to price (YYYY-MM-DD) | |
|
|
887
|
+
| **outbound_date_to** | **String** | Last outbound date to price (YYYY-MM-DD). At most 200 days from outbound_date_from, or 14 in date-grid mode. | |
|
|
888
|
+
| **trip_type** | **String** | one_way | round_trip | [optional][default to 'one_way'] |
|
|
889
|
+
| **trip_length_days** | **Integer** | Round-trip stay length in nights (price-graph mode). Defaults to 7. | [optional] |
|
|
890
|
+
| **return_date_from** | **String** | Date-grid mode: first return date. With return_date_to, returns the full outbound x return matrix (each range at most 14 days). Round-trip only. | [optional] |
|
|
891
|
+
| **return_date_to** | **String** | Date-grid mode: last return date | [optional] |
|
|
892
|
+
| **adults** | **Integer** | | [optional][default to 1] |
|
|
893
|
+
| **children** | **Integer** | | [optional][default to 0] |
|
|
894
|
+
| **infants_in_seat** | **Integer** | | [optional][default to 0] |
|
|
895
|
+
| **infants_on_lap** | **Integer** | | [optional][default to 0] |
|
|
896
|
+
| **travel_class** | **String** | | [optional][default to 'economy'] |
|
|
897
|
+
| **currency** | **String** | ISO-4217 currency | [optional][default to 'USD'] |
|
|
898
|
+
| **gl** | **String** | | [optional][default to 'us'] |
|
|
899
|
+
| **hl** | **String** | | [optional][default to 'en'] |
|
|
900
|
+
|
|
901
|
+
### Return type
|
|
902
|
+
|
|
903
|
+
**Object**
|
|
904
|
+
|
|
905
|
+
### Authorization
|
|
906
|
+
|
|
907
|
+
[ApiKeyAuth](../README.md#ApiKeyAuth)
|
|
908
|
+
|
|
909
|
+
### HTTP request headers
|
|
910
|
+
|
|
911
|
+
- **Content-Type**: Not defined
|
|
912
|
+
- **Accept**: application/json
|
|
913
|
+
|
|
914
|
+
|
|
915
|
+
## google_google_flights_search
|
|
916
|
+
|
|
917
|
+
> Object google_google_flights_search(departure_id, arrival_id, outbound_date, opts)
|
|
918
|
+
|
|
919
|
+
Google Flights search
|
|
920
|
+
|
|
921
|
+
Search Google Flights for available itineraries.
|
|
922
|
+
|
|
923
|
+
### Examples
|
|
924
|
+
|
|
925
|
+
```ruby
|
|
926
|
+
require 'time'
|
|
927
|
+
require 'scrapebadger'
|
|
928
|
+
# setup authorization
|
|
929
|
+
ScrapeBadger.configure do |config|
|
|
930
|
+
# Configure API key authorization: ApiKeyAuth
|
|
931
|
+
config.api_key['X-API-Key'] = 'YOUR API KEY'
|
|
932
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
933
|
+
# config.api_key_prefix['X-API-Key'] = 'Bearer'
|
|
934
|
+
end
|
|
935
|
+
|
|
936
|
+
api_instance = ScrapeBadger::GoogleApi.new
|
|
937
|
+
departure_id = 'departure_id_example' # String | Departure airport IATA code or location ID
|
|
938
|
+
arrival_id = 'arrival_id_example' # String | Arrival airport IATA code or location ID
|
|
939
|
+
outbound_date = 'outbound_date_example' # String | Outbound date (YYYY-MM-DD)
|
|
940
|
+
opts = {
|
|
941
|
+
return_date: 'return_date_example', # String | Return date (round-trip only)
|
|
942
|
+
trip_type: 'trip_type_example', # String | round_trip | one_way | multi_city
|
|
943
|
+
adults: 56, # Integer |
|
|
944
|
+
children: 56, # Integer |
|
|
945
|
+
infants_in_seat: 56, # Integer |
|
|
946
|
+
infants_on_lap: 56, # Integer |
|
|
947
|
+
travel_class: 'travel_class_example', # String |
|
|
948
|
+
currency: 'currency_example', # String | ISO-4217 currency
|
|
949
|
+
gl: 'gl_example', # String |
|
|
950
|
+
hl: 'hl_example', # String |
|
|
951
|
+
stops: 'stops_example', # String |
|
|
952
|
+
max_price: 56, # Integer |
|
|
953
|
+
departure_token: 'departure_token_example' # String | A round-trip offer's departure_token; returns the return-leg flights for that selected outbound (round-trip only).
|
|
954
|
+
}
|
|
955
|
+
|
|
956
|
+
begin
|
|
957
|
+
# Google Flights search
|
|
958
|
+
result = api_instance.google_google_flights_search(departure_id, arrival_id, outbound_date, opts)
|
|
959
|
+
p result
|
|
960
|
+
rescue ScrapeBadger::ApiError => e
|
|
961
|
+
puts "Error when calling GoogleApi->google_google_flights_search: #{e}"
|
|
962
|
+
end
|
|
963
|
+
```
|
|
964
|
+
|
|
965
|
+
#### Using the google_google_flights_search_with_http_info variant
|
|
966
|
+
|
|
967
|
+
This returns an Array which contains the response data, status code and headers.
|
|
968
|
+
|
|
969
|
+
> <Array(Object, Integer, Hash)> google_google_flights_search_with_http_info(departure_id, arrival_id, outbound_date, opts)
|
|
970
|
+
|
|
971
|
+
```ruby
|
|
972
|
+
begin
|
|
973
|
+
# Google Flights search
|
|
974
|
+
data, status_code, headers = api_instance.google_google_flights_search_with_http_info(departure_id, arrival_id, outbound_date, opts)
|
|
975
|
+
p status_code # => 2xx
|
|
976
|
+
p headers # => { ... }
|
|
977
|
+
p data # => Object
|
|
978
|
+
rescue ScrapeBadger::ApiError => e
|
|
979
|
+
puts "Error when calling GoogleApi->google_google_flights_search_with_http_info: #{e}"
|
|
980
|
+
end
|
|
981
|
+
```
|
|
982
|
+
|
|
983
|
+
### Parameters
|
|
984
|
+
|
|
985
|
+
| Name | Type | Description | Notes |
|
|
986
|
+
| ---- | ---- | ----------- | ----- |
|
|
987
|
+
| **departure_id** | **String** | Departure airport IATA code or location ID | |
|
|
988
|
+
| **arrival_id** | **String** | Arrival airport IATA code or location ID | |
|
|
989
|
+
| **outbound_date** | **String** | Outbound date (YYYY-MM-DD) | |
|
|
990
|
+
| **return_date** | **String** | Return date (round-trip only) | [optional] |
|
|
991
|
+
| **trip_type** | **String** | round_trip | one_way | multi_city | [optional][default to 'round_trip'] |
|
|
992
|
+
| **adults** | **Integer** | | [optional][default to 1] |
|
|
993
|
+
| **children** | **Integer** | | [optional][default to 0] |
|
|
994
|
+
| **infants_in_seat** | **Integer** | | [optional][default to 0] |
|
|
995
|
+
| **infants_on_lap** | **Integer** | | [optional][default to 0] |
|
|
996
|
+
| **travel_class** | **String** | | [optional][default to 'economy'] |
|
|
997
|
+
| **currency** | **String** | ISO-4217 currency | [optional][default to 'USD'] |
|
|
998
|
+
| **gl** | **String** | | [optional][default to 'us'] |
|
|
999
|
+
| **hl** | **String** | | [optional][default to 'en'] |
|
|
1000
|
+
| **stops** | **String** | | [optional][default to 'any'] |
|
|
1001
|
+
| **max_price** | **Integer** | | [optional] |
|
|
1002
|
+
| **departure_token** | **String** | A round-trip offer's departure_token; returns the return-leg flights for that selected outbound (round-trip only). | [optional] |
|
|
1003
|
+
|
|
1004
|
+
### Return type
|
|
1005
|
+
|
|
1006
|
+
**Object**
|
|
1007
|
+
|
|
1008
|
+
### Authorization
|
|
1009
|
+
|
|
1010
|
+
[ApiKeyAuth](../README.md#ApiKeyAuth)
|
|
1011
|
+
|
|
1012
|
+
### HTTP request headers
|
|
1013
|
+
|
|
1014
|
+
- **Content-Type**: Not defined
|
|
1015
|
+
- **Accept**: application/json
|
|
1016
|
+
|
|
1017
|
+
|
|
1018
|
+
## google_google_lens_visual_search
|
|
1019
|
+
|
|
1020
|
+
> Object google_google_lens_visual_search(url, opts)
|
|
1021
|
+
|
|
1022
|
+
Google Lens visual search
|
|
1023
|
+
|
|
1024
|
+
Google Lens visual search. Response carries ``lens_results`` (Scrapingdog parity alias) with ``title`` / ``source`` / ``source_favicon`` / ``thumbnail`` / ``original_thumbnail`` / ``rating`` / ``reviews`` / ``in_stock``, plus ``price`` (``{value, currency, extracted}``) and the raw ``tag`` chip it is parsed from, on shoppable matches. ``related_searches`` chips come alongside. Legacy ``results`` alias kept for backwards compat.
|
|
1025
|
+
|
|
1026
|
+
### Examples
|
|
1027
|
+
|
|
1028
|
+
```ruby
|
|
1029
|
+
require 'time'
|
|
1030
|
+
require 'scrapebadger'
|
|
1031
|
+
# setup authorization
|
|
1032
|
+
ScrapeBadger.configure do |config|
|
|
1033
|
+
# Configure API key authorization: ApiKeyAuth
|
|
1034
|
+
config.api_key['X-API-Key'] = 'YOUR API KEY'
|
|
1035
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
1036
|
+
# config.api_key_prefix['X-API-Key'] = 'Bearer'
|
|
1037
|
+
end
|
|
1038
|
+
|
|
1039
|
+
api_instance = ScrapeBadger::GoogleApi.new
|
|
1040
|
+
url = 'url_example' # String | Public URL of the image to search visually
|
|
1041
|
+
opts = {
|
|
1042
|
+
query: 'query_example', # String | Optional text refinement (e.g. 'pizza')
|
|
1043
|
+
country: 'country_example', # String | ISO country code (alias for gl)
|
|
1044
|
+
language: 'language_example', # String | Language code (alias for hl)
|
|
1045
|
+
gl: 'gl_example', # String | Country code
|
|
1046
|
+
hl: 'hl_example', # String | Language code
|
|
1047
|
+
product: true, # Boolean | Bias towards shoppable product matches
|
|
1048
|
+
visual_matches: true, # Boolean | Include the visual-matches carousel
|
|
1049
|
+
exact_matches: true # Boolean | Restrict to exact-match results
|
|
1050
|
+
}
|
|
1051
|
+
|
|
1052
|
+
begin
|
|
1053
|
+
# Google Lens visual search
|
|
1054
|
+
result = api_instance.google_google_lens_visual_search(url, opts)
|
|
1055
|
+
p result
|
|
1056
|
+
rescue ScrapeBadger::ApiError => e
|
|
1057
|
+
puts "Error when calling GoogleApi->google_google_lens_visual_search: #{e}"
|
|
1058
|
+
end
|
|
1059
|
+
```
|
|
1060
|
+
|
|
1061
|
+
#### Using the google_google_lens_visual_search_with_http_info variant
|
|
1062
|
+
|
|
1063
|
+
This returns an Array which contains the response data, status code and headers.
|
|
1064
|
+
|
|
1065
|
+
> <Array(Object, Integer, Hash)> google_google_lens_visual_search_with_http_info(url, opts)
|
|
1066
|
+
|
|
1067
|
+
```ruby
|
|
1068
|
+
begin
|
|
1069
|
+
# Google Lens visual search
|
|
1070
|
+
data, status_code, headers = api_instance.google_google_lens_visual_search_with_http_info(url, opts)
|
|
1071
|
+
p status_code # => 2xx
|
|
1072
|
+
p headers # => { ... }
|
|
1073
|
+
p data # => Object
|
|
1074
|
+
rescue ScrapeBadger::ApiError => e
|
|
1075
|
+
puts "Error when calling GoogleApi->google_google_lens_visual_search_with_http_info: #{e}"
|
|
1076
|
+
end
|
|
1077
|
+
```
|
|
1078
|
+
|
|
1079
|
+
### Parameters
|
|
1080
|
+
|
|
1081
|
+
| Name | Type | Description | Notes |
|
|
1082
|
+
| ---- | ---- | ----------- | ----- |
|
|
1083
|
+
| **url** | **String** | Public URL of the image to search visually | |
|
|
1084
|
+
| **query** | **String** | Optional text refinement (e.g. 'pizza') | [optional] |
|
|
1085
|
+
| **country** | **String** | ISO country code (alias for gl) | [optional] |
|
|
1086
|
+
| **language** | **String** | Language code (alias for hl) | [optional] |
|
|
1087
|
+
| **gl** | **String** | Country code | [optional][default to 'us'] |
|
|
1088
|
+
| **hl** | **String** | Language code | [optional][default to 'en'] |
|
|
1089
|
+
| **product** | **Boolean** | Bias towards shoppable product matches | [optional][default to false] |
|
|
1090
|
+
| **visual_matches** | **Boolean** | Include the visual-matches carousel | [optional][default to true] |
|
|
1091
|
+
| **exact_matches** | **Boolean** | Restrict to exact-match results | [optional][default to false] |
|
|
1092
|
+
|
|
1093
|
+
### Return type
|
|
1094
|
+
|
|
1095
|
+
**Object**
|
|
1096
|
+
|
|
1097
|
+
### Authorization
|
|
1098
|
+
|
|
1099
|
+
[ApiKeyAuth](../README.md#ApiKeyAuth)
|
|
1100
|
+
|
|
1101
|
+
### HTTP request headers
|
|
1102
|
+
|
|
1103
|
+
- **Content-Type**: Not defined
|
|
1104
|
+
- **Accept**: application/json
|
|
1105
|
+
|
|
1106
|
+
|
|
1107
|
+
## google_google_scraper_health_check
|
|
1108
|
+
|
|
1109
|
+
> Object google_google_scraper_health_check
|
|
1110
|
+
|
|
1111
|
+
Google scraper health check
|
|
1112
|
+
|
|
1113
|
+
Check health of the Google scraper service. Accepts ``HEAD`` so external uptime checkers (UptimeRobot uses HEAD by default for HTTP monitors) don't get a 405 Method Not Allowed.
|
|
1114
|
+
|
|
1115
|
+
### Examples
|
|
1116
|
+
|
|
1117
|
+
```ruby
|
|
1118
|
+
require 'time'
|
|
1119
|
+
require 'scrapebadger'
|
|
1120
|
+
# setup authorization
|
|
1121
|
+
ScrapeBadger.configure do |config|
|
|
1122
|
+
# Configure API key authorization: ApiKeyAuth
|
|
1123
|
+
config.api_key['X-API-Key'] = 'YOUR API KEY'
|
|
1124
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
1125
|
+
# config.api_key_prefix['X-API-Key'] = 'Bearer'
|
|
1126
|
+
end
|
|
1127
|
+
|
|
1128
|
+
api_instance = ScrapeBadger::GoogleApi.new
|
|
1129
|
+
|
|
1130
|
+
begin
|
|
1131
|
+
# Google scraper health check
|
|
1132
|
+
result = api_instance.google_google_scraper_health_check
|
|
1133
|
+
p result
|
|
1134
|
+
rescue ScrapeBadger::ApiError => e
|
|
1135
|
+
puts "Error when calling GoogleApi->google_google_scraper_health_check: #{e}"
|
|
1136
|
+
end
|
|
1137
|
+
```
|
|
1138
|
+
|
|
1139
|
+
#### Using the google_google_scraper_health_check_with_http_info variant
|
|
1140
|
+
|
|
1141
|
+
This returns an Array which contains the response data, status code and headers.
|
|
1142
|
+
|
|
1143
|
+
> <Array(Object, Integer, Hash)> google_google_scraper_health_check_with_http_info
|
|
1144
|
+
|
|
1145
|
+
```ruby
|
|
1146
|
+
begin
|
|
1147
|
+
# Google scraper health check
|
|
1148
|
+
data, status_code, headers = api_instance.google_google_scraper_health_check_with_http_info
|
|
1149
|
+
p status_code # => 2xx
|
|
1150
|
+
p headers # => { ... }
|
|
1151
|
+
p data # => Object
|
|
1152
|
+
rescue ScrapeBadger::ApiError => e
|
|
1153
|
+
puts "Error when calling GoogleApi->google_google_scraper_health_check_with_http_info: #{e}"
|
|
1154
|
+
end
|
|
1155
|
+
```
|
|
1156
|
+
|
|
1157
|
+
### Parameters
|
|
1158
|
+
|
|
1159
|
+
This endpoint does not need any parameter.
|
|
1160
|
+
|
|
1161
|
+
### Return type
|
|
1162
|
+
|
|
1163
|
+
**Object**
|
|
1164
|
+
|
|
1165
|
+
### Authorization
|
|
1166
|
+
|
|
1167
|
+
[ApiKeyAuth](../README.md#ApiKeyAuth)
|
|
1168
|
+
|
|
1169
|
+
### HTTP request headers
|
|
1170
|
+
|
|
1171
|
+
- **Content-Type**: Not defined
|
|
1172
|
+
- **Accept**: application/json
|
|
1173
|
+
|
|
1174
|
+
|
|
1175
|
+
## google_google_scraper_health_check_head
|
|
1176
|
+
|
|
1177
|
+
> Object google_google_scraper_health_check_head
|
|
1178
|
+
|
|
1179
|
+
Google scraper health check
|
|
1180
|
+
|
|
1181
|
+
Check health of the Google scraper service. Accepts ``HEAD`` so external uptime checkers (UptimeRobot uses HEAD by default for HTTP monitors) don't get a 405 Method Not Allowed.
|
|
1182
|
+
|
|
1183
|
+
### Examples
|
|
1184
|
+
|
|
1185
|
+
```ruby
|
|
1186
|
+
require 'time'
|
|
1187
|
+
require 'scrapebadger'
|
|
1188
|
+
# setup authorization
|
|
1189
|
+
ScrapeBadger.configure do |config|
|
|
1190
|
+
# Configure API key authorization: ApiKeyAuth
|
|
1191
|
+
config.api_key['X-API-Key'] = 'YOUR API KEY'
|
|
1192
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
1193
|
+
# config.api_key_prefix['X-API-Key'] = 'Bearer'
|
|
1194
|
+
end
|
|
1195
|
+
|
|
1196
|
+
api_instance = ScrapeBadger::GoogleApi.new
|
|
1197
|
+
|
|
1198
|
+
begin
|
|
1199
|
+
# Google scraper health check
|
|
1200
|
+
result = api_instance.google_google_scraper_health_check_head
|
|
1201
|
+
p result
|
|
1202
|
+
rescue ScrapeBadger::ApiError => e
|
|
1203
|
+
puts "Error when calling GoogleApi->google_google_scraper_health_check_head: #{e}"
|
|
1204
|
+
end
|
|
1205
|
+
```
|
|
1206
|
+
|
|
1207
|
+
#### Using the google_google_scraper_health_check_head_with_http_info variant
|
|
1208
|
+
|
|
1209
|
+
This returns an Array which contains the response data, status code and headers.
|
|
1210
|
+
|
|
1211
|
+
> <Array(Object, Integer, Hash)> google_google_scraper_health_check_head_with_http_info
|
|
1212
|
+
|
|
1213
|
+
```ruby
|
|
1214
|
+
begin
|
|
1215
|
+
# Google scraper health check
|
|
1216
|
+
data, status_code, headers = api_instance.google_google_scraper_health_check_head_with_http_info
|
|
1217
|
+
p status_code # => 2xx
|
|
1218
|
+
p headers # => { ... }
|
|
1219
|
+
p data # => Object
|
|
1220
|
+
rescue ScrapeBadger::ApiError => e
|
|
1221
|
+
puts "Error when calling GoogleApi->google_google_scraper_health_check_head_with_http_info: #{e}"
|
|
1222
|
+
end
|
|
1223
|
+
```
|
|
1224
|
+
|
|
1225
|
+
### Parameters
|
|
1226
|
+
|
|
1227
|
+
This endpoint does not need any parameter.
|
|
1228
|
+
|
|
1229
|
+
### Return type
|
|
1230
|
+
|
|
1231
|
+
**Object**
|
|
1232
|
+
|
|
1233
|
+
### Authorization
|
|
1234
|
+
|
|
1235
|
+
[ApiKeyAuth](../README.md#ApiKeyAuth)
|
|
1236
|
+
|
|
1237
|
+
### HTTP request headers
|
|
1238
|
+
|
|
1239
|
+
- **Content-Type**: Not defined
|
|
1240
|
+
- **Accept**: application/json
|
|
1241
|
+
|
|
1242
|
+
|
|
1243
|
+
## google_google_search_suggestions
|
|
1244
|
+
|
|
1245
|
+
> Object google_google_search_suggestions(q, opts)
|
|
1246
|
+
|
|
1247
|
+
Google search suggestions
|
|
1248
|
+
|
|
1249
|
+
Get Google search autocomplete suggestions.
|
|
1250
|
+
|
|
1251
|
+
### Examples
|
|
1252
|
+
|
|
1253
|
+
```ruby
|
|
1254
|
+
require 'time'
|
|
1255
|
+
require 'scrapebadger'
|
|
1256
|
+
# setup authorization
|
|
1257
|
+
ScrapeBadger.configure do |config|
|
|
1258
|
+
# Configure API key authorization: ApiKeyAuth
|
|
1259
|
+
config.api_key['X-API-Key'] = 'YOUR API KEY'
|
|
1260
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
1261
|
+
# config.api_key_prefix['X-API-Key'] = 'Bearer'
|
|
1262
|
+
end
|
|
1263
|
+
|
|
1264
|
+
api_instance = ScrapeBadger::GoogleApi.new
|
|
1265
|
+
q = 'q_example' # String | Search query to get suggestions for
|
|
1266
|
+
opts = {
|
|
1267
|
+
hl: 'hl_example', # String | Language code
|
|
1268
|
+
gl: 'gl_example' # String | Country code
|
|
1269
|
+
}
|
|
1270
|
+
|
|
1271
|
+
begin
|
|
1272
|
+
# Google search suggestions
|
|
1273
|
+
result = api_instance.google_google_search_suggestions(q, opts)
|
|
1274
|
+
p result
|
|
1275
|
+
rescue ScrapeBadger::ApiError => e
|
|
1276
|
+
puts "Error when calling GoogleApi->google_google_search_suggestions: #{e}"
|
|
1277
|
+
end
|
|
1278
|
+
```
|
|
1279
|
+
|
|
1280
|
+
#### Using the google_google_search_suggestions_with_http_info variant
|
|
1281
|
+
|
|
1282
|
+
This returns an Array which contains the response data, status code and headers.
|
|
1283
|
+
|
|
1284
|
+
> <Array(Object, Integer, Hash)> google_google_search_suggestions_with_http_info(q, opts)
|
|
1285
|
+
|
|
1286
|
+
```ruby
|
|
1287
|
+
begin
|
|
1288
|
+
# Google search suggestions
|
|
1289
|
+
data, status_code, headers = api_instance.google_google_search_suggestions_with_http_info(q, opts)
|
|
1290
|
+
p status_code # => 2xx
|
|
1291
|
+
p headers # => { ... }
|
|
1292
|
+
p data # => Object
|
|
1293
|
+
rescue ScrapeBadger::ApiError => e
|
|
1294
|
+
puts "Error when calling GoogleApi->google_google_search_suggestions_with_http_info: #{e}"
|
|
1295
|
+
end
|
|
1296
|
+
```
|
|
1297
|
+
|
|
1298
|
+
### Parameters
|
|
1299
|
+
|
|
1300
|
+
| Name | Type | Description | Notes |
|
|
1301
|
+
| ---- | ---- | ----------- | ----- |
|
|
1302
|
+
| **q** | **String** | Search query to get suggestions for | |
|
|
1303
|
+
| **hl** | **String** | Language code | [optional][default to 'en'] |
|
|
1304
|
+
| **gl** | **String** | Country code | [optional][default to 'us'] |
|
|
1305
|
+
|
|
1306
|
+
### Return type
|
|
1307
|
+
|
|
1308
|
+
**Object**
|
|
1309
|
+
|
|
1310
|
+
### Authorization
|
|
1311
|
+
|
|
1312
|
+
[ApiKeyAuth](../README.md#ApiKeyAuth)
|
|
1313
|
+
|
|
1314
|
+
### HTTP request headers
|
|
1315
|
+
|
|
1316
|
+
- **Content-Type**: Not defined
|
|
1317
|
+
- **Accept**: application/json
|
|
1318
|
+
|
|
1319
|
+
|
|
1320
|
+
## google_google_shorts_search
|
|
1321
|
+
|
|
1322
|
+
> Object google_google_shorts_search(q, opts)
|
|
1323
|
+
|
|
1324
|
+
Google Shorts search
|
|
1325
|
+
|
|
1326
|
+
Return short-form video results (YouTube Shorts, TikToks) from Google Shorts mode.
|
|
1327
|
+
|
|
1328
|
+
### Examples
|
|
1329
|
+
|
|
1330
|
+
```ruby
|
|
1331
|
+
require 'time'
|
|
1332
|
+
require 'scrapebadger'
|
|
1333
|
+
# setup authorization
|
|
1334
|
+
ScrapeBadger.configure do |config|
|
|
1335
|
+
# Configure API key authorization: ApiKeyAuth
|
|
1336
|
+
config.api_key['X-API-Key'] = 'YOUR API KEY'
|
|
1337
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
1338
|
+
# config.api_key_prefix['X-API-Key'] = 'Bearer'
|
|
1339
|
+
end
|
|
1340
|
+
|
|
1341
|
+
api_instance = ScrapeBadger::GoogleApi.new
|
|
1342
|
+
q = 'q_example' # String | Search query
|
|
1343
|
+
opts = {
|
|
1344
|
+
gl: 'gl_example', # String | Country code
|
|
1345
|
+
hl: 'hl_example', # String | Language code
|
|
1346
|
+
domain: 'domain_example', # String | Google domain
|
|
1347
|
+
num: 56, # Integer | Results per page
|
|
1348
|
+
start: 56 # Integer | Pagination offset
|
|
1349
|
+
}
|
|
1350
|
+
|
|
1351
|
+
begin
|
|
1352
|
+
# Google Shorts search
|
|
1353
|
+
result = api_instance.google_google_shorts_search(q, opts)
|
|
1354
|
+
p result
|
|
1355
|
+
rescue ScrapeBadger::ApiError => e
|
|
1356
|
+
puts "Error when calling GoogleApi->google_google_shorts_search: #{e}"
|
|
1357
|
+
end
|
|
1358
|
+
```
|
|
1359
|
+
|
|
1360
|
+
#### Using the google_google_shorts_search_with_http_info variant
|
|
1361
|
+
|
|
1362
|
+
This returns an Array which contains the response data, status code and headers.
|
|
1363
|
+
|
|
1364
|
+
> <Array(Object, Integer, Hash)> google_google_shorts_search_with_http_info(q, opts)
|
|
1365
|
+
|
|
1366
|
+
```ruby
|
|
1367
|
+
begin
|
|
1368
|
+
# Google Shorts search
|
|
1369
|
+
data, status_code, headers = api_instance.google_google_shorts_search_with_http_info(q, opts)
|
|
1370
|
+
p status_code # => 2xx
|
|
1371
|
+
p headers # => { ... }
|
|
1372
|
+
p data # => Object
|
|
1373
|
+
rescue ScrapeBadger::ApiError => e
|
|
1374
|
+
puts "Error when calling GoogleApi->google_google_shorts_search_with_http_info: #{e}"
|
|
1375
|
+
end
|
|
1376
|
+
```
|
|
1377
|
+
|
|
1378
|
+
### Parameters
|
|
1379
|
+
|
|
1380
|
+
| Name | Type | Description | Notes |
|
|
1381
|
+
| ---- | ---- | ----------- | ----- |
|
|
1382
|
+
| **q** | **String** | Search query | |
|
|
1383
|
+
| **gl** | **String** | Country code | [optional][default to 'us'] |
|
|
1384
|
+
| **hl** | **String** | Language code | [optional][default to 'en'] |
|
|
1385
|
+
| **domain** | **String** | Google domain | [optional][default to 'google.com'] |
|
|
1386
|
+
| **num** | **Integer** | Results per page | [optional][default to 20] |
|
|
1387
|
+
| **start** | **Integer** | Pagination offset | [optional][default to 0] |
|
|
1388
|
+
|
|
1389
|
+
### Return type
|
|
1390
|
+
|
|
1391
|
+
**Object**
|
|
1392
|
+
|
|
1393
|
+
### Authorization
|
|
1394
|
+
|
|
1395
|
+
[ApiKeyAuth](../README.md#ApiKeyAuth)
|
|
1396
|
+
|
|
1397
|
+
### HTTP request headers
|
|
1398
|
+
|
|
1399
|
+
- **Content-Type**: Not defined
|
|
1400
|
+
- **Accept**: application/json
|
|
1401
|
+
|
|
1402
|
+
|
|
1403
|
+
## google_google_web_search
|
|
1404
|
+
|
|
1405
|
+
> Object google_google_web_search(q, opts)
|
|
1406
|
+
|
|
1407
|
+
Google web search
|
|
1408
|
+
|
|
1409
|
+
Search Google and get structured results (organic, ads, KG, AI overview, PAA).
|
|
1410
|
+
|
|
1411
|
+
### Examples
|
|
1412
|
+
|
|
1413
|
+
```ruby
|
|
1414
|
+
require 'time'
|
|
1415
|
+
require 'scrapebadger'
|
|
1416
|
+
# setup authorization
|
|
1417
|
+
ScrapeBadger.configure do |config|
|
|
1418
|
+
# Configure API key authorization: ApiKeyAuth
|
|
1419
|
+
config.api_key['X-API-Key'] = 'YOUR API KEY'
|
|
1420
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
1421
|
+
# config.api_key_prefix['X-API-Key'] = 'Bearer'
|
|
1422
|
+
end
|
|
1423
|
+
|
|
1424
|
+
api_instance = ScrapeBadger::GoogleApi.new
|
|
1425
|
+
q = 'q_example' # String | Search query (supports Google operators)
|
|
1426
|
+
opts = {
|
|
1427
|
+
gl: 'gl_example', # String | Country code
|
|
1428
|
+
hl: 'hl_example', # String | Language code
|
|
1429
|
+
num: 56, # Integer |
|
|
1430
|
+
start: 56, # Integer | Page offset (0, 10, 20...)
|
|
1431
|
+
domain: 'domain_example', # String | Google domain
|
|
1432
|
+
device: 'desktop', # String | Device target: desktop, mobile, iphone, android, tablet
|
|
1433
|
+
user_agent: 'user_agent_example', # String | Custom User-Agent (overrides device)
|
|
1434
|
+
output: 'json', # String | Response format: json (parsed) or html (raw SERP)
|
|
1435
|
+
location: 'location_example', # String | City-level geo-targeting
|
|
1436
|
+
lr: 'lr_example', # String | Language restrict (e.g. lang_en)
|
|
1437
|
+
tbs: 'tbs_example', # String | Time filter (e.g. qdr:d)
|
|
1438
|
+
safe: 'safe_example', # String |
|
|
1439
|
+
uule: 'uule_example', # String | UULE encoded location
|
|
1440
|
+
filter: 56, # Integer | Show omitted results
|
|
1441
|
+
nfpr: 56, # Integer | Disable auto-correction
|
|
1442
|
+
cr: 'cr_example', # String | Country restrict
|
|
1443
|
+
ludocid: 'ludocid_example', # String | Google Place CID
|
|
1444
|
+
lsig: 'lsig_example', # String | Knowledge Graph map ID
|
|
1445
|
+
kgmid: 'kgmid_example', # String | Knowledge Graph entity ID
|
|
1446
|
+
si: 'si_example', # String | Cached search params
|
|
1447
|
+
ibp: 'ibp_example', # String | Layout control
|
|
1448
|
+
uds: 'uds_example', # String | Google filter string
|
|
1449
|
+
ai_overview: true # Boolean | Chase deferred AI Overview page_token with a follow-up fetch and merge the result. Adds ~1s and 1 credit when the SERP defers the overview.
|
|
1450
|
+
}
|
|
1451
|
+
|
|
1452
|
+
begin
|
|
1453
|
+
# Google web search
|
|
1454
|
+
result = api_instance.google_google_web_search(q, opts)
|
|
1455
|
+
p result
|
|
1456
|
+
rescue ScrapeBadger::ApiError => e
|
|
1457
|
+
puts "Error when calling GoogleApi->google_google_web_search: #{e}"
|
|
1458
|
+
end
|
|
1459
|
+
```
|
|
1460
|
+
|
|
1461
|
+
#### Using the google_google_web_search_with_http_info variant
|
|
1462
|
+
|
|
1463
|
+
This returns an Array which contains the response data, status code and headers.
|
|
1464
|
+
|
|
1465
|
+
> <Array(Object, Integer, Hash)> google_google_web_search_with_http_info(q, opts)
|
|
1466
|
+
|
|
1467
|
+
```ruby
|
|
1468
|
+
begin
|
|
1469
|
+
# Google web search
|
|
1470
|
+
data, status_code, headers = api_instance.google_google_web_search_with_http_info(q, opts)
|
|
1471
|
+
p status_code # => 2xx
|
|
1472
|
+
p headers # => { ... }
|
|
1473
|
+
p data # => Object
|
|
1474
|
+
rescue ScrapeBadger::ApiError => e
|
|
1475
|
+
puts "Error when calling GoogleApi->google_google_web_search_with_http_info: #{e}"
|
|
1476
|
+
end
|
|
1477
|
+
```
|
|
1478
|
+
|
|
1479
|
+
### Parameters
|
|
1480
|
+
|
|
1481
|
+
| Name | Type | Description | Notes |
|
|
1482
|
+
| ---- | ---- | ----------- | ----- |
|
|
1483
|
+
| **q** | **String** | Search query (supports Google operators) | |
|
|
1484
|
+
| **gl** | **String** | Country code | [optional][default to 'us'] |
|
|
1485
|
+
| **hl** | **String** | Language code | [optional][default to 'en'] |
|
|
1486
|
+
| **num** | **Integer** | | [optional][default to 10] |
|
|
1487
|
+
| **start** | **Integer** | Page offset (0, 10, 20...) | [optional][default to 0] |
|
|
1488
|
+
| **domain** | **String** | Google domain | [optional][default to 'google.com'] |
|
|
1489
|
+
| **device** | **String** | Device target: desktop, mobile, iphone, android, tablet | [optional][default to 'desktop'] |
|
|
1490
|
+
| **user_agent** | **String** | Custom User-Agent (overrides device) | [optional] |
|
|
1491
|
+
| **output** | **String** | Response format: json (parsed) or html (raw SERP) | [optional][default to 'json'] |
|
|
1492
|
+
| **location** | **String** | City-level geo-targeting | [optional] |
|
|
1493
|
+
| **lr** | **String** | Language restrict (e.g. lang_en) | [optional] |
|
|
1494
|
+
| **tbs** | **String** | Time filter (e.g. qdr:d) | [optional] |
|
|
1495
|
+
| **safe** | **String** | | [optional][default to 'off'] |
|
|
1496
|
+
| **uule** | **String** | UULE encoded location | [optional] |
|
|
1497
|
+
| **filter** | **Integer** | Show omitted results | [optional] |
|
|
1498
|
+
| **nfpr** | **Integer** | Disable auto-correction | [optional][default to 0] |
|
|
1499
|
+
| **cr** | **String** | Country restrict | [optional] |
|
|
1500
|
+
| **ludocid** | **String** | Google Place CID | [optional] |
|
|
1501
|
+
| **lsig** | **String** | Knowledge Graph map ID | [optional] |
|
|
1502
|
+
| **kgmid** | **String** | Knowledge Graph entity ID | [optional] |
|
|
1503
|
+
| **si** | **String** | Cached search params | [optional] |
|
|
1504
|
+
| **ibp** | **String** | Layout control | [optional] |
|
|
1505
|
+
| **uds** | **String** | Google filter string | [optional] |
|
|
1506
|
+
| **ai_overview** | **Boolean** | Chase deferred AI Overview page_token with a follow-up fetch and merge the result. Adds ~1s and 1 credit when the SERP defers the overview. | [optional][default to false] |
|
|
1507
|
+
|
|
1508
|
+
### Return type
|
|
1509
|
+
|
|
1510
|
+
**Object**
|
|
1511
|
+
|
|
1512
|
+
### Authorization
|
|
1513
|
+
|
|
1514
|
+
[ApiKeyAuth](../README.md#ApiKeyAuth)
|
|
1515
|
+
|
|
1516
|
+
### HTTP request headers
|
|
1517
|
+
|
|
1518
|
+
- **Content-Type**: Not defined
|
|
1519
|
+
- **Accept**: application/json
|
|
1520
|
+
|
|
1521
|
+
|
|
1522
|
+
## google_hotel_details
|
|
1523
|
+
|
|
1524
|
+
> Object google_hotel_details(property_token, check_in, check_out)
|
|
1525
|
+
|
|
1526
|
+
Hotel details
|
|
1527
|
+
|
|
1528
|
+
### Examples
|
|
1529
|
+
|
|
1530
|
+
```ruby
|
|
1531
|
+
require 'time'
|
|
1532
|
+
require 'scrapebadger'
|
|
1533
|
+
# setup authorization
|
|
1534
|
+
ScrapeBadger.configure do |config|
|
|
1535
|
+
# Configure API key authorization: ApiKeyAuth
|
|
1536
|
+
config.api_key['X-API-Key'] = 'YOUR API KEY'
|
|
1537
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
1538
|
+
# config.api_key_prefix['X-API-Key'] = 'Bearer'
|
|
1539
|
+
end
|
|
1540
|
+
|
|
1541
|
+
api_instance = ScrapeBadger::GoogleApi.new
|
|
1542
|
+
property_token = 'property_token_example' # String | Property token
|
|
1543
|
+
check_in = 'check_in_example' # String | YYYY-MM-DD
|
|
1544
|
+
check_out = 'check_out_example' # String | YYYY-MM-DD
|
|
1545
|
+
|
|
1546
|
+
begin
|
|
1547
|
+
# Hotel details
|
|
1548
|
+
result = api_instance.google_hotel_details(property_token, check_in, check_out)
|
|
1549
|
+
p result
|
|
1550
|
+
rescue ScrapeBadger::ApiError => e
|
|
1551
|
+
puts "Error when calling GoogleApi->google_hotel_details: #{e}"
|
|
1552
|
+
end
|
|
1553
|
+
```
|
|
1554
|
+
|
|
1555
|
+
#### Using the google_hotel_details_with_http_info variant
|
|
1556
|
+
|
|
1557
|
+
This returns an Array which contains the response data, status code and headers.
|
|
1558
|
+
|
|
1559
|
+
> <Array(Object, Integer, Hash)> google_hotel_details_with_http_info(property_token, check_in, check_out)
|
|
1560
|
+
|
|
1561
|
+
```ruby
|
|
1562
|
+
begin
|
|
1563
|
+
# Hotel details
|
|
1564
|
+
data, status_code, headers = api_instance.google_hotel_details_with_http_info(property_token, check_in, check_out)
|
|
1565
|
+
p status_code # => 2xx
|
|
1566
|
+
p headers # => { ... }
|
|
1567
|
+
p data # => Object
|
|
1568
|
+
rescue ScrapeBadger::ApiError => e
|
|
1569
|
+
puts "Error when calling GoogleApi->google_hotel_details_with_http_info: #{e}"
|
|
1570
|
+
end
|
|
1571
|
+
```
|
|
1572
|
+
|
|
1573
|
+
### Parameters
|
|
1574
|
+
|
|
1575
|
+
| Name | Type | Description | Notes |
|
|
1576
|
+
| ---- | ---- | ----------- | ----- |
|
|
1577
|
+
| **property_token** | **String** | Property token | |
|
|
1578
|
+
| **check_in** | **String** | YYYY-MM-DD | |
|
|
1579
|
+
| **check_out** | **String** | YYYY-MM-DD | |
|
|
1580
|
+
|
|
1581
|
+
### Return type
|
|
1582
|
+
|
|
1583
|
+
**Object**
|
|
1584
|
+
|
|
1585
|
+
### Authorization
|
|
1586
|
+
|
|
1587
|
+
[ApiKeyAuth](../README.md#ApiKeyAuth)
|
|
1588
|
+
|
|
1589
|
+
### HTTP request headers
|
|
1590
|
+
|
|
1591
|
+
- **Content-Type**: Not defined
|
|
1592
|
+
- **Accept**: application/json
|
|
1593
|
+
|
|
1594
|
+
|
|
1595
|
+
## google_immersive_product_detail
|
|
1596
|
+
|
|
1597
|
+
> Object google_immersive_product_detail(product_id, q, opts)
|
|
1598
|
+
|
|
1599
|
+
Immersive product detail
|
|
1600
|
+
|
|
1601
|
+
Get deep product details from Google's immersive product page.
|
|
1602
|
+
|
|
1603
|
+
### Examples
|
|
1604
|
+
|
|
1605
|
+
```ruby
|
|
1606
|
+
require 'time'
|
|
1607
|
+
require 'scrapebadger'
|
|
1608
|
+
# setup authorization
|
|
1609
|
+
ScrapeBadger.configure do |config|
|
|
1610
|
+
# Configure API key authorization: ApiKeyAuth
|
|
1611
|
+
config.api_key['X-API-Key'] = 'YOUR API KEY'
|
|
1612
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
1613
|
+
# config.api_key_prefix['X-API-Key'] = 'Bearer'
|
|
1614
|
+
end
|
|
1615
|
+
|
|
1616
|
+
api_instance = ScrapeBadger::GoogleApi.new
|
|
1617
|
+
product_id = 'product_id_example' # String | Google Shopping ``gpcid`` — the product_id returned on ``/shopping/search`` tiles. Scrapingdog-compatible.
|
|
1618
|
+
q = 'q_example' # String | Original search query that surfaced the product. Required by Google's ``/async/oapv`` RPC.
|
|
1619
|
+
opts = {
|
|
1620
|
+
gl: 'gl_example', # String | Country code (ISO 3166 alpha-2)
|
|
1621
|
+
hl: 'hl_example', # String | Language code
|
|
1622
|
+
catalog_id: 'catalog_id_example', # String | Optional ``catalogid`` from the Shopping tile (improves parity).
|
|
1623
|
+
image_docid: 'image_docid_example', # String | Optional ``imageDocid`` for higher-fidelity images.
|
|
1624
|
+
headline_offer_docid: 'headline_offer_docid_example', # String | Optional ``headlineOfferDocid`` to pin the featured seller.
|
|
1625
|
+
mid: 'mid_example', # String | Optional Google Knowledge-Graph ``mid``.
|
|
1626
|
+
include_offers: true, # Boolean | When true, fetch the full merchant-offer list via a secondary RPC (``/async/piu_ps``). Adds ~1 s.
|
|
1627
|
+
include_variants: true # Boolean | When true, fetch size/colour variants via a secondary RPC (``/async/toy_v``). Adds ~1 s.
|
|
1628
|
+
}
|
|
1629
|
+
|
|
1630
|
+
begin
|
|
1631
|
+
# Immersive product detail
|
|
1632
|
+
result = api_instance.google_immersive_product_detail(product_id, q, opts)
|
|
1633
|
+
p result
|
|
1634
|
+
rescue ScrapeBadger::ApiError => e
|
|
1635
|
+
puts "Error when calling GoogleApi->google_immersive_product_detail: #{e}"
|
|
1636
|
+
end
|
|
1637
|
+
```
|
|
1638
|
+
|
|
1639
|
+
#### Using the google_immersive_product_detail_with_http_info variant
|
|
1640
|
+
|
|
1641
|
+
This returns an Array which contains the response data, status code and headers.
|
|
1642
|
+
|
|
1643
|
+
> <Array(Object, Integer, Hash)> google_immersive_product_detail_with_http_info(product_id, q, opts)
|
|
1644
|
+
|
|
1645
|
+
```ruby
|
|
1646
|
+
begin
|
|
1647
|
+
# Immersive product detail
|
|
1648
|
+
data, status_code, headers = api_instance.google_immersive_product_detail_with_http_info(product_id, q, opts)
|
|
1649
|
+
p status_code # => 2xx
|
|
1650
|
+
p headers # => { ... }
|
|
1651
|
+
p data # => Object
|
|
1652
|
+
rescue ScrapeBadger::ApiError => e
|
|
1653
|
+
puts "Error when calling GoogleApi->google_immersive_product_detail_with_http_info: #{e}"
|
|
1654
|
+
end
|
|
1655
|
+
```
|
|
1656
|
+
|
|
1657
|
+
### Parameters
|
|
1658
|
+
|
|
1659
|
+
| Name | Type | Description | Notes |
|
|
1660
|
+
| ---- | ---- | ----------- | ----- |
|
|
1661
|
+
| **product_id** | **String** | Google Shopping ``gpcid`` — the product_id returned on ``/shopping/search`` tiles. Scrapingdog-compatible. | |
|
|
1662
|
+
| **q** | **String** | Original search query that surfaced the product. Required by Google's ``/async/oapv`` RPC. | |
|
|
1663
|
+
| **gl** | **String** | Country code (ISO 3166 alpha-2) | [optional][default to 'us'] |
|
|
1664
|
+
| **hl** | **String** | Language code | [optional][default to 'en'] |
|
|
1665
|
+
| **catalog_id** | **String** | Optional ``catalogid`` from the Shopping tile (improves parity). | [optional] |
|
|
1666
|
+
| **image_docid** | **String** | Optional ``imageDocid`` for higher-fidelity images. | [optional] |
|
|
1667
|
+
| **headline_offer_docid** | **String** | Optional ``headlineOfferDocid`` to pin the featured seller. | [optional] |
|
|
1668
|
+
| **mid** | **String** | Optional Google Knowledge-Graph ``mid``. | [optional] |
|
|
1669
|
+
| **include_offers** | **Boolean** | When true, fetch the full merchant-offer list via a secondary RPC (``/async/piu_ps``). Adds ~1 s. | [optional][default to false] |
|
|
1670
|
+
| **include_variants** | **Boolean** | When true, fetch size/colour variants via a secondary RPC (``/async/toy_v``). Adds ~1 s. | [optional][default to false] |
|
|
1671
|
+
|
|
1672
|
+
### Return type
|
|
1673
|
+
|
|
1674
|
+
**Object**
|
|
1675
|
+
|
|
1676
|
+
### Authorization
|
|
1677
|
+
|
|
1678
|
+
[ApiKeyAuth](../README.md#ApiKeyAuth)
|
|
1679
|
+
|
|
1680
|
+
### HTTP request headers
|
|
1681
|
+
|
|
1682
|
+
- **Content-Type**: Not defined
|
|
1683
|
+
- **Accept**: application/json
|
|
1684
|
+
|
|
1685
|
+
|
|
1686
|
+
## google_interest_by_region
|
|
1687
|
+
|
|
1688
|
+
> Object google_interest_by_region(q, opts)
|
|
1689
|
+
|
|
1690
|
+
Interest by region
|
|
1691
|
+
|
|
1692
|
+
### Examples
|
|
1693
|
+
|
|
1694
|
+
```ruby
|
|
1695
|
+
require 'time'
|
|
1696
|
+
require 'scrapebadger'
|
|
1697
|
+
# setup authorization
|
|
1698
|
+
ScrapeBadger.configure do |config|
|
|
1699
|
+
# Configure API key authorization: ApiKeyAuth
|
|
1700
|
+
config.api_key['X-API-Key'] = 'YOUR API KEY'
|
|
1701
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
1702
|
+
# config.api_key_prefix['X-API-Key'] = 'Bearer'
|
|
1703
|
+
end
|
|
1704
|
+
|
|
1705
|
+
api_instance = ScrapeBadger::GoogleApi.new
|
|
1706
|
+
q = 'q_example' # String | Search term
|
|
1707
|
+
opts = {
|
|
1708
|
+
geo: 'geo_example' # String |
|
|
1709
|
+
}
|
|
1710
|
+
|
|
1711
|
+
begin
|
|
1712
|
+
# Interest by region
|
|
1713
|
+
result = api_instance.google_interest_by_region(q, opts)
|
|
1714
|
+
p result
|
|
1715
|
+
rescue ScrapeBadger::ApiError => e
|
|
1716
|
+
puts "Error when calling GoogleApi->google_interest_by_region: #{e}"
|
|
1717
|
+
end
|
|
1718
|
+
```
|
|
1719
|
+
|
|
1720
|
+
#### Using the google_interest_by_region_with_http_info variant
|
|
1721
|
+
|
|
1722
|
+
This returns an Array which contains the response data, status code and headers.
|
|
1723
|
+
|
|
1724
|
+
> <Array(Object, Integer, Hash)> google_interest_by_region_with_http_info(q, opts)
|
|
1725
|
+
|
|
1726
|
+
```ruby
|
|
1727
|
+
begin
|
|
1728
|
+
# Interest by region
|
|
1729
|
+
data, status_code, headers = api_instance.google_interest_by_region_with_http_info(q, opts)
|
|
1730
|
+
p status_code # => 2xx
|
|
1731
|
+
p headers # => { ... }
|
|
1732
|
+
p data # => Object
|
|
1733
|
+
rescue ScrapeBadger::ApiError => e
|
|
1734
|
+
puts "Error when calling GoogleApi->google_interest_by_region_with_http_info: #{e}"
|
|
1735
|
+
end
|
|
1736
|
+
```
|
|
1737
|
+
|
|
1738
|
+
### Parameters
|
|
1739
|
+
|
|
1740
|
+
| Name | Type | Description | Notes |
|
|
1741
|
+
| ---- | ---- | ----------- | ----- |
|
|
1742
|
+
| **q** | **String** | Search term | |
|
|
1743
|
+
| **geo** | **String** | | [optional][default to ''] |
|
|
1744
|
+
|
|
1745
|
+
### Return type
|
|
1746
|
+
|
|
1747
|
+
**Object**
|
|
1748
|
+
|
|
1749
|
+
### Authorization
|
|
1750
|
+
|
|
1751
|
+
[ApiKeyAuth](../README.md#ApiKeyAuth)
|
|
1752
|
+
|
|
1753
|
+
### HTTP request headers
|
|
1754
|
+
|
|
1755
|
+
- **Content-Type**: Not defined
|
|
1756
|
+
- **Accept**: application/json
|
|
1757
|
+
|
|
1758
|
+
|
|
1759
|
+
## google_interest_over_time
|
|
1760
|
+
|
|
1761
|
+
> Object google_interest_over_time(q, opts)
|
|
1762
|
+
|
|
1763
|
+
Interest over time
|
|
1764
|
+
|
|
1765
|
+
### Examples
|
|
1766
|
+
|
|
1767
|
+
```ruby
|
|
1768
|
+
require 'time'
|
|
1769
|
+
require 'scrapebadger'
|
|
1770
|
+
# setup authorization
|
|
1771
|
+
ScrapeBadger.configure do |config|
|
|
1772
|
+
# Configure API key authorization: ApiKeyAuth
|
|
1773
|
+
config.api_key['X-API-Key'] = 'YOUR API KEY'
|
|
1774
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
1775
|
+
# config.api_key_prefix['X-API-Key'] = 'Bearer'
|
|
1776
|
+
end
|
|
1777
|
+
|
|
1778
|
+
api_instance = ScrapeBadger::GoogleApi.new
|
|
1779
|
+
q = 'q_example' # String | Search terms
|
|
1780
|
+
opts = {
|
|
1781
|
+
geo: 'geo_example', # String |
|
|
1782
|
+
date: 'date_example' # String |
|
|
1783
|
+
}
|
|
1784
|
+
|
|
1785
|
+
begin
|
|
1786
|
+
# Interest over time
|
|
1787
|
+
result = api_instance.google_interest_over_time(q, opts)
|
|
1788
|
+
p result
|
|
1789
|
+
rescue ScrapeBadger::ApiError => e
|
|
1790
|
+
puts "Error when calling GoogleApi->google_interest_over_time: #{e}"
|
|
1791
|
+
end
|
|
1792
|
+
```
|
|
1793
|
+
|
|
1794
|
+
#### Using the google_interest_over_time_with_http_info variant
|
|
1795
|
+
|
|
1796
|
+
This returns an Array which contains the response data, status code and headers.
|
|
1797
|
+
|
|
1798
|
+
> <Array(Object, Integer, Hash)> google_interest_over_time_with_http_info(q, opts)
|
|
1799
|
+
|
|
1800
|
+
```ruby
|
|
1801
|
+
begin
|
|
1802
|
+
# Interest over time
|
|
1803
|
+
data, status_code, headers = api_instance.google_interest_over_time_with_http_info(q, opts)
|
|
1804
|
+
p status_code # => 2xx
|
|
1805
|
+
p headers # => { ... }
|
|
1806
|
+
p data # => Object
|
|
1807
|
+
rescue ScrapeBadger::ApiError => e
|
|
1808
|
+
puts "Error when calling GoogleApi->google_interest_over_time_with_http_info: #{e}"
|
|
1809
|
+
end
|
|
1810
|
+
```
|
|
1811
|
+
|
|
1812
|
+
### Parameters
|
|
1813
|
+
|
|
1814
|
+
| Name | Type | Description | Notes |
|
|
1815
|
+
| ---- | ---- | ----------- | ----- |
|
|
1816
|
+
| **q** | **String** | Search terms | |
|
|
1817
|
+
| **geo** | **String** | | [optional][default to ''] |
|
|
1818
|
+
| **date** | **String** | | [optional][default to 'today 12-m'] |
|
|
1819
|
+
|
|
1820
|
+
### Return type
|
|
1821
|
+
|
|
1822
|
+
**Object**
|
|
1823
|
+
|
|
1824
|
+
### Authorization
|
|
1825
|
+
|
|
1826
|
+
[ApiKeyAuth](../README.md#ApiKeyAuth)
|
|
1827
|
+
|
|
1828
|
+
### HTTP request headers
|
|
1829
|
+
|
|
1830
|
+
- **Content-Type**: Not defined
|
|
1831
|
+
- **Accept**: application/json
|
|
1832
|
+
|
|
1833
|
+
|
|
1834
|
+
## google_multi_seller_offers_by_barcode
|
|
1835
|
+
|
|
1836
|
+
> Object google_multi_seller_offers_by_barcode(barcode, opts)
|
|
1837
|
+
|
|
1838
|
+
Multi-seller offers by barcode
|
|
1839
|
+
|
|
1840
|
+
Resolve a barcode to a product via Google web search, then return its Google Shopping seller offers (source + price per merchant).
|
|
1841
|
+
|
|
1842
|
+
### Examples
|
|
1843
|
+
|
|
1844
|
+
```ruby
|
|
1845
|
+
require 'time'
|
|
1846
|
+
require 'scrapebadger'
|
|
1847
|
+
# setup authorization
|
|
1848
|
+
ScrapeBadger.configure do |config|
|
|
1849
|
+
# Configure API key authorization: ApiKeyAuth
|
|
1850
|
+
config.api_key['X-API-Key'] = 'YOUR API KEY'
|
|
1851
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
1852
|
+
# config.api_key_prefix['X-API-Key'] = 'Bearer'
|
|
1853
|
+
end
|
|
1854
|
+
|
|
1855
|
+
api_instance = ScrapeBadger::GoogleApi.new
|
|
1856
|
+
barcode = 'barcode_example' # String | Product barcode — GTIN-8 / UPC-A / EAN-13 / GTIN-14
|
|
1857
|
+
opts = {
|
|
1858
|
+
gl: 'gl_example', # String | Country code (ISO 3166 alpha-2)
|
|
1859
|
+
hl: 'hl_example' # String | Language code
|
|
1860
|
+
}
|
|
1861
|
+
|
|
1862
|
+
begin
|
|
1863
|
+
# Multi-seller offers by barcode
|
|
1864
|
+
result = api_instance.google_multi_seller_offers_by_barcode(barcode, opts)
|
|
1865
|
+
p result
|
|
1866
|
+
rescue ScrapeBadger::ApiError => e
|
|
1867
|
+
puts "Error when calling GoogleApi->google_multi_seller_offers_by_barcode: #{e}"
|
|
1868
|
+
end
|
|
1869
|
+
```
|
|
1870
|
+
|
|
1871
|
+
#### Using the google_multi_seller_offers_by_barcode_with_http_info variant
|
|
1872
|
+
|
|
1873
|
+
This returns an Array which contains the response data, status code and headers.
|
|
1874
|
+
|
|
1875
|
+
> <Array(Object, Integer, Hash)> google_multi_seller_offers_by_barcode_with_http_info(barcode, opts)
|
|
1876
|
+
|
|
1877
|
+
```ruby
|
|
1878
|
+
begin
|
|
1879
|
+
# Multi-seller offers by barcode
|
|
1880
|
+
data, status_code, headers = api_instance.google_multi_seller_offers_by_barcode_with_http_info(barcode, opts)
|
|
1881
|
+
p status_code # => 2xx
|
|
1882
|
+
p headers # => { ... }
|
|
1883
|
+
p data # => Object
|
|
1884
|
+
rescue ScrapeBadger::ApiError => e
|
|
1885
|
+
puts "Error when calling GoogleApi->google_multi_seller_offers_by_barcode_with_http_info: #{e}"
|
|
1886
|
+
end
|
|
1887
|
+
```
|
|
1888
|
+
|
|
1889
|
+
### Parameters
|
|
1890
|
+
|
|
1891
|
+
| Name | Type | Description | Notes |
|
|
1892
|
+
| ---- | ---- | ----------- | ----- |
|
|
1893
|
+
| **barcode** | **String** | Product barcode — GTIN-8 / UPC-A / EAN-13 / GTIN-14 | |
|
|
1894
|
+
| **gl** | **String** | Country code (ISO 3166 alpha-2) | [optional] |
|
|
1895
|
+
| **hl** | **String** | Language code | [optional][default to 'en'] |
|
|
1896
|
+
|
|
1897
|
+
### Return type
|
|
1898
|
+
|
|
1899
|
+
**Object**
|
|
1900
|
+
|
|
1901
|
+
### Authorization
|
|
1902
|
+
|
|
1903
|
+
[ApiKeyAuth](../README.md#ApiKeyAuth)
|
|
1904
|
+
|
|
1905
|
+
### HTTP request headers
|
|
1906
|
+
|
|
1907
|
+
- **Content-Type**: Not defined
|
|
1908
|
+
- **Accept**: application/json
|
|
1909
|
+
|
|
1910
|
+
|
|
1911
|
+
## google_news_by_topic
|
|
1912
|
+
|
|
1913
|
+
> Object google_news_by_topic(topic, opts)
|
|
1914
|
+
|
|
1915
|
+
News by topic
|
|
1916
|
+
|
|
1917
|
+
### Examples
|
|
1918
|
+
|
|
1919
|
+
```ruby
|
|
1920
|
+
require 'time'
|
|
1921
|
+
require 'scrapebadger'
|
|
1922
|
+
# setup authorization
|
|
1923
|
+
ScrapeBadger.configure do |config|
|
|
1924
|
+
# Configure API key authorization: ApiKeyAuth
|
|
1925
|
+
config.api_key['X-API-Key'] = 'YOUR API KEY'
|
|
1926
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
1927
|
+
# config.api_key_prefix['X-API-Key'] = 'Bearer'
|
|
1928
|
+
end
|
|
1929
|
+
|
|
1930
|
+
api_instance = ScrapeBadger::GoogleApi.new
|
|
1931
|
+
topic = 'topic_example' # String | Topic name
|
|
1932
|
+
opts = {
|
|
1933
|
+
hl: 'hl_example', # String |
|
|
1934
|
+
gl: 'gl_example', # String |
|
|
1935
|
+
max_results: 56 # Integer |
|
|
1936
|
+
}
|
|
1937
|
+
|
|
1938
|
+
begin
|
|
1939
|
+
# News by topic
|
|
1940
|
+
result = api_instance.google_news_by_topic(topic, opts)
|
|
1941
|
+
p result
|
|
1942
|
+
rescue ScrapeBadger::ApiError => e
|
|
1943
|
+
puts "Error when calling GoogleApi->google_news_by_topic: #{e}"
|
|
1944
|
+
end
|
|
1945
|
+
```
|
|
1946
|
+
|
|
1947
|
+
#### Using the google_news_by_topic_with_http_info variant
|
|
1948
|
+
|
|
1949
|
+
This returns an Array which contains the response data, status code and headers.
|
|
1950
|
+
|
|
1951
|
+
> <Array(Object, Integer, Hash)> google_news_by_topic_with_http_info(topic, opts)
|
|
1952
|
+
|
|
1953
|
+
```ruby
|
|
1954
|
+
begin
|
|
1955
|
+
# News by topic
|
|
1956
|
+
data, status_code, headers = api_instance.google_news_by_topic_with_http_info(topic, opts)
|
|
1957
|
+
p status_code # => 2xx
|
|
1958
|
+
p headers # => { ... }
|
|
1959
|
+
p data # => Object
|
|
1960
|
+
rescue ScrapeBadger::ApiError => e
|
|
1961
|
+
puts "Error when calling GoogleApi->google_news_by_topic_with_http_info: #{e}"
|
|
1962
|
+
end
|
|
1963
|
+
```
|
|
1964
|
+
|
|
1965
|
+
### Parameters
|
|
1966
|
+
|
|
1967
|
+
| Name | Type | Description | Notes |
|
|
1968
|
+
| ---- | ---- | ----------- | ----- |
|
|
1969
|
+
| **topic** | **String** | Topic name | |
|
|
1970
|
+
| **hl** | **String** | | [optional][default to 'en'] |
|
|
1971
|
+
| **gl** | **String** | | [optional][default to 'US'] |
|
|
1972
|
+
| **max_results** | **Integer** | | [optional][default to 10] |
|
|
1973
|
+
|
|
1974
|
+
### Return type
|
|
1975
|
+
|
|
1976
|
+
**Object**
|
|
1977
|
+
|
|
1978
|
+
### Authorization
|
|
1979
|
+
|
|
1980
|
+
[ApiKeyAuth](../README.md#ApiKeyAuth)
|
|
1981
|
+
|
|
1982
|
+
### HTTP request headers
|
|
1983
|
+
|
|
1984
|
+
- **Content-Type**: Not defined
|
|
1985
|
+
- **Accept**: application/json
|
|
1986
|
+
|
|
1987
|
+
|
|
1988
|
+
## google_patent_details
|
|
1989
|
+
|
|
1990
|
+
> Object google_patent_details(patent_id)
|
|
1991
|
+
|
|
1992
|
+
Patent details
|
|
1993
|
+
|
|
1994
|
+
### Examples
|
|
1995
|
+
|
|
1996
|
+
```ruby
|
|
1997
|
+
require 'time'
|
|
1998
|
+
require 'scrapebadger'
|
|
1999
|
+
# setup authorization
|
|
2000
|
+
ScrapeBadger.configure do |config|
|
|
2001
|
+
# Configure API key authorization: ApiKeyAuth
|
|
2002
|
+
config.api_key['X-API-Key'] = 'YOUR API KEY'
|
|
2003
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
2004
|
+
# config.api_key_prefix['X-API-Key'] = 'Bearer'
|
|
2005
|
+
end
|
|
2006
|
+
|
|
2007
|
+
api_instance = ScrapeBadger::GoogleApi.new
|
|
2008
|
+
patent_id = 'patent_id_example' # String | Patent number
|
|
2009
|
+
|
|
2010
|
+
begin
|
|
2011
|
+
# Patent details
|
|
2012
|
+
result = api_instance.google_patent_details(patent_id)
|
|
2013
|
+
p result
|
|
2014
|
+
rescue ScrapeBadger::ApiError => e
|
|
2015
|
+
puts "Error when calling GoogleApi->google_patent_details: #{e}"
|
|
2016
|
+
end
|
|
2017
|
+
```
|
|
2018
|
+
|
|
2019
|
+
#### Using the google_patent_details_with_http_info variant
|
|
2020
|
+
|
|
2021
|
+
This returns an Array which contains the response data, status code and headers.
|
|
2022
|
+
|
|
2023
|
+
> <Array(Object, Integer, Hash)> google_patent_details_with_http_info(patent_id)
|
|
2024
|
+
|
|
2025
|
+
```ruby
|
|
2026
|
+
begin
|
|
2027
|
+
# Patent details
|
|
2028
|
+
data, status_code, headers = api_instance.google_patent_details_with_http_info(patent_id)
|
|
2029
|
+
p status_code # => 2xx
|
|
2030
|
+
p headers # => { ... }
|
|
2031
|
+
p data # => Object
|
|
2032
|
+
rescue ScrapeBadger::ApiError => e
|
|
2033
|
+
puts "Error when calling GoogleApi->google_patent_details_with_http_info: #{e}"
|
|
2034
|
+
end
|
|
2035
|
+
```
|
|
2036
|
+
|
|
2037
|
+
### Parameters
|
|
2038
|
+
|
|
2039
|
+
| Name | Type | Description | Notes |
|
|
2040
|
+
| ---- | ---- | ----------- | ----- |
|
|
2041
|
+
| **patent_id** | **String** | Patent number | |
|
|
2042
|
+
|
|
2043
|
+
### Return type
|
|
2044
|
+
|
|
2045
|
+
**Object**
|
|
2046
|
+
|
|
2047
|
+
### Authorization
|
|
2048
|
+
|
|
2049
|
+
[ApiKeyAuth](../README.md#ApiKeyAuth)
|
|
2050
|
+
|
|
2051
|
+
### HTTP request headers
|
|
2052
|
+
|
|
2053
|
+
- **Content-Type**: Not defined
|
|
2054
|
+
- **Accept**: application/json
|
|
2055
|
+
|
|
2056
|
+
|
|
2057
|
+
## google_related_topics_queries
|
|
2058
|
+
|
|
2059
|
+
> Object google_related_topics_queries(q, opts)
|
|
2060
|
+
|
|
2061
|
+
Related topics & queries
|
|
2062
|
+
|
|
2063
|
+
### Examples
|
|
2064
|
+
|
|
2065
|
+
```ruby
|
|
2066
|
+
require 'time'
|
|
2067
|
+
require 'scrapebadger'
|
|
2068
|
+
# setup authorization
|
|
2069
|
+
ScrapeBadger.configure do |config|
|
|
2070
|
+
# Configure API key authorization: ApiKeyAuth
|
|
2071
|
+
config.api_key['X-API-Key'] = 'YOUR API KEY'
|
|
2072
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
2073
|
+
# config.api_key_prefix['X-API-Key'] = 'Bearer'
|
|
2074
|
+
end
|
|
2075
|
+
|
|
2076
|
+
api_instance = ScrapeBadger::GoogleApi.new
|
|
2077
|
+
q = 'q_example' # String | Search term
|
|
2078
|
+
opts = {
|
|
2079
|
+
geo: 'geo_example' # String |
|
|
2080
|
+
}
|
|
2081
|
+
|
|
2082
|
+
begin
|
|
2083
|
+
# Related topics & queries
|
|
2084
|
+
result = api_instance.google_related_topics_queries(q, opts)
|
|
2085
|
+
p result
|
|
2086
|
+
rescue ScrapeBadger::ApiError => e
|
|
2087
|
+
puts "Error when calling GoogleApi->google_related_topics_queries: #{e}"
|
|
2088
|
+
end
|
|
2089
|
+
```
|
|
2090
|
+
|
|
2091
|
+
#### Using the google_related_topics_queries_with_http_info variant
|
|
2092
|
+
|
|
2093
|
+
This returns an Array which contains the response data, status code and headers.
|
|
2094
|
+
|
|
2095
|
+
> <Array(Object, Integer, Hash)> google_related_topics_queries_with_http_info(q, opts)
|
|
2096
|
+
|
|
2097
|
+
```ruby
|
|
2098
|
+
begin
|
|
2099
|
+
# Related topics & queries
|
|
2100
|
+
data, status_code, headers = api_instance.google_related_topics_queries_with_http_info(q, opts)
|
|
2101
|
+
p status_code # => 2xx
|
|
2102
|
+
p headers # => { ... }
|
|
2103
|
+
p data # => Object
|
|
2104
|
+
rescue ScrapeBadger::ApiError => e
|
|
2105
|
+
puts "Error when calling GoogleApi->google_related_topics_queries_with_http_info: #{e}"
|
|
2106
|
+
end
|
|
2107
|
+
```
|
|
2108
|
+
|
|
2109
|
+
### Parameters
|
|
2110
|
+
|
|
2111
|
+
| Name | Type | Description | Notes |
|
|
2112
|
+
| ---- | ---- | ----------- | ----- |
|
|
2113
|
+
| **q** | **String** | Search term | |
|
|
2114
|
+
| **geo** | **String** | | [optional][default to ''] |
|
|
2115
|
+
|
|
2116
|
+
### Return type
|
|
2117
|
+
|
|
2118
|
+
**Object**
|
|
2119
|
+
|
|
2120
|
+
### Authorization
|
|
2121
|
+
|
|
2122
|
+
[ApiKeyAuth](../README.md#ApiKeyAuth)
|
|
2123
|
+
|
|
2124
|
+
### HTTP request headers
|
|
2125
|
+
|
|
2126
|
+
- **Content-Type**: Not defined
|
|
2127
|
+
- **Accept**: application/json
|
|
2128
|
+
|
|
2129
|
+
|
|
2130
|
+
## google_search_google_images
|
|
2131
|
+
|
|
2132
|
+
> Object google_search_google_images(q, opts)
|
|
2133
|
+
|
|
2134
|
+
Search Google Images
|
|
2135
|
+
|
|
2136
|
+
Search Google Images for visual content.
|
|
2137
|
+
|
|
2138
|
+
### Examples
|
|
2139
|
+
|
|
2140
|
+
```ruby
|
|
2141
|
+
require 'time'
|
|
2142
|
+
require 'scrapebadger'
|
|
2143
|
+
# setup authorization
|
|
2144
|
+
ScrapeBadger.configure do |config|
|
|
2145
|
+
# Configure API key authorization: ApiKeyAuth
|
|
2146
|
+
config.api_key['X-API-Key'] = 'YOUR API KEY'
|
|
2147
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
2148
|
+
# config.api_key_prefix['X-API-Key'] = 'Bearer'
|
|
2149
|
+
end
|
|
2150
|
+
|
|
2151
|
+
api_instance = ScrapeBadger::GoogleApi.new
|
|
2152
|
+
q = 'q_example' # String | Image search query
|
|
2153
|
+
opts = {
|
|
2154
|
+
gl: 'gl_example', # String | Country code
|
|
2155
|
+
hl: 'hl_example', # String | Language code
|
|
2156
|
+
tbs: 'tbs_example', # String | Time/filter string (e.g. qdr:d)
|
|
2157
|
+
imgsz: 'imgsz_example', # String | Image size: l, m, i, xXl
|
|
2158
|
+
imgcolor: 'imgcolor_example', # String | Image color filter
|
|
2159
|
+
imgtype: 'imgtype_example', # String | Image type: face, photo, clipart
|
|
2160
|
+
safe: 'safe_example', # String | Safe search
|
|
2161
|
+
page: 56 # Integer | Page number
|
|
2162
|
+
}
|
|
2163
|
+
|
|
2164
|
+
begin
|
|
2165
|
+
# Search Google Images
|
|
2166
|
+
result = api_instance.google_search_google_images(q, opts)
|
|
2167
|
+
p result
|
|
2168
|
+
rescue ScrapeBadger::ApiError => e
|
|
2169
|
+
puts "Error when calling GoogleApi->google_search_google_images: #{e}"
|
|
2170
|
+
end
|
|
2171
|
+
```
|
|
2172
|
+
|
|
2173
|
+
#### Using the google_search_google_images_with_http_info variant
|
|
2174
|
+
|
|
2175
|
+
This returns an Array which contains the response data, status code and headers.
|
|
2176
|
+
|
|
2177
|
+
> <Array(Object, Integer, Hash)> google_search_google_images_with_http_info(q, opts)
|
|
2178
|
+
|
|
2179
|
+
```ruby
|
|
2180
|
+
begin
|
|
2181
|
+
# Search Google Images
|
|
2182
|
+
data, status_code, headers = api_instance.google_search_google_images_with_http_info(q, opts)
|
|
2183
|
+
p status_code # => 2xx
|
|
2184
|
+
p headers # => { ... }
|
|
2185
|
+
p data # => Object
|
|
2186
|
+
rescue ScrapeBadger::ApiError => e
|
|
2187
|
+
puts "Error when calling GoogleApi->google_search_google_images_with_http_info: #{e}"
|
|
2188
|
+
end
|
|
2189
|
+
```
|
|
2190
|
+
|
|
2191
|
+
### Parameters
|
|
2192
|
+
|
|
2193
|
+
| Name | Type | Description | Notes |
|
|
2194
|
+
| ---- | ---- | ----------- | ----- |
|
|
2195
|
+
| **q** | **String** | Image search query | |
|
|
2196
|
+
| **gl** | **String** | Country code | [optional][default to 'us'] |
|
|
2197
|
+
| **hl** | **String** | Language code | [optional][default to 'en'] |
|
|
2198
|
+
| **tbs** | **String** | Time/filter string (e.g. qdr:d) | [optional] |
|
|
2199
|
+
| **imgsz** | **String** | Image size: l, m, i, xXl | [optional] |
|
|
2200
|
+
| **imgcolor** | **String** | Image color filter | [optional] |
|
|
2201
|
+
| **imgtype** | **String** | Image type: face, photo, clipart | [optional] |
|
|
2202
|
+
| **safe** | **String** | Safe search | [optional][default to 'off'] |
|
|
2203
|
+
| **page** | **Integer** | Page number | [optional][default to 0] |
|
|
2204
|
+
|
|
2205
|
+
### Return type
|
|
2206
|
+
|
|
2207
|
+
**Object**
|
|
2208
|
+
|
|
2209
|
+
### Authorization
|
|
2210
|
+
|
|
2211
|
+
[ApiKeyAuth](../README.md#ApiKeyAuth)
|
|
2212
|
+
|
|
2213
|
+
### HTTP request headers
|
|
2214
|
+
|
|
2215
|
+
- **Content-Type**: Not defined
|
|
2216
|
+
- **Accept**: application/json
|
|
2217
|
+
|
|
2218
|
+
|
|
2219
|
+
## google_search_google_jobs
|
|
2220
|
+
|
|
2221
|
+
> Object google_search_google_jobs(q, opts)
|
|
2222
|
+
|
|
2223
|
+
Search Google Jobs
|
|
2224
|
+
|
|
2225
|
+
### Examples
|
|
2226
|
+
|
|
2227
|
+
```ruby
|
|
2228
|
+
require 'time'
|
|
2229
|
+
require 'scrapebadger'
|
|
2230
|
+
# setup authorization
|
|
2231
|
+
ScrapeBadger.configure do |config|
|
|
2232
|
+
# Configure API key authorization: ApiKeyAuth
|
|
2233
|
+
config.api_key['X-API-Key'] = 'YOUR API KEY'
|
|
2234
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
2235
|
+
# config.api_key_prefix['X-API-Key'] = 'Bearer'
|
|
2236
|
+
end
|
|
2237
|
+
|
|
2238
|
+
api_instance = ScrapeBadger::GoogleApi.new
|
|
2239
|
+
q = 'q_example' # String | Job title, keywords
|
|
2240
|
+
opts = {
|
|
2241
|
+
location: 'location_example', # String |
|
|
2242
|
+
gl: 'gl_example', # String |
|
|
2243
|
+
job_type: 'job_type_example', # String |
|
|
2244
|
+
date_posted: 'date_posted_example' # String |
|
|
2245
|
+
}
|
|
2246
|
+
|
|
2247
|
+
begin
|
|
2248
|
+
# Search Google Jobs
|
|
2249
|
+
result = api_instance.google_search_google_jobs(q, opts)
|
|
2250
|
+
p result
|
|
2251
|
+
rescue ScrapeBadger::ApiError => e
|
|
2252
|
+
puts "Error when calling GoogleApi->google_search_google_jobs: #{e}"
|
|
2253
|
+
end
|
|
2254
|
+
```
|
|
2255
|
+
|
|
2256
|
+
#### Using the google_search_google_jobs_with_http_info variant
|
|
2257
|
+
|
|
2258
|
+
This returns an Array which contains the response data, status code and headers.
|
|
2259
|
+
|
|
2260
|
+
> <Array(Object, Integer, Hash)> google_search_google_jobs_with_http_info(q, opts)
|
|
2261
|
+
|
|
2262
|
+
```ruby
|
|
2263
|
+
begin
|
|
2264
|
+
# Search Google Jobs
|
|
2265
|
+
data, status_code, headers = api_instance.google_search_google_jobs_with_http_info(q, opts)
|
|
2266
|
+
p status_code # => 2xx
|
|
2267
|
+
p headers # => { ... }
|
|
2268
|
+
p data # => Object
|
|
2269
|
+
rescue ScrapeBadger::ApiError => e
|
|
2270
|
+
puts "Error when calling GoogleApi->google_search_google_jobs_with_http_info: #{e}"
|
|
2271
|
+
end
|
|
2272
|
+
```
|
|
2273
|
+
|
|
2274
|
+
### Parameters
|
|
2275
|
+
|
|
2276
|
+
| Name | Type | Description | Notes |
|
|
2277
|
+
| ---- | ---- | ----------- | ----- |
|
|
2278
|
+
| **q** | **String** | Job title, keywords | |
|
|
2279
|
+
| **location** | **String** | | [optional] |
|
|
2280
|
+
| **gl** | **String** | | [optional][default to 'us'] |
|
|
2281
|
+
| **job_type** | **String** | | [optional] |
|
|
2282
|
+
| **date_posted** | **String** | | [optional] |
|
|
2283
|
+
|
|
2284
|
+
### Return type
|
|
2285
|
+
|
|
2286
|
+
**Object**
|
|
2287
|
+
|
|
2288
|
+
### Authorization
|
|
2289
|
+
|
|
2290
|
+
[ApiKeyAuth](../README.md#ApiKeyAuth)
|
|
2291
|
+
|
|
2292
|
+
### HTTP request headers
|
|
2293
|
+
|
|
2294
|
+
- **Content-Type**: Not defined
|
|
2295
|
+
- **Accept**: application/json
|
|
2296
|
+
|
|
2297
|
+
|
|
2298
|
+
## google_search_google_maps_places
|
|
2299
|
+
|
|
2300
|
+
> Object google_search_google_maps_places(q, opts)
|
|
2301
|
+
|
|
2302
|
+
Search Google Maps places
|
|
2303
|
+
|
|
2304
|
+
### Examples
|
|
2305
|
+
|
|
2306
|
+
```ruby
|
|
2307
|
+
require 'time'
|
|
2308
|
+
require 'scrapebadger'
|
|
2309
|
+
# setup authorization
|
|
2310
|
+
ScrapeBadger.configure do |config|
|
|
2311
|
+
# Configure API key authorization: ApiKeyAuth
|
|
2312
|
+
config.api_key['X-API-Key'] = 'YOUR API KEY'
|
|
2313
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
2314
|
+
# config.api_key_prefix['X-API-Key'] = 'Bearer'
|
|
2315
|
+
end
|
|
2316
|
+
|
|
2317
|
+
api_instance = ScrapeBadger::GoogleApi.new
|
|
2318
|
+
q = 'q_example' # String | Search query
|
|
2319
|
+
opts = {
|
|
2320
|
+
ll: 'll_example', # String |
|
|
2321
|
+
gl: 'gl_example', # String |
|
|
2322
|
+
hl: 'hl_example', # String |
|
|
2323
|
+
start: 56 # Integer |
|
|
2324
|
+
}
|
|
2325
|
+
|
|
2326
|
+
begin
|
|
2327
|
+
# Search Google Maps places
|
|
2328
|
+
result = api_instance.google_search_google_maps_places(q, opts)
|
|
2329
|
+
p result
|
|
2330
|
+
rescue ScrapeBadger::ApiError => e
|
|
2331
|
+
puts "Error when calling GoogleApi->google_search_google_maps_places: #{e}"
|
|
2332
|
+
end
|
|
2333
|
+
```
|
|
2334
|
+
|
|
2335
|
+
#### Using the google_search_google_maps_places_with_http_info variant
|
|
2336
|
+
|
|
2337
|
+
This returns an Array which contains the response data, status code and headers.
|
|
2338
|
+
|
|
2339
|
+
> <Array(Object, Integer, Hash)> google_search_google_maps_places_with_http_info(q, opts)
|
|
2340
|
+
|
|
2341
|
+
```ruby
|
|
2342
|
+
begin
|
|
2343
|
+
# Search Google Maps places
|
|
2344
|
+
data, status_code, headers = api_instance.google_search_google_maps_places_with_http_info(q, opts)
|
|
2345
|
+
p status_code # => 2xx
|
|
2346
|
+
p headers # => { ... }
|
|
2347
|
+
p data # => Object
|
|
2348
|
+
rescue ScrapeBadger::ApiError => e
|
|
2349
|
+
puts "Error when calling GoogleApi->google_search_google_maps_places_with_http_info: #{e}"
|
|
2350
|
+
end
|
|
2351
|
+
```
|
|
2352
|
+
|
|
2353
|
+
### Parameters
|
|
2354
|
+
|
|
2355
|
+
| Name | Type | Description | Notes |
|
|
2356
|
+
| ---- | ---- | ----------- | ----- |
|
|
2357
|
+
| **q** | **String** | Search query | |
|
|
2358
|
+
| **ll** | **String** | | [optional] |
|
|
2359
|
+
| **gl** | **String** | | [optional][default to 'us'] |
|
|
2360
|
+
| **hl** | **String** | | [optional][default to 'en'] |
|
|
2361
|
+
| **start** | **Integer** | | [optional][default to 0] |
|
|
2362
|
+
|
|
2363
|
+
### Return type
|
|
2364
|
+
|
|
2365
|
+
**Object**
|
|
2366
|
+
|
|
2367
|
+
### Authorization
|
|
2368
|
+
|
|
2369
|
+
[ApiKeyAuth](../README.md#ApiKeyAuth)
|
|
2370
|
+
|
|
2371
|
+
### HTTP request headers
|
|
2372
|
+
|
|
2373
|
+
- **Content-Type**: Not defined
|
|
2374
|
+
- **Accept**: application/json
|
|
2375
|
+
|
|
2376
|
+
|
|
2377
|
+
## google_search_google_news
|
|
2378
|
+
|
|
2379
|
+
> Object google_search_google_news(q, opts)
|
|
2380
|
+
|
|
2381
|
+
Search Google News
|
|
2382
|
+
|
|
2383
|
+
### Examples
|
|
2384
|
+
|
|
2385
|
+
```ruby
|
|
2386
|
+
require 'time'
|
|
2387
|
+
require 'scrapebadger'
|
|
2388
|
+
# setup authorization
|
|
2389
|
+
ScrapeBadger.configure do |config|
|
|
2390
|
+
# Configure API key authorization: ApiKeyAuth
|
|
2391
|
+
config.api_key['X-API-Key'] = 'YOUR API KEY'
|
|
2392
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
2393
|
+
# config.api_key_prefix['X-API-Key'] = 'Bearer'
|
|
2394
|
+
end
|
|
2395
|
+
|
|
2396
|
+
api_instance = ScrapeBadger::GoogleApi.new
|
|
2397
|
+
q = 'q_example' # String | Search query
|
|
2398
|
+
opts = {
|
|
2399
|
+
hl: 'hl_example', # String |
|
|
2400
|
+
gl: 'gl_example', # String |
|
|
2401
|
+
max_results: 56 # Integer |
|
|
2402
|
+
}
|
|
2403
|
+
|
|
2404
|
+
begin
|
|
2405
|
+
# Search Google News
|
|
2406
|
+
result = api_instance.google_search_google_news(q, opts)
|
|
2407
|
+
p result
|
|
2408
|
+
rescue ScrapeBadger::ApiError => e
|
|
2409
|
+
puts "Error when calling GoogleApi->google_search_google_news: #{e}"
|
|
2410
|
+
end
|
|
2411
|
+
```
|
|
2412
|
+
|
|
2413
|
+
#### Using the google_search_google_news_with_http_info variant
|
|
2414
|
+
|
|
2415
|
+
This returns an Array which contains the response data, status code and headers.
|
|
2416
|
+
|
|
2417
|
+
> <Array(Object, Integer, Hash)> google_search_google_news_with_http_info(q, opts)
|
|
2418
|
+
|
|
2419
|
+
```ruby
|
|
2420
|
+
begin
|
|
2421
|
+
# Search Google News
|
|
2422
|
+
data, status_code, headers = api_instance.google_search_google_news_with_http_info(q, opts)
|
|
2423
|
+
p status_code # => 2xx
|
|
2424
|
+
p headers # => { ... }
|
|
2425
|
+
p data # => Object
|
|
2426
|
+
rescue ScrapeBadger::ApiError => e
|
|
2427
|
+
puts "Error when calling GoogleApi->google_search_google_news_with_http_info: #{e}"
|
|
2428
|
+
end
|
|
2429
|
+
```
|
|
2430
|
+
|
|
2431
|
+
### Parameters
|
|
2432
|
+
|
|
2433
|
+
| Name | Type | Description | Notes |
|
|
2434
|
+
| ---- | ---- | ----------- | ----- |
|
|
2435
|
+
| **q** | **String** | Search query | |
|
|
2436
|
+
| **hl** | **String** | | [optional][default to 'en'] |
|
|
2437
|
+
| **gl** | **String** | | [optional][default to 'US'] |
|
|
2438
|
+
| **max_results** | **Integer** | | [optional][default to 10] |
|
|
2439
|
+
|
|
2440
|
+
### Return type
|
|
2441
|
+
|
|
2442
|
+
**Object**
|
|
2443
|
+
|
|
2444
|
+
### Authorization
|
|
2445
|
+
|
|
2446
|
+
[ApiKeyAuth](../README.md#ApiKeyAuth)
|
|
2447
|
+
|
|
2448
|
+
### HTTP request headers
|
|
2449
|
+
|
|
2450
|
+
- **Content-Type**: Not defined
|
|
2451
|
+
- **Accept**: application/json
|
|
2452
|
+
|
|
2453
|
+
|
|
2454
|
+
## google_search_google_scholar
|
|
2455
|
+
|
|
2456
|
+
> Object google_search_google_scholar(q, opts)
|
|
2457
|
+
|
|
2458
|
+
Search Google Scholar
|
|
2459
|
+
|
|
2460
|
+
Search Google Scholar for scholarly articles. Each result ships with its doc ``id``, ``type`` badge ([BOOK]/[PDF]/...), wrapped ``inline_links`` (versions + cited_by + related), PDF ``resources`` list, and structured ``authors`` (with ``author_id`` for profiled authors — pipe straight into ``/scholar/author``). Envelope carries ``scholar_results`` alias (Scrapingdog parity), ``related_searches``, and matched ``profiles`` cards.
|
|
2461
|
+
|
|
2462
|
+
### Examples
|
|
2463
|
+
|
|
2464
|
+
```ruby
|
|
2465
|
+
require 'time'
|
|
2466
|
+
require 'scrapebadger'
|
|
2467
|
+
# setup authorization
|
|
2468
|
+
ScrapeBadger.configure do |config|
|
|
2469
|
+
# Configure API key authorization: ApiKeyAuth
|
|
2470
|
+
config.api_key['X-API-Key'] = 'YOUR API KEY'
|
|
2471
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
2472
|
+
# config.api_key_prefix['X-API-Key'] = 'Bearer'
|
|
2473
|
+
end
|
|
2474
|
+
|
|
2475
|
+
api_instance = ScrapeBadger::GoogleApi.new
|
|
2476
|
+
q = 'q_example' # String | Search query for scholarly articles
|
|
2477
|
+
opts = {
|
|
2478
|
+
hl: 'hl_example', # String | Language code
|
|
2479
|
+
as_ylo: 56, # Integer | Year from (e.g. 2020)
|
|
2480
|
+
as_yhi: 56, # Integer | Year to (e.g. 2024)
|
|
2481
|
+
as_sdt: 'as_sdt_example', # String | Search type: 0=exclude patents, 7=include
|
|
2482
|
+
page: 56, # Integer | Page number (0-based)
|
|
2483
|
+
num: 56 # Integer | Results per page (max 20)
|
|
2484
|
+
}
|
|
2485
|
+
|
|
2486
|
+
begin
|
|
2487
|
+
# Search Google Scholar
|
|
2488
|
+
result = api_instance.google_search_google_scholar(q, opts)
|
|
2489
|
+
p result
|
|
2490
|
+
rescue ScrapeBadger::ApiError => e
|
|
2491
|
+
puts "Error when calling GoogleApi->google_search_google_scholar: #{e}"
|
|
2492
|
+
end
|
|
2493
|
+
```
|
|
2494
|
+
|
|
2495
|
+
#### Using the google_search_google_scholar_with_http_info variant
|
|
2496
|
+
|
|
2497
|
+
This returns an Array which contains the response data, status code and headers.
|
|
2498
|
+
|
|
2499
|
+
> <Array(Object, Integer, Hash)> google_search_google_scholar_with_http_info(q, opts)
|
|
2500
|
+
|
|
2501
|
+
```ruby
|
|
2502
|
+
begin
|
|
2503
|
+
# Search Google Scholar
|
|
2504
|
+
data, status_code, headers = api_instance.google_search_google_scholar_with_http_info(q, opts)
|
|
2505
|
+
p status_code # => 2xx
|
|
2506
|
+
p headers # => { ... }
|
|
2507
|
+
p data # => Object
|
|
2508
|
+
rescue ScrapeBadger::ApiError => e
|
|
2509
|
+
puts "Error when calling GoogleApi->google_search_google_scholar_with_http_info: #{e}"
|
|
2510
|
+
end
|
|
2511
|
+
```
|
|
2512
|
+
|
|
2513
|
+
### Parameters
|
|
2514
|
+
|
|
2515
|
+
| Name | Type | Description | Notes |
|
|
2516
|
+
| ---- | ---- | ----------- | ----- |
|
|
2517
|
+
| **q** | **String** | Search query for scholarly articles | |
|
|
2518
|
+
| **hl** | **String** | Language code | [optional][default to 'en'] |
|
|
2519
|
+
| **as_ylo** | **Integer** | Year from (e.g. 2020) | [optional] |
|
|
2520
|
+
| **as_yhi** | **Integer** | Year to (e.g. 2024) | [optional] |
|
|
2521
|
+
| **as_sdt** | **String** | Search type: 0=exclude patents, 7=include | [optional][default to '0'] |
|
|
2522
|
+
| **page** | **Integer** | Page number (0-based) | [optional][default to 0] |
|
|
2523
|
+
| **num** | **Integer** | Results per page (max 20) | [optional][default to 10] |
|
|
2524
|
+
|
|
2525
|
+
### Return type
|
|
2526
|
+
|
|
2527
|
+
**Object**
|
|
2528
|
+
|
|
2529
|
+
### Authorization
|
|
2530
|
+
|
|
2531
|
+
[ApiKeyAuth](../README.md#ApiKeyAuth)
|
|
2532
|
+
|
|
2533
|
+
### HTTP request headers
|
|
2534
|
+
|
|
2535
|
+
- **Content-Type**: Not defined
|
|
2536
|
+
- **Accept**: application/json
|
|
2537
|
+
|
|
2538
|
+
|
|
2539
|
+
## google_search_google_videos
|
|
2540
|
+
|
|
2541
|
+
> Object google_search_google_videos(q, opts)
|
|
2542
|
+
|
|
2543
|
+
Search Google Videos
|
|
2544
|
+
|
|
2545
|
+
Search Google for video results.
|
|
2546
|
+
|
|
2547
|
+
### Examples
|
|
2548
|
+
|
|
2549
|
+
```ruby
|
|
2550
|
+
require 'time'
|
|
2551
|
+
require 'scrapebadger'
|
|
2552
|
+
# setup authorization
|
|
2553
|
+
ScrapeBadger.configure do |config|
|
|
2554
|
+
# Configure API key authorization: ApiKeyAuth
|
|
2555
|
+
config.api_key['X-API-Key'] = 'YOUR API KEY'
|
|
2556
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
2557
|
+
# config.api_key_prefix['X-API-Key'] = 'Bearer'
|
|
2558
|
+
end
|
|
2559
|
+
|
|
2560
|
+
api_instance = ScrapeBadger::GoogleApi.new
|
|
2561
|
+
q = 'q_example' # String | Video search query
|
|
2562
|
+
opts = {
|
|
2563
|
+
gl: 'gl_example', # String | Country code
|
|
2564
|
+
hl: 'hl_example', # String | Language code
|
|
2565
|
+
tbs: 'tbs_example', # String | Time filter (e.g. qdr:d)
|
|
2566
|
+
safe: 'safe_example', # String | Safe search
|
|
2567
|
+
page: 56 # Integer | Page number
|
|
2568
|
+
}
|
|
2569
|
+
|
|
2570
|
+
begin
|
|
2571
|
+
# Search Google Videos
|
|
2572
|
+
result = api_instance.google_search_google_videos(q, opts)
|
|
2573
|
+
p result
|
|
2574
|
+
rescue ScrapeBadger::ApiError => e
|
|
2575
|
+
puts "Error when calling GoogleApi->google_search_google_videos: #{e}"
|
|
2576
|
+
end
|
|
2577
|
+
```
|
|
2578
|
+
|
|
2579
|
+
#### Using the google_search_google_videos_with_http_info variant
|
|
2580
|
+
|
|
2581
|
+
This returns an Array which contains the response data, status code and headers.
|
|
2582
|
+
|
|
2583
|
+
> <Array(Object, Integer, Hash)> google_search_google_videos_with_http_info(q, opts)
|
|
2584
|
+
|
|
2585
|
+
```ruby
|
|
2586
|
+
begin
|
|
2587
|
+
# Search Google Videos
|
|
2588
|
+
data, status_code, headers = api_instance.google_search_google_videos_with_http_info(q, opts)
|
|
2589
|
+
p status_code # => 2xx
|
|
2590
|
+
p headers # => { ... }
|
|
2591
|
+
p data # => Object
|
|
2592
|
+
rescue ScrapeBadger::ApiError => e
|
|
2593
|
+
puts "Error when calling GoogleApi->google_search_google_videos_with_http_info: #{e}"
|
|
2594
|
+
end
|
|
2595
|
+
```
|
|
2596
|
+
|
|
2597
|
+
### Parameters
|
|
2598
|
+
|
|
2599
|
+
| Name | Type | Description | Notes |
|
|
2600
|
+
| ---- | ---- | ----------- | ----- |
|
|
2601
|
+
| **q** | **String** | Video search query | |
|
|
2602
|
+
| **gl** | **String** | Country code | [optional][default to 'us'] |
|
|
2603
|
+
| **hl** | **String** | Language code | [optional][default to 'en'] |
|
|
2604
|
+
| **tbs** | **String** | Time filter (e.g. qdr:d) | [optional] |
|
|
2605
|
+
| **safe** | **String** | Safe search | [optional][default to 'off'] |
|
|
2606
|
+
| **page** | **Integer** | Page number | [optional][default to 0] |
|
|
2607
|
+
|
|
2608
|
+
### Return type
|
|
2609
|
+
|
|
2610
|
+
**Object**
|
|
2611
|
+
|
|
2612
|
+
### Authorization
|
|
2613
|
+
|
|
2614
|
+
[ApiKeyAuth](../README.md#ApiKeyAuth)
|
|
2615
|
+
|
|
2616
|
+
### HTTP request headers
|
|
2617
|
+
|
|
2618
|
+
- **Content-Type**: Not defined
|
|
2619
|
+
- **Accept**: application/json
|
|
2620
|
+
|
|
2621
|
+
|
|
2622
|
+
## google_search_hotels
|
|
2623
|
+
|
|
2624
|
+
> Object google_search_hotels(q, check_in, check_out, opts)
|
|
2625
|
+
|
|
2626
|
+
Search hotels
|
|
2627
|
+
|
|
2628
|
+
### Examples
|
|
2629
|
+
|
|
2630
|
+
```ruby
|
|
2631
|
+
require 'time'
|
|
2632
|
+
require 'scrapebadger'
|
|
2633
|
+
# setup authorization
|
|
2634
|
+
ScrapeBadger.configure do |config|
|
|
2635
|
+
# Configure API key authorization: ApiKeyAuth
|
|
2636
|
+
config.api_key['X-API-Key'] = 'YOUR API KEY'
|
|
2637
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
2638
|
+
# config.api_key_prefix['X-API-Key'] = 'Bearer'
|
|
2639
|
+
end
|
|
2640
|
+
|
|
2641
|
+
api_instance = ScrapeBadger::GoogleApi.new
|
|
2642
|
+
q = 'q_example' # String | Location or hotel name
|
|
2643
|
+
check_in = 'check_in_example' # String | YYYY-MM-DD
|
|
2644
|
+
check_out = 'check_out_example' # String | YYYY-MM-DD
|
|
2645
|
+
opts = {
|
|
2646
|
+
adults: 56, # Integer |
|
|
2647
|
+
currency: 'currency_example', # String |
|
|
2648
|
+
gl: 'gl_example' # String |
|
|
2649
|
+
}
|
|
2650
|
+
|
|
2651
|
+
begin
|
|
2652
|
+
# Search hotels
|
|
2653
|
+
result = api_instance.google_search_hotels(q, check_in, check_out, opts)
|
|
2654
|
+
p result
|
|
2655
|
+
rescue ScrapeBadger::ApiError => e
|
|
2656
|
+
puts "Error when calling GoogleApi->google_search_hotels: #{e}"
|
|
2657
|
+
end
|
|
2658
|
+
```
|
|
2659
|
+
|
|
2660
|
+
#### Using the google_search_hotels_with_http_info variant
|
|
2661
|
+
|
|
2662
|
+
This returns an Array which contains the response data, status code and headers.
|
|
2663
|
+
|
|
2664
|
+
> <Array(Object, Integer, Hash)> google_search_hotels_with_http_info(q, check_in, check_out, opts)
|
|
2665
|
+
|
|
2666
|
+
```ruby
|
|
2667
|
+
begin
|
|
2668
|
+
# Search hotels
|
|
2669
|
+
data, status_code, headers = api_instance.google_search_hotels_with_http_info(q, check_in, check_out, opts)
|
|
2670
|
+
p status_code # => 2xx
|
|
2671
|
+
p headers # => { ... }
|
|
2672
|
+
p data # => Object
|
|
2673
|
+
rescue ScrapeBadger::ApiError => e
|
|
2674
|
+
puts "Error when calling GoogleApi->google_search_hotels_with_http_info: #{e}"
|
|
2675
|
+
end
|
|
2676
|
+
```
|
|
2677
|
+
|
|
2678
|
+
### Parameters
|
|
2679
|
+
|
|
2680
|
+
| Name | Type | Description | Notes |
|
|
2681
|
+
| ---- | ---- | ----------- | ----- |
|
|
2682
|
+
| **q** | **String** | Location or hotel name | |
|
|
2683
|
+
| **check_in** | **String** | YYYY-MM-DD | |
|
|
2684
|
+
| **check_out** | **String** | YYYY-MM-DD | |
|
|
2685
|
+
| **adults** | **Integer** | | [optional][default to 2] |
|
|
2686
|
+
| **currency** | **String** | | [optional][default to 'USD'] |
|
|
2687
|
+
| **gl** | **String** | | [optional][default to 'us'] |
|
|
2688
|
+
|
|
2689
|
+
### Return type
|
|
2690
|
+
|
|
2691
|
+
**Object**
|
|
2692
|
+
|
|
2693
|
+
### Authorization
|
|
2694
|
+
|
|
2695
|
+
[ApiKeyAuth](../README.md#ApiKeyAuth)
|
|
2696
|
+
|
|
2697
|
+
### HTTP request headers
|
|
2698
|
+
|
|
2699
|
+
- **Content-Type**: Not defined
|
|
2700
|
+
- **Accept**: application/json
|
|
2701
|
+
|
|
2702
|
+
|
|
2703
|
+
## google_search_patents
|
|
2704
|
+
|
|
2705
|
+
> Object google_search_patents(q, opts)
|
|
2706
|
+
|
|
2707
|
+
Search patents
|
|
2708
|
+
|
|
2709
|
+
### Examples
|
|
2710
|
+
|
|
2711
|
+
```ruby
|
|
2712
|
+
require 'time'
|
|
2713
|
+
require 'scrapebadger'
|
|
2714
|
+
# setup authorization
|
|
2715
|
+
ScrapeBadger.configure do |config|
|
|
2716
|
+
# Configure API key authorization: ApiKeyAuth
|
|
2717
|
+
config.api_key['X-API-Key'] = 'YOUR API KEY'
|
|
2718
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
2719
|
+
# config.api_key_prefix['X-API-Key'] = 'Bearer'
|
|
2720
|
+
end
|
|
2721
|
+
|
|
2722
|
+
api_instance = ScrapeBadger::GoogleApi.new
|
|
2723
|
+
q = 'q_example' # String | Search query (Boolean logic supported)
|
|
2724
|
+
opts = {
|
|
2725
|
+
page: 56, # Integer |
|
|
2726
|
+
num: 56, # Integer |
|
|
2727
|
+
sort: 'sort_example', # String | 'new' or 'old'
|
|
2728
|
+
inventor: 'inventor_example', # String | Inventor name(s)
|
|
2729
|
+
assignee: 'assignee_example', # String | Assignee / company name(s)
|
|
2730
|
+
country: 'country_example', # String | Country code (US, EP, WO, …)
|
|
2731
|
+
language: 'language_example', # String | Patent language: ENGLISH, GERMAN, CHINESE, FRENCH, JAPANESE, KOREAN, SPANISH
|
|
2732
|
+
status: 'status_example', # String | GRANT or APPLICATION
|
|
2733
|
+
patent_type: 'patent_type_example', # String | PATENT or DESIGN
|
|
2734
|
+
before: 'before_example', # String | Before date YYYYMMDD
|
|
2735
|
+
after: 'after_example' # String | After date YYYYMMDD
|
|
2736
|
+
}
|
|
2737
|
+
|
|
2738
|
+
begin
|
|
2739
|
+
# Search patents
|
|
2740
|
+
result = api_instance.google_search_patents(q, opts)
|
|
2741
|
+
p result
|
|
2742
|
+
rescue ScrapeBadger::ApiError => e
|
|
2743
|
+
puts "Error when calling GoogleApi->google_search_patents: #{e}"
|
|
2744
|
+
end
|
|
2745
|
+
```
|
|
2746
|
+
|
|
2747
|
+
#### Using the google_search_patents_with_http_info variant
|
|
2748
|
+
|
|
2749
|
+
This returns an Array which contains the response data, status code and headers.
|
|
2750
|
+
|
|
2751
|
+
> <Array(Object, Integer, Hash)> google_search_patents_with_http_info(q, opts)
|
|
2752
|
+
|
|
2753
|
+
```ruby
|
|
2754
|
+
begin
|
|
2755
|
+
# Search patents
|
|
2756
|
+
data, status_code, headers = api_instance.google_search_patents_with_http_info(q, opts)
|
|
2757
|
+
p status_code # => 2xx
|
|
2758
|
+
p headers # => { ... }
|
|
2759
|
+
p data # => Object
|
|
2760
|
+
rescue ScrapeBadger::ApiError => e
|
|
2761
|
+
puts "Error when calling GoogleApi->google_search_patents_with_http_info: #{e}"
|
|
2762
|
+
end
|
|
2763
|
+
```
|
|
2764
|
+
|
|
2765
|
+
### Parameters
|
|
2766
|
+
|
|
2767
|
+
| Name | Type | Description | Notes |
|
|
2768
|
+
| ---- | ---- | ----------- | ----- |
|
|
2769
|
+
| **q** | **String** | Search query (Boolean logic supported) | |
|
|
2770
|
+
| **page** | **Integer** | | [optional][default to 0] |
|
|
2771
|
+
| **num** | **Integer** | | [optional][default to 10] |
|
|
2772
|
+
| **sort** | **String** | 'new' or 'old' | [optional] |
|
|
2773
|
+
| **inventor** | **String** | Inventor name(s) | [optional] |
|
|
2774
|
+
| **assignee** | **String** | Assignee / company name(s) | [optional] |
|
|
2775
|
+
| **country** | **String** | Country code (US, EP, WO, …) | [optional] |
|
|
2776
|
+
| **language** | **String** | Patent language: ENGLISH, GERMAN, CHINESE, FRENCH, JAPANESE, KOREAN, SPANISH | [optional] |
|
|
2777
|
+
| **status** | **String** | GRANT or APPLICATION | [optional] |
|
|
2778
|
+
| **patent_type** | **String** | PATENT or DESIGN | [optional] |
|
|
2779
|
+
| **before** | **String** | Before date YYYYMMDD | [optional] |
|
|
2780
|
+
| **after** | **String** | After date YYYYMMDD | [optional] |
|
|
2781
|
+
|
|
2782
|
+
### Return type
|
|
2783
|
+
|
|
2784
|
+
**Object**
|
|
2785
|
+
|
|
2786
|
+
### Authorization
|
|
2787
|
+
|
|
2788
|
+
[ApiKeyAuth](../README.md#ApiKeyAuth)
|
|
2789
|
+
|
|
2790
|
+
### HTTP request headers
|
|
2791
|
+
|
|
2792
|
+
- **Content-Type**: Not defined
|
|
2793
|
+
- **Accept**: application/json
|
|
2794
|
+
|
|
2795
|
+
|
|
2796
|
+
## google_search_products
|
|
2797
|
+
|
|
2798
|
+
> Object google_search_products(q, opts)
|
|
2799
|
+
|
|
2800
|
+
Search products
|
|
2801
|
+
|
|
2802
|
+
### Examples
|
|
2803
|
+
|
|
2804
|
+
```ruby
|
|
2805
|
+
require 'time'
|
|
2806
|
+
require 'scrapebadger'
|
|
2807
|
+
# setup authorization
|
|
2808
|
+
ScrapeBadger.configure do |config|
|
|
2809
|
+
# Configure API key authorization: ApiKeyAuth
|
|
2810
|
+
config.api_key['X-API-Key'] = 'YOUR API KEY'
|
|
2811
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
2812
|
+
# config.api_key_prefix['X-API-Key'] = 'Bearer'
|
|
2813
|
+
end
|
|
2814
|
+
|
|
2815
|
+
api_instance = ScrapeBadger::GoogleApi.new
|
|
2816
|
+
q = 'q_example' # String | Product search query
|
|
2817
|
+
opts = {
|
|
2818
|
+
gl: 'gl_example', # String |
|
|
2819
|
+
min_price: 56, # Integer |
|
|
2820
|
+
max_price: 56, # Integer |
|
|
2821
|
+
sort_by: 'sort_by_example' # String |
|
|
2822
|
+
}
|
|
2823
|
+
|
|
2824
|
+
begin
|
|
2825
|
+
# Search products
|
|
2826
|
+
result = api_instance.google_search_products(q, opts)
|
|
2827
|
+
p result
|
|
2828
|
+
rescue ScrapeBadger::ApiError => e
|
|
2829
|
+
puts "Error when calling GoogleApi->google_search_products: #{e}"
|
|
2830
|
+
end
|
|
2831
|
+
```
|
|
2832
|
+
|
|
2833
|
+
#### Using the google_search_products_with_http_info variant
|
|
2834
|
+
|
|
2835
|
+
This returns an Array which contains the response data, status code and headers.
|
|
2836
|
+
|
|
2837
|
+
> <Array(Object, Integer, Hash)> google_search_products_with_http_info(q, opts)
|
|
2838
|
+
|
|
2839
|
+
```ruby
|
|
2840
|
+
begin
|
|
2841
|
+
# Search products
|
|
2842
|
+
data, status_code, headers = api_instance.google_search_products_with_http_info(q, opts)
|
|
2843
|
+
p status_code # => 2xx
|
|
2844
|
+
p headers # => { ... }
|
|
2845
|
+
p data # => Object
|
|
2846
|
+
rescue ScrapeBadger::ApiError => e
|
|
2847
|
+
puts "Error when calling GoogleApi->google_search_products_with_http_info: #{e}"
|
|
2848
|
+
end
|
|
2849
|
+
```
|
|
2850
|
+
|
|
2851
|
+
### Parameters
|
|
2852
|
+
|
|
2853
|
+
| Name | Type | Description | Notes |
|
|
2854
|
+
| ---- | ---- | ----------- | ----- |
|
|
2855
|
+
| **q** | **String** | Product search query | |
|
|
2856
|
+
| **gl** | **String** | | [optional][default to 'us'] |
|
|
2857
|
+
| **min_price** | **Integer** | | [optional] |
|
|
2858
|
+
| **max_price** | **Integer** | | [optional] |
|
|
2859
|
+
| **sort_by** | **String** | | [optional] |
|
|
2860
|
+
|
|
2861
|
+
### Return type
|
|
2862
|
+
|
|
2863
|
+
**Object**
|
|
2864
|
+
|
|
2865
|
+
### Authorization
|
|
2866
|
+
|
|
2867
|
+
[ApiKeyAuth](../README.md#ApiKeyAuth)
|
|
2868
|
+
|
|
2869
|
+
### HTTP request headers
|
|
2870
|
+
|
|
2871
|
+
- **Content-Type**: Not defined
|
|
2872
|
+
- **Accept**: application/json
|
|
2873
|
+
|
|
2874
|
+
|
|
2875
|
+
## google_search_scholar_author_profiles
|
|
2876
|
+
|
|
2877
|
+
> Object google_search_scholar_author_profiles(mauthors, opts)
|
|
2878
|
+
|
|
2879
|
+
Search Scholar author profiles
|
|
2880
|
+
|
|
2881
|
+
Search Google Scholar for author profiles by name.
|
|
2882
|
+
|
|
2883
|
+
### Examples
|
|
2884
|
+
|
|
2885
|
+
```ruby
|
|
2886
|
+
require 'time'
|
|
2887
|
+
require 'scrapebadger'
|
|
2888
|
+
# setup authorization
|
|
2889
|
+
ScrapeBadger.configure do |config|
|
|
2890
|
+
# Configure API key authorization: ApiKeyAuth
|
|
2891
|
+
config.api_key['X-API-Key'] = 'YOUR API KEY'
|
|
2892
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
2893
|
+
# config.api_key_prefix['X-API-Key'] = 'Bearer'
|
|
2894
|
+
end
|
|
2895
|
+
|
|
2896
|
+
api_instance = ScrapeBadger::GoogleApi.new
|
|
2897
|
+
mauthors = 'mauthors_example' # String | Author name query (e.g. 'Geoffrey Hinton')
|
|
2898
|
+
opts = {
|
|
2899
|
+
hl: 'hl_example', # String | Language code
|
|
2900
|
+
after_author: 'after_author_example', # String | Pagination token (next page)
|
|
2901
|
+
before_author: 'before_author_example' # String | Pagination token (previous page)
|
|
2902
|
+
}
|
|
2903
|
+
|
|
2904
|
+
begin
|
|
2905
|
+
# Search Scholar author profiles
|
|
2906
|
+
result = api_instance.google_search_scholar_author_profiles(mauthors, opts)
|
|
2907
|
+
p result
|
|
2908
|
+
rescue ScrapeBadger::ApiError => e
|
|
2909
|
+
puts "Error when calling GoogleApi->google_search_scholar_author_profiles: #{e}"
|
|
2910
|
+
end
|
|
2911
|
+
```
|
|
2912
|
+
|
|
2913
|
+
#### Using the google_search_scholar_author_profiles_with_http_info variant
|
|
2914
|
+
|
|
2915
|
+
This returns an Array which contains the response data, status code and headers.
|
|
2916
|
+
|
|
2917
|
+
> <Array(Object, Integer, Hash)> google_search_scholar_author_profiles_with_http_info(mauthors, opts)
|
|
2918
|
+
|
|
2919
|
+
```ruby
|
|
2920
|
+
begin
|
|
2921
|
+
# Search Scholar author profiles
|
|
2922
|
+
data, status_code, headers = api_instance.google_search_scholar_author_profiles_with_http_info(mauthors, opts)
|
|
2923
|
+
p status_code # => 2xx
|
|
2924
|
+
p headers # => { ... }
|
|
2925
|
+
p data # => Object
|
|
2926
|
+
rescue ScrapeBadger::ApiError => e
|
|
2927
|
+
puts "Error when calling GoogleApi->google_search_scholar_author_profiles_with_http_info: #{e}"
|
|
2928
|
+
end
|
|
2929
|
+
```
|
|
2930
|
+
|
|
2931
|
+
### Parameters
|
|
2932
|
+
|
|
2933
|
+
| Name | Type | Description | Notes |
|
|
2934
|
+
| ---- | ---- | ----------- | ----- |
|
|
2935
|
+
| **mauthors** | **String** | Author name query (e.g. 'Geoffrey Hinton') | |
|
|
2936
|
+
| **hl** | **String** | Language code | [optional][default to 'en'] |
|
|
2937
|
+
| **after_author** | **String** | Pagination token (next page) | [optional] |
|
|
2938
|
+
| **before_author** | **String** | Pagination token (previous page) | [optional] |
|
|
2939
|
+
|
|
2940
|
+
### Return type
|
|
2941
|
+
|
|
2942
|
+
**Object**
|
|
2943
|
+
|
|
2944
|
+
### Authorization
|
|
2945
|
+
|
|
2946
|
+
[ApiKeyAuth](../README.md#ApiKeyAuth)
|
|
2947
|
+
|
|
2948
|
+
### HTTP request headers
|
|
2949
|
+
|
|
2950
|
+
- **Content-Type**: Not defined
|
|
2951
|
+
- **Accept**: application/json
|
|
2952
|
+
|
|
2953
|
+
|
|
2954
|
+
## google_trending_news
|
|
2955
|
+
|
|
2956
|
+
> Object google_trending_news(opts)
|
|
2957
|
+
|
|
2958
|
+
Trending news
|
|
2959
|
+
|
|
2960
|
+
### Examples
|
|
2961
|
+
|
|
2962
|
+
```ruby
|
|
2963
|
+
require 'time'
|
|
2964
|
+
require 'scrapebadger'
|
|
2965
|
+
# setup authorization
|
|
2966
|
+
ScrapeBadger.configure do |config|
|
|
2967
|
+
# Configure API key authorization: ApiKeyAuth
|
|
2968
|
+
config.api_key['X-API-Key'] = 'YOUR API KEY'
|
|
2969
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
2970
|
+
# config.api_key_prefix['X-API-Key'] = 'Bearer'
|
|
2971
|
+
end
|
|
2972
|
+
|
|
2973
|
+
api_instance = ScrapeBadger::GoogleApi.new
|
|
2974
|
+
opts = {
|
|
2975
|
+
hl: 'hl_example', # String |
|
|
2976
|
+
gl: 'gl_example', # String |
|
|
2977
|
+
max_results: 56 # Integer |
|
|
2978
|
+
}
|
|
2979
|
+
|
|
2980
|
+
begin
|
|
2981
|
+
# Trending news
|
|
2982
|
+
result = api_instance.google_trending_news(opts)
|
|
2983
|
+
p result
|
|
2984
|
+
rescue ScrapeBadger::ApiError => e
|
|
2985
|
+
puts "Error when calling GoogleApi->google_trending_news: #{e}"
|
|
2986
|
+
end
|
|
2987
|
+
```
|
|
2988
|
+
|
|
2989
|
+
#### Using the google_trending_news_with_http_info variant
|
|
2990
|
+
|
|
2991
|
+
This returns an Array which contains the response data, status code and headers.
|
|
2992
|
+
|
|
2993
|
+
> <Array(Object, Integer, Hash)> google_trending_news_with_http_info(opts)
|
|
2994
|
+
|
|
2995
|
+
```ruby
|
|
2996
|
+
begin
|
|
2997
|
+
# Trending news
|
|
2998
|
+
data, status_code, headers = api_instance.google_trending_news_with_http_info(opts)
|
|
2999
|
+
p status_code # => 2xx
|
|
3000
|
+
p headers # => { ... }
|
|
3001
|
+
p data # => Object
|
|
3002
|
+
rescue ScrapeBadger::ApiError => e
|
|
3003
|
+
puts "Error when calling GoogleApi->google_trending_news_with_http_info: #{e}"
|
|
3004
|
+
end
|
|
3005
|
+
```
|
|
3006
|
+
|
|
3007
|
+
### Parameters
|
|
3008
|
+
|
|
3009
|
+
| Name | Type | Description | Notes |
|
|
3010
|
+
| ---- | ---- | ----------- | ----- |
|
|
3011
|
+
| **hl** | **String** | | [optional][default to 'en'] |
|
|
3012
|
+
| **gl** | **String** | | [optional][default to 'US'] |
|
|
3013
|
+
| **max_results** | **Integer** | | [optional][default to 10] |
|
|
3014
|
+
|
|
3015
|
+
### Return type
|
|
3016
|
+
|
|
3017
|
+
**Object**
|
|
3018
|
+
|
|
3019
|
+
### Authorization
|
|
3020
|
+
|
|
3021
|
+
[ApiKeyAuth](../README.md#ApiKeyAuth)
|
|
3022
|
+
|
|
3023
|
+
### HTTP request headers
|
|
3024
|
+
|
|
3025
|
+
- **Content-Type**: Not defined
|
|
3026
|
+
- **Accept**: application/json
|
|
3027
|
+
|
|
3028
|
+
|
|
3029
|
+
## google_trending_searches
|
|
3030
|
+
|
|
3031
|
+
> Object google_trending_searches(opts)
|
|
3032
|
+
|
|
3033
|
+
Trending searches
|
|
3034
|
+
|
|
3035
|
+
### Examples
|
|
3036
|
+
|
|
3037
|
+
```ruby
|
|
3038
|
+
require 'time'
|
|
3039
|
+
require 'scrapebadger'
|
|
3040
|
+
# setup authorization
|
|
3041
|
+
ScrapeBadger.configure do |config|
|
|
3042
|
+
# Configure API key authorization: ApiKeyAuth
|
|
3043
|
+
config.api_key['X-API-Key'] = 'YOUR API KEY'
|
|
3044
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
3045
|
+
# config.api_key_prefix['X-API-Key'] = 'Bearer'
|
|
3046
|
+
end
|
|
3047
|
+
|
|
3048
|
+
api_instance = ScrapeBadger::GoogleApi.new
|
|
3049
|
+
opts = {
|
|
3050
|
+
geo: 'geo_example' # String |
|
|
3051
|
+
}
|
|
3052
|
+
|
|
3053
|
+
begin
|
|
3054
|
+
# Trending searches
|
|
3055
|
+
result = api_instance.google_trending_searches(opts)
|
|
3056
|
+
p result
|
|
3057
|
+
rescue ScrapeBadger::ApiError => e
|
|
3058
|
+
puts "Error when calling GoogleApi->google_trending_searches: #{e}"
|
|
3059
|
+
end
|
|
3060
|
+
```
|
|
3061
|
+
|
|
3062
|
+
#### Using the google_trending_searches_with_http_info variant
|
|
3063
|
+
|
|
3064
|
+
This returns an Array which contains the response data, status code and headers.
|
|
3065
|
+
|
|
3066
|
+
> <Array(Object, Integer, Hash)> google_trending_searches_with_http_info(opts)
|
|
3067
|
+
|
|
3068
|
+
```ruby
|
|
3069
|
+
begin
|
|
3070
|
+
# Trending searches
|
|
3071
|
+
data, status_code, headers = api_instance.google_trending_searches_with_http_info(opts)
|
|
3072
|
+
p status_code # => 2xx
|
|
3073
|
+
p headers # => { ... }
|
|
3074
|
+
p data # => Object
|
|
3075
|
+
rescue ScrapeBadger::ApiError => e
|
|
3076
|
+
puts "Error when calling GoogleApi->google_trending_searches_with_http_info: #{e}"
|
|
3077
|
+
end
|
|
3078
|
+
```
|
|
3079
|
+
|
|
3080
|
+
### Parameters
|
|
3081
|
+
|
|
3082
|
+
| Name | Type | Description | Notes |
|
|
3083
|
+
| ---- | ---- | ----------- | ----- |
|
|
3084
|
+
| **geo** | **String** | | [optional][default to 'US'] |
|
|
3085
|
+
|
|
3086
|
+
### Return type
|
|
3087
|
+
|
|
3088
|
+
**Object**
|
|
3089
|
+
|
|
3090
|
+
### Authorization
|
|
3091
|
+
|
|
3092
|
+
[ApiKeyAuth](../README.md#ApiKeyAuth)
|
|
3093
|
+
|
|
3094
|
+
### HTTP request headers
|
|
3095
|
+
|
|
3096
|
+
- **Content-Type**: Not defined
|
|
3097
|
+
- **Accept**: application/json
|
|
3098
|
+
|
|
3099
|
+
|
|
3100
|
+
## google_trends_topic_autocomplete
|
|
3101
|
+
|
|
3102
|
+
> Object google_trends_topic_autocomplete(q, opts)
|
|
3103
|
+
|
|
3104
|
+
Trends topic autocomplete
|
|
3105
|
+
|
|
3106
|
+
Return categorized Knowledge Graph topic entities (mid, type) for a query.
|
|
3107
|
+
|
|
3108
|
+
### Examples
|
|
3109
|
+
|
|
3110
|
+
```ruby
|
|
3111
|
+
require 'time'
|
|
3112
|
+
require 'scrapebadger'
|
|
3113
|
+
# setup authorization
|
|
3114
|
+
ScrapeBadger.configure do |config|
|
|
3115
|
+
# Configure API key authorization: ApiKeyAuth
|
|
3116
|
+
config.api_key['X-API-Key'] = 'YOUR API KEY'
|
|
3117
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
3118
|
+
# config.api_key_prefix['X-API-Key'] = 'Bearer'
|
|
3119
|
+
end
|
|
3120
|
+
|
|
3121
|
+
api_instance = ScrapeBadger::GoogleApi.new
|
|
3122
|
+
q = 'q_example' # String | Query prefix to resolve into Trends topics
|
|
3123
|
+
opts = {
|
|
3124
|
+
hl: 'hl_example', # String | Language code
|
|
3125
|
+
tz: 'tz_example' # String | Timezone offset in minutes
|
|
3126
|
+
}
|
|
3127
|
+
|
|
3128
|
+
begin
|
|
3129
|
+
# Trends topic autocomplete
|
|
3130
|
+
result = api_instance.google_trends_topic_autocomplete(q, opts)
|
|
3131
|
+
p result
|
|
3132
|
+
rescue ScrapeBadger::ApiError => e
|
|
3133
|
+
puts "Error when calling GoogleApi->google_trends_topic_autocomplete: #{e}"
|
|
3134
|
+
end
|
|
3135
|
+
```
|
|
3136
|
+
|
|
3137
|
+
#### Using the google_trends_topic_autocomplete_with_http_info variant
|
|
3138
|
+
|
|
3139
|
+
This returns an Array which contains the response data, status code and headers.
|
|
3140
|
+
|
|
3141
|
+
> <Array(Object, Integer, Hash)> google_trends_topic_autocomplete_with_http_info(q, opts)
|
|
3142
|
+
|
|
3143
|
+
```ruby
|
|
3144
|
+
begin
|
|
3145
|
+
# Trends topic autocomplete
|
|
3146
|
+
data, status_code, headers = api_instance.google_trends_topic_autocomplete_with_http_info(q, opts)
|
|
3147
|
+
p status_code # => 2xx
|
|
3148
|
+
p headers # => { ... }
|
|
3149
|
+
p data # => Object
|
|
3150
|
+
rescue ScrapeBadger::ApiError => e
|
|
3151
|
+
puts "Error when calling GoogleApi->google_trends_topic_autocomplete_with_http_info: #{e}"
|
|
3152
|
+
end
|
|
3153
|
+
```
|
|
3154
|
+
|
|
3155
|
+
### Parameters
|
|
3156
|
+
|
|
3157
|
+
| Name | Type | Description | Notes |
|
|
3158
|
+
| ---- | ---- | ----------- | ----- |
|
|
3159
|
+
| **q** | **String** | Query prefix to resolve into Trends topics | |
|
|
3160
|
+
| **hl** | **String** | Language code | [optional][default to 'en-US'] |
|
|
3161
|
+
| **tz** | **String** | Timezone offset in minutes | [optional][default to '0'] |
|
|
3162
|
+
|
|
3163
|
+
### Return type
|
|
3164
|
+
|
|
3165
|
+
**Object**
|
|
3166
|
+
|
|
3167
|
+
### Authorization
|
|
3168
|
+
|
|
3169
|
+
[ApiKeyAuth](../README.md#ApiKeyAuth)
|
|
3170
|
+
|
|
3171
|
+
### HTTP request headers
|
|
3172
|
+
|
|
3173
|
+
- **Content-Type**: Not defined
|
|
3174
|
+
- **Accept**: application/json
|
|
3175
|
+
|