All URIs are relative to https://scrapebadger.com
| Method | HTTP request | Description |
|---|---|---|
| ChatgptAskChatgptAQuestion | GET /v1/chatgpt/ask | Ask ChatGPT a question |
| ChatgptAskChatgptAQuestionPost | POST /v1/chatgpt/ask | Ask ChatGPT a question (POST) |
| ChatgptChatgptScraperHealthCheck | GET /v1/chatgpt/health | ChatGPT scraper health check |
| ChatgptChatgptScraperHealthCheckHead | HEAD /v1/chatgpt/health | ChatGPT scraper health check |
| ChatgptListChatgptModels | GET /v1/chatgpt/models | List ChatGPT models |
| ChatgptMeasureABrandSVisibilityInAChatgptAnswer | GET /v1/chatgpt/brand-visibility | Measure a brand's visibility in a ChatGPT answer |
| ChatgptMeasureABrandSVisibilityInAChatgptAnswerPost | POST /v1/chatgpt/brand-visibility | Measure a brand's visibility in a ChatGPT answer (POST) |
Object ChatgptAskChatgptAQuestion (string prompt, string country = null, string webSearch = null, string imageUrl = null)
Ask ChatGPT a question
Send a prompt to ChatGPT and get the answer plus the web sources it cited.
using System.Collections.Generic;
using System.Diagnostics;
using System.Net.Http;
using ScrapeBadger.Api;
using ScrapeBadger.Client;
using ScrapeBadger.Model;
namespace Example
{
public class ChatgptAskChatgptAQuestionExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://scrapebadger.com";
// Configure API key authorization: ApiKeyAuth
config.AddApiKey("X-API-Key", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// config.AddApiKeyPrefix("X-API-Key", "Bearer");
// create instances of HttpClient, HttpClientHandler to be reused later with different Api classes
HttpClient httpClient = new HttpClient();
HttpClientHandler httpClientHandler = new HttpClientHandler();
var apiInstance = new ChatGPTApi(httpClient, config, httpClientHandler);
var prompt = "prompt_example"; // string | The prompt to send to ChatGPT (max 4096 characters).
var country = "country_example"; // string | ISO-3166 alpha-2 egress country, e.g. 'US', 'GB', 'DE'. (optional)
var webSearch = "\"auto\""; // string | auto (let ChatGPT decide) | force (ask it to browse) | off (answer from memory). `web_search_triggered` in the response always reports what actually happened. (optional) (default to "auto")
var imageUrl = "imageUrl_example"; // string | Public http(s) URL of an image to attach to the prompt. ChatGPT reads it and answers about it. POST also accepts `image_base64`. Exactly one of the two. (optional)
try
{
// Ask ChatGPT a question
Object result = apiInstance.ChatgptAskChatgptAQuestion(prompt, country, webSearch, imageUrl);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling ChatGPTApi.ChatgptAskChatgptAQuestion: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}This returns an ApiResponse object which contains the response data, status code and headers.
try
{
// Ask ChatGPT a question
ApiResponse<Object> response = apiInstance.ChatgptAskChatgptAQuestionWithHttpInfo(prompt, country, webSearch, imageUrl);
Debug.Write("Status Code: " + response.StatusCode);
Debug.Write("Response Headers: " + response.Headers);
Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
Debug.Print("Exception when calling ChatGPTApi.ChatgptAskChatgptAQuestionWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}| Name | Type | Description | Notes |
|---|---|---|---|
| prompt | string | The prompt to send to ChatGPT (max 4096 characters). | |
| country | string | ISO-3166 alpha-2 egress country, e.g. 'US', 'GB', 'DE'. | [optional] |
| webSearch | string | auto (let ChatGPT decide) | force (ask it to browse) |
| imageUrl | string | Public http(s) URL of an image to attach to the prompt. ChatGPT reads it and answers about it. POST also accepts `image_base64`. Exactly one of the two. | [optional] |
Object
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Successful Response | - |
| 422 | Validation Error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Object ChatgptAskChatgptAQuestionPost ()
Ask ChatGPT a question (POST)
POST form of /ask, for prompts too long for a query string.
using System.Collections.Generic;
using System.Diagnostics;
using System.Net.Http;
using ScrapeBadger.Api;
using ScrapeBadger.Client;
using ScrapeBadger.Model;
namespace Example
{
public class ChatgptAskChatgptAQuestionPostExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://scrapebadger.com";
// Configure API key authorization: ApiKeyAuth
config.AddApiKey("X-API-Key", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// config.AddApiKeyPrefix("X-API-Key", "Bearer");
// create instances of HttpClient, HttpClientHandler to be reused later with different Api classes
HttpClient httpClient = new HttpClient();
HttpClientHandler httpClientHandler = new HttpClientHandler();
var apiInstance = new ChatGPTApi(httpClient, config, httpClientHandler);
try
{
// Ask ChatGPT a question (POST)
Object result = apiInstance.ChatgptAskChatgptAQuestionPost();
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling ChatGPTApi.ChatgptAskChatgptAQuestionPost: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}This returns an ApiResponse object which contains the response data, status code and headers.
try
{
// Ask ChatGPT a question (POST)
ApiResponse<Object> response = apiInstance.ChatgptAskChatgptAQuestionPostWithHttpInfo();
Debug.Write("Status Code: " + response.StatusCode);
Debug.Write("Response Headers: " + response.Headers);
Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
Debug.Print("Exception when calling ChatGPTApi.ChatgptAskChatgptAQuestionPostWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}This endpoint does not need any parameter.
Object
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Successful Response | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Object ChatgptChatgptScraperHealthCheck ()
ChatGPT scraper health check
Check health of the ChatGPT scraper service (accepts HEAD).
using System.Collections.Generic;
using System.Diagnostics;
using System.Net.Http;
using ScrapeBadger.Api;
using ScrapeBadger.Client;
using ScrapeBadger.Model;
namespace Example
{
public class ChatgptChatgptScraperHealthCheckExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://scrapebadger.com";
// Configure API key authorization: ApiKeyAuth
config.AddApiKey("X-API-Key", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// config.AddApiKeyPrefix("X-API-Key", "Bearer");
// create instances of HttpClient, HttpClientHandler to be reused later with different Api classes
HttpClient httpClient = new HttpClient();
HttpClientHandler httpClientHandler = new HttpClientHandler();
var apiInstance = new ChatGPTApi(httpClient, config, httpClientHandler);
try
{
// ChatGPT scraper health check
Object result = apiInstance.ChatgptChatgptScraperHealthCheck();
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling ChatGPTApi.ChatgptChatgptScraperHealthCheck: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}This returns an ApiResponse object which contains the response data, status code and headers.
try
{
// ChatGPT scraper health check
ApiResponse<Object> response = apiInstance.ChatgptChatgptScraperHealthCheckWithHttpInfo();
Debug.Write("Status Code: " + response.StatusCode);
Debug.Write("Response Headers: " + response.Headers);
Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
Debug.Print("Exception when calling ChatGPTApi.ChatgptChatgptScraperHealthCheckWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}This endpoint does not need any parameter.
Object
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Successful Response | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Object ChatgptChatgptScraperHealthCheckHead ()
ChatGPT scraper health check
Check health of the ChatGPT scraper service (accepts HEAD).
using System.Collections.Generic;
using System.Diagnostics;
using System.Net.Http;
using ScrapeBadger.Api;
using ScrapeBadger.Client;
using ScrapeBadger.Model;
namespace Example
{
public class ChatgptChatgptScraperHealthCheckHeadExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://scrapebadger.com";
// Configure API key authorization: ApiKeyAuth
config.AddApiKey("X-API-Key", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// config.AddApiKeyPrefix("X-API-Key", "Bearer");
// create instances of HttpClient, HttpClientHandler to be reused later with different Api classes
HttpClient httpClient = new HttpClient();
HttpClientHandler httpClientHandler = new HttpClientHandler();
var apiInstance = new ChatGPTApi(httpClient, config, httpClientHandler);
try
{
// ChatGPT scraper health check
Object result = apiInstance.ChatgptChatgptScraperHealthCheckHead();
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling ChatGPTApi.ChatgptChatgptScraperHealthCheckHead: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}This returns an ApiResponse object which contains the response data, status code and headers.
try
{
// ChatGPT scraper health check
ApiResponse<Object> response = apiInstance.ChatgptChatgptScraperHealthCheckHeadWithHttpInfo();
Debug.Write("Status Code: " + response.StatusCode);
Debug.Write("Response Headers: " + response.Headers);
Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
Debug.Print("Exception when calling ChatGPTApi.ChatgptChatgptScraperHealthCheckHeadWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}This endpoint does not need any parameter.
Object
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Successful Response | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Object ChatgptListChatgptModels (string country = null)
List ChatGPT models
Models chatgpt.com currently serves to an anonymous visitor.
using System.Collections.Generic;
using System.Diagnostics;
using System.Net.Http;
using ScrapeBadger.Api;
using ScrapeBadger.Client;
using ScrapeBadger.Model;
namespace Example
{
public class ChatgptListChatgptModelsExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://scrapebadger.com";
// Configure API key authorization: ApiKeyAuth
config.AddApiKey("X-API-Key", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// config.AddApiKeyPrefix("X-API-Key", "Bearer");
// create instances of HttpClient, HttpClientHandler to be reused later with different Api classes
HttpClient httpClient = new HttpClient();
HttpClientHandler httpClientHandler = new HttpClientHandler();
var apiInstance = new ChatGPTApi(httpClient, config, httpClientHandler);
var country = "country_example"; // string | ISO-3166 alpha-2 egress country. (optional)
try
{
// List ChatGPT models
Object result = apiInstance.ChatgptListChatgptModels(country);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling ChatGPTApi.ChatgptListChatgptModels: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}This returns an ApiResponse object which contains the response data, status code and headers.
try
{
// List ChatGPT models
ApiResponse<Object> response = apiInstance.ChatgptListChatgptModelsWithHttpInfo(country);
Debug.Write("Status Code: " + response.StatusCode);
Debug.Write("Response Headers: " + response.Headers);
Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
Debug.Print("Exception when calling ChatGPTApi.ChatgptListChatgptModelsWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}| Name | Type | Description | Notes |
|---|---|---|---|
| country | string | ISO-3166 alpha-2 egress country. | [optional] |
Object
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Successful Response | - |
| 422 | Validation Error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Object ChatgptMeasureABrandSVisibilityInAChatgptAnswer (string prompt, string brand, string domain = null, string aliases = null, string competitors = null, string country = null, string webSearch = null)
Measure a brand's visibility in a ChatGPT answer
Ask ChatGPT, then report whether the brand is mentioned, cited and how prominently.
using System.Collections.Generic;
using System.Diagnostics;
using System.Net.Http;
using ScrapeBadger.Api;
using ScrapeBadger.Client;
using ScrapeBadger.Model;
namespace Example
{
public class ChatgptMeasureABrandSVisibilityInAChatgptAnswerExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://scrapebadger.com";
// Configure API key authorization: ApiKeyAuth
config.AddApiKey("X-API-Key", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// config.AddApiKeyPrefix("X-API-Key", "Bearer");
// create instances of HttpClient, HttpClientHandler to be reused later with different Api classes
HttpClient httpClient = new HttpClient();
HttpClientHandler httpClientHandler = new HttpClientHandler();
var apiInstance = new ChatGPTApi(httpClient, config, httpClientHandler);
var prompt = "prompt_example"; // string | The prompt to ask ChatGPT.
var brand = "brand_example"; // string | Brand name to look for in the answer.
var domain = "domain_example"; // string | Brand domain, for citation matching. (optional)
var aliases = "aliases_example"; // string | Comma-separated alternative names. (optional)
var competitors = "competitors_example"; // string | Comma-separated competitor names. (optional)
var country = "country_example"; // string | ISO-3166 alpha-2 egress country. (optional)
var webSearch = "\"force\""; // string | auto | force | off (optional) (default to "force")
try
{
// Measure a brand's visibility in a ChatGPT answer
Object result = apiInstance.ChatgptMeasureABrandSVisibilityInAChatgptAnswer(prompt, brand, domain, aliases, competitors, country, webSearch);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling ChatGPTApi.ChatgptMeasureABrandSVisibilityInAChatgptAnswer: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}This returns an ApiResponse object which contains the response data, status code and headers.
try
{
// Measure a brand's visibility in a ChatGPT answer
ApiResponse<Object> response = apiInstance.ChatgptMeasureABrandSVisibilityInAChatgptAnswerWithHttpInfo(prompt, brand, domain, aliases, competitors, country, webSearch);
Debug.Write("Status Code: " + response.StatusCode);
Debug.Write("Response Headers: " + response.Headers);
Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
Debug.Print("Exception when calling ChatGPTApi.ChatgptMeasureABrandSVisibilityInAChatgptAnswerWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}| Name | Type | Description | Notes |
|---|---|---|---|
| prompt | string | The prompt to ask ChatGPT. | |
| 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] |
| webSearch | string | auto | force |
Object
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Successful Response | - |
| 422 | Validation Error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Object ChatgptMeasureABrandSVisibilityInAChatgptAnswerPost ()
Measure a brand's visibility in a ChatGPT answer (POST)
POST form, for longer prompts and larger competitor sets.
using System.Collections.Generic;
using System.Diagnostics;
using System.Net.Http;
using ScrapeBadger.Api;
using ScrapeBadger.Client;
using ScrapeBadger.Model;
namespace Example
{
public class ChatgptMeasureABrandSVisibilityInAChatgptAnswerPostExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://scrapebadger.com";
// Configure API key authorization: ApiKeyAuth
config.AddApiKey("X-API-Key", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// config.AddApiKeyPrefix("X-API-Key", "Bearer");
// create instances of HttpClient, HttpClientHandler to be reused later with different Api classes
HttpClient httpClient = new HttpClient();
HttpClientHandler httpClientHandler = new HttpClientHandler();
var apiInstance = new ChatGPTApi(httpClient, config, httpClientHandler);
try
{
// Measure a brand's visibility in a ChatGPT answer (POST)
Object result = apiInstance.ChatgptMeasureABrandSVisibilityInAChatgptAnswerPost();
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling ChatGPTApi.ChatgptMeasureABrandSVisibilityInAChatgptAnswerPost: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}This returns an ApiResponse object which contains the response data, status code and headers.
try
{
// Measure a brand's visibility in a ChatGPT answer (POST)
ApiResponse<Object> response = apiInstance.ChatgptMeasureABrandSVisibilityInAChatgptAnswerPostWithHttpInfo();
Debug.Write("Status Code: " + response.StatusCode);
Debug.Write("Response Headers: " + response.Headers);
Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
Debug.Print("Exception when calling ChatGPTApi.ChatgptMeasureABrandSVisibilityInAChatgptAnswerPostWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}This endpoint does not need any parameter.
Object
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Successful Response | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]