pub struct DataForSeoClient { /* private fields */ }Expand description
Entry point for all DataForSEO API calls.
Holds a shared reqwest::Client (connection pool) and the Basic-auth
token. Cloning is cheap and clones share the connection pool.
Implementations§
Source§impl DataForSeoClient
impl DataForSeoClient
Sourcepub fn ai_optimization(&self) -> AiOptimizationApi<'_>
pub fn ai_optimization(&self) -> AiOptimizationApi<'_>
Returns the AI Optimization API builder.
Source§impl DataForSeoClient
impl DataForSeoClient
Sourcepub fn app_data(&self) -> AppDataApi<'_>
pub fn app_data(&self) -> AppDataApi<'_>
Returns the App Data API. See https://docs.dataforseo.com/v3/app_data/.
Source§impl DataForSeoClient
impl DataForSeoClient
Sourcepub fn appendix(&self) -> AppendixApi<'_>
pub fn appendix(&self) -> AppendixApi<'_>
Appendix API (account balance, rate limits, pricing).
Source§impl DataForSeoClient
impl DataForSeoClient
Sourcepub fn backlinks(&self) -> BacklinksApi<'_>
pub fn backlinks(&self) -> BacklinksApi<'_>
Returns the Backlinks API client.
Source§impl DataForSeoClient
impl DataForSeoClient
Sourcepub fn business_data(&self) -> BusinessDataApi<'_>
pub fn business_data(&self) -> BusinessDataApi<'_>
Access the Business Data API (Google, Trustpilot, Tripadvisor, …). See https://docs.dataforseo.com/v3/business_data/overview/.
Source§impl DataForSeoClient
impl DataForSeoClient
Sourcepub fn content_analysis(&self) -> ContentAnalysisApi<'_>
pub fn content_analysis(&self) -> ContentAnalysisApi<'_>
Returns the Content Analysis API endpoints.
Source§impl DataForSeoClient
impl DataForSeoClient
Sourcepub fn content_generation(&self) -> ContentGenerationApi<'_>
pub fn content_generation(&self) -> ContentGenerationApi<'_>
Returns the Content Generation API endpoints.
Source§impl DataForSeoClient
impl DataForSeoClient
Sourcepub fn dataforseo_labs(&self) -> DataForSeoLabsApi<'_>
pub fn dataforseo_labs(&self) -> DataForSeoLabsApi<'_>
Returns the DataForSEO Labs API. See https://docs.dataforseo.com/v3/dataforseo_labs/overview/.
Source§impl DataForSeoClient
impl DataForSeoClient
Sourcepub fn domain_analytics(&self) -> DomainAnalyticsApi<'_>
pub fn domain_analytics(&self) -> DomainAnalyticsApi<'_>
Returns the Domain Analytics API builder.
Source§impl DataForSeoClient
impl DataForSeoClient
Sourcepub fn keywords_data(&self) -> KeywordsDataApi<'_>
pub fn keywords_data(&self) -> KeywordsDataApi<'_>
Keywords Data API (Google Ads, Bing, Google Trends, DataForSEO Trends, Clickstream). See https://docs.dataforseo.com/v3/keywords_data/overview/.
Source§impl DataForSeoClient
impl DataForSeoClient
Sourcepub fn merchant(&self) -> MerchantApi<'_>
pub fn merchant(&self) -> MerchantApi<'_>
Access the Merchant API (Amazon and Google Shopping). See https://docs.dataforseo.com/v3/merchant/.
Source§impl DataForSeoClient
impl DataForSeoClient
Sourcepub fn serp(&self) -> SerpApi<'_>
pub fn serp(&self) -> SerpApi<'_>
Returns the SERP API domain entry point. See https://docs.dataforseo.com/v3/serp/overview/.
Source§impl DataForSeoClient
impl DataForSeoClient
Sourcepub fn new<L: Into<String>, P: Into<String>>(
login: L,
password: P,
) -> DataForSeoClient
pub fn new<L: Into<String>, P: Into<String>>( login: L, password: P, ) -> DataForSeoClient
Creates a client authenticated with the given API login and password.
Sourcepub fn from_env() -> Result<DataForSeoClient, DataForSeoError>
pub fn from_env() -> Result<DataForSeoClient, DataForSeoError>
Creates a client from the DATAFORSEO_LOGIN and DATAFORSEO_PASSWORD
environment variables.
Returns an error naming the missing variable when either is not set.
Sourcepub fn with_base_url<T: Into<String>>(self, base_url: T) -> Self
pub fn with_base_url<T: Into<String>>(self, base_url: T) -> Self
Overrides the base URL (e.g. SANDBOX_BASE_URL).
Sourcepub fn with_http_client(self, http: Client) -> Self
pub fn with_http_client(self, http: Client) -> Self
Replaces the underlying HTTP client (to customize timeouts, proxies, …).