All URIs are relative to https://scrapebadger.com
| Method | HTTP request | Description |
|---|---|---|
| gemini_ask_gemini_a_question | GET /v1/gemini/ask | Ask Gemini a question |
| gemini_ask_gemini_a_question_post | POST /v1/gemini/ask | Ask Gemini a question (POST) |
| gemini_gemini_scraper_health_check | GET /v1/gemini/health | Gemini scraper health check |
| gemini_gemini_scraper_health_check_head | HEAD /v1/gemini/health | Gemini scraper health check |
| gemini_measure_a_brand_s_visibility_in_a_gemini_answer | GET /v1/gemini/brand-visibility | Measure a brand's visibility in a Gemini answer |
| gemini_measure_a_brand_s_visibility_in_a_gemini_answer_post | POST /v1/gemini/brand-visibility | Measure a brand's visibility in a Gemini answer (POST) |
Object gemini_ask_gemini_a_question(prompt, opts)
Ask Gemini a question
Send a prompt to Gemini and get the answer plus the web sources it cited.
require 'time'
require 'scrapebadger'
# setup authorization
ScrapeBadger.configure do |config|
# Configure API key authorization: ApiKeyAuth
config.api_key['X-API-Key'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
# config.api_key_prefix['X-API-Key'] = 'Bearer'
end
api_instance = ScrapeBadger::GeminiApi.new
prompt = 'prompt_example' # String | The prompt to send to Gemini (max 4096 characters).
opts = {
country: 'country_example', # String | ISO-3166 alpha-2 egress country, e.g. 'US', 'GB', 'DE'.
web_search: 'web_search_example', # String | auto (let Gemini decide) | force (ask it to browse) | off (answer from memory). `web_search_triggered` in the response always reports what actually happened.
image_url: 'image_url_example' # String | UNAVAILABLE. Signed-out Gemini refuses image questions — it accepts the upload and then answers PERMISSION_DENIED to its own generate RPC, so this returns 422 immediately rather than charging for a render that cannot succeed. Use /v1/chatgpt/ask for image input.
}
begin
# Ask Gemini a question
result = api_instance.gemini_ask_gemini_a_question(prompt, opts)
p result
rescue ScrapeBadger::ApiError => e
puts "Error when calling GeminiApi->gemini_ask_gemini_a_question: #{e}"
endThis returns an Array which contains the response data, status code and headers.
<Array(Object, Integer, Hash)> gemini_ask_gemini_a_question_with_http_info(prompt, opts)
begin
# Ask Gemini a question
data, status_code, headers = api_instance.gemini_ask_gemini_a_question_with_http_info(prompt, opts)
p status_code # => 2xx
p headers # => { ... }
p data # => Object
rescue ScrapeBadger::ApiError => e
puts "Error when calling GeminiApi->gemini_ask_gemini_a_question_with_http_info: #{e}"
end| Name | Type | Description | Notes |
|---|---|---|---|
| prompt | String | The prompt to send to Gemini (max 4096 characters). | |
| country | String | ISO-3166 alpha-2 egress country, e.g. 'US', 'GB', 'DE'. | [optional] |
| web_search | String | auto (let Gemini decide) | force (ask it to browse) |
| image_url | String | UNAVAILABLE. Signed-out Gemini refuses image questions — it accepts the upload and then answers PERMISSION_DENIED to its own generate RPC, so this returns 422 immediately rather than charging for a render that cannot succeed. Use /v1/chatgpt/ask for image input. | [optional] |
Object
- Content-Type: Not defined
- Accept: application/json
Object gemini_ask_gemini_a_question_post
Ask Gemini a question (POST)
POST form of /ask, for prompts too long for a query string.
require 'time'
require 'scrapebadger'
# setup authorization
ScrapeBadger.configure do |config|
# Configure API key authorization: ApiKeyAuth
config.api_key['X-API-Key'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
# config.api_key_prefix['X-API-Key'] = 'Bearer'
end
api_instance = ScrapeBadger::GeminiApi.new
begin
# Ask Gemini a question (POST)
result = api_instance.gemini_ask_gemini_a_question_post
p result
rescue ScrapeBadger::ApiError => e
puts "Error when calling GeminiApi->gemini_ask_gemini_a_question_post: #{e}"
endThis returns an Array which contains the response data, status code and headers.
<Array(Object, Integer, Hash)> gemini_ask_gemini_a_question_post_with_http_info
begin
# Ask Gemini a question (POST)
data, status_code, headers = api_instance.gemini_ask_gemini_a_question_post_with_http_info
p status_code # => 2xx
p headers # => { ... }
p data # => Object
rescue ScrapeBadger::ApiError => e
puts "Error when calling GeminiApi->gemini_ask_gemini_a_question_post_with_http_info: #{e}"
endThis endpoint does not need any parameter.
Object
- Content-Type: Not defined
- Accept: application/json
Object gemini_gemini_scraper_health_check
Gemini scraper health check
Check health of the Gemini scraper service (accepts HEAD).
require 'time'
require 'scrapebadger'
# setup authorization
ScrapeBadger.configure do |config|
# Configure API key authorization: ApiKeyAuth
config.api_key['X-API-Key'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
# config.api_key_prefix['X-API-Key'] = 'Bearer'
end
api_instance = ScrapeBadger::GeminiApi.new
begin
# Gemini scraper health check
result = api_instance.gemini_gemini_scraper_health_check
p result
rescue ScrapeBadger::ApiError => e
puts "Error when calling GeminiApi->gemini_gemini_scraper_health_check: #{e}"
endThis returns an Array which contains the response data, status code and headers.
<Array(Object, Integer, Hash)> gemini_gemini_scraper_health_check_with_http_info
begin
# Gemini scraper health check
data, status_code, headers = api_instance.gemini_gemini_scraper_health_check_with_http_info
p status_code # => 2xx
p headers # => { ... }
p data # => Object
rescue ScrapeBadger::ApiError => e
puts "Error when calling GeminiApi->gemini_gemini_scraper_health_check_with_http_info: #{e}"
endThis endpoint does not need any parameter.
Object
- Content-Type: Not defined
- Accept: application/json
Object gemini_gemini_scraper_health_check_head
Gemini scraper health check
Check health of the Gemini scraper service (accepts HEAD).
require 'time'
require 'scrapebadger'
# setup authorization
ScrapeBadger.configure do |config|
# Configure API key authorization: ApiKeyAuth
config.api_key['X-API-Key'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
# config.api_key_prefix['X-API-Key'] = 'Bearer'
end
api_instance = ScrapeBadger::GeminiApi.new
begin
# Gemini scraper health check
result = api_instance.gemini_gemini_scraper_health_check_head
p result
rescue ScrapeBadger::ApiError => e
puts "Error when calling GeminiApi->gemini_gemini_scraper_health_check_head: #{e}"
endThis returns an Array which contains the response data, status code and headers.
<Array(Object, Integer, Hash)> gemini_gemini_scraper_health_check_head_with_http_info
begin
# Gemini scraper health check
data, status_code, headers = api_instance.gemini_gemini_scraper_health_check_head_with_http_info
p status_code # => 2xx
p headers # => { ... }
p data # => Object
rescue ScrapeBadger::ApiError => e
puts "Error when calling GeminiApi->gemini_gemini_scraper_health_check_head_with_http_info: #{e}"
endThis endpoint does not need any parameter.
Object
- Content-Type: Not defined
- Accept: application/json
Object gemini_measure_a_brand_s_visibility_in_a_gemini_answer(prompt, brand, opts)
Measure a brand's visibility in a Gemini answer
Ask Gemini, then report whether the brand is mentioned, cited and how prominently.
require 'time'
require 'scrapebadger'
# setup authorization
ScrapeBadger.configure do |config|
# Configure API key authorization: ApiKeyAuth
config.api_key['X-API-Key'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
# config.api_key_prefix['X-API-Key'] = 'Bearer'
end
api_instance = ScrapeBadger::GeminiApi.new
prompt = 'prompt_example' # String | The prompt to ask Gemini.
brand = 'brand_example' # String | Brand name to look for in the answer.
opts = {
domain: 'domain_example', # String | Brand domain, for citation matching.
aliases: 'aliases_example', # String | Comma-separated alternative names.
competitors: 'competitors_example', # String | Comma-separated competitor names.
country: 'country_example', # String | ISO-3166 alpha-2 egress country.
web_search: 'web_search_example' # String | auto | force | off
}
begin
# Measure a brand's visibility in a Gemini answer
result = api_instance.gemini_measure_a_brand_s_visibility_in_a_gemini_answer(prompt, brand, opts)
p result
rescue ScrapeBadger::ApiError => e
puts "Error when calling GeminiApi->gemini_measure_a_brand_s_visibility_in_a_gemini_answer: #{e}"
endThis returns an Array which contains the response data, status code and headers.
<Array(Object, Integer, Hash)> gemini_measure_a_brand_s_visibility_in_a_gemini_answer_with_http_info(prompt, brand, opts)
begin
# Measure a brand's visibility in a Gemini answer
data, status_code, headers = api_instance.gemini_measure_a_brand_s_visibility_in_a_gemini_answer_with_http_info(prompt, brand, opts)
p status_code # => 2xx
p headers # => { ... }
p data # => Object
rescue ScrapeBadger::ApiError => e
puts "Error when calling GeminiApi->gemini_measure_a_brand_s_visibility_in_a_gemini_answer_with_http_info: #{e}"
end| Name | Type | Description | Notes |
|---|---|---|---|
| prompt | String | The prompt to ask Gemini. | |
| brand | String | Brand name to look for in the answer. | |
| domain | String | Brand domain, for citation matching. | [optional] |
| aliases | String | Comma-separated alternative names. | [optional] |
| competitors | String | Comma-separated competitor names. | [optional] |
| country | String | ISO-3166 alpha-2 egress country. | [optional] |
| web_search | String | auto | force |
Object
- Content-Type: Not defined
- Accept: application/json
Object gemini_measure_a_brand_s_visibility_in_a_gemini_answer_post
Measure a brand's visibility in a Gemini answer (POST)
POST form, for longer prompts and larger competitor sets.
require 'time'
require 'scrapebadger'
# setup authorization
ScrapeBadger.configure do |config|
# Configure API key authorization: ApiKeyAuth
config.api_key['X-API-Key'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
# config.api_key_prefix['X-API-Key'] = 'Bearer'
end
api_instance = ScrapeBadger::GeminiApi.new
begin
# Measure a brand's visibility in a Gemini answer (POST)
result = api_instance.gemini_measure_a_brand_s_visibility_in_a_gemini_answer_post
p result
rescue ScrapeBadger::ApiError => e
puts "Error when calling GeminiApi->gemini_measure_a_brand_s_visibility_in_a_gemini_answer_post: #{e}"
endThis returns an Array which contains the response data, status code and headers.
<Array(Object, Integer, Hash)> gemini_measure_a_brand_s_visibility_in_a_gemini_answer_post_with_http_info
begin
# Measure a brand's visibility in a Gemini answer (POST)
data, status_code, headers = api_instance.gemini_measure_a_brand_s_visibility_in_a_gemini_answer_post_with_http_info
p status_code # => 2xx
p headers # => { ... }
p data # => Object
rescue ScrapeBadger::ApiError => e
puts "Error when calling GeminiApi->gemini_measure_a_brand_s_visibility_in_a_gemini_answer_post_with_http_info: #{e}"
endThis endpoint does not need any parameter.
Object
- Content-Type: Not defined
- Accept: application/json