Skip to main content

data_for_seo/api/keywords_data/bing/
mod.rs

1use crate::DataForSeoApiResponse;
2use crate::DataForSeoClient;
3use crate::api::keywords_data::{KeywordsDataApi, KeywordsDataApiLocation};
4use crate::entity::KeywordsDataApiLanguage;
5
6mod audience_estimation;
7mod keyword_performance;
8mod keyword_suggestions_for_url;
9mod keywords_for_keywords;
10mod keywords_for_site;
11mod search_volume;
12mod search_volume_history;
13
14pub use audience_estimation::*;
15pub use keyword_performance::*;
16pub use keyword_suggestions_for_url::*;
17pub use keywords_for_keywords::*;
18pub use keywords_for_site::*;
19pub use search_volume::*;
20pub use search_volume_history::*;
21
22impl KeywordsDataApi<'_> {
23    /// Bing Ads keyword research endpoints.
24    /// See <https://docs.dataforseo.com/v3/keywords_data/bing/overview/>.
25    pub fn bing(&self) -> KeywordsDataApiBing<'_> {
26        KeywordsDataApiBing {
27            client: self.client,
28        }
29    }
30}
31
32/// Bing Ads keyword research endpoints.
33pub struct KeywordsDataApiBing<'a> {
34    pub(crate) client: &'a DataForSeoClient,
35}
36
37impl KeywordsDataApiBing<'_> {
38    /// Locations supported by the Bing endpoints.
39    /// See <https://docs.dataforseo.com/v3/keywords_data/bing/locations/>.
40    pub async fn locations(&self) -> DataForSeoApiResponse<KeywordsDataApiLocation> {
41        self.client
42            .http_get("/v3/keywords_data/bing/locations")
43            .await
44    }
45    /// Languages supported by the Bing endpoints.
46    /// See <https://docs.dataforseo.com/v3/keywords_data/bing/languages/>.
47    pub async fn languages(&self) -> DataForSeoApiResponse<KeywordsDataApiLanguage> {
48        self.client
49            .http_get("/v3/keywords_data/bing/languages")
50            .await
51    }
52}