Crates.io | rtrend |
lib.rs | rtrend |
version | 0.1.7 |
source | src |
created_at | 2021-07-19 10:15:34.523844 |
updated_at | 2023-06-20 12:51:26.764819 |
description | Unofficial API for interacting with Google Trend |
homepage | https://github.com/shadawck/rust-trend |
repository | https://github.com/shadawck/rust-trend |
max_upload_size | |
id | 424677 |
size | 363,776 |
Unofficial Rust API for interacting with Google Trend
First, add the dependency to your project:
cargo add rtrend
Then build a client and send the reqwest you want :
use rtrend::{Keywords, Country, Client, RegionInterest};
let country = Country::US;
let keywords = Keywords::new(vec!["Instagram","Facebook"]);
let client = Client::new(keywords, country).build();
// Then select the data you want. The interest of your keywords filtered by region for example:
let region_interest = RegionInterest::new(client).get();
println!("{}", region_interest);
// Result :
//{
// "default": {
// "geoMapData": [
// {
// "formattedValue": [
// "100"
// ],
// "geoCode": "US-CA",
// "geoName": "California",
// "hasData": [
// true
// ],
// "maxValueIndex": 0,
// "value": [
// 100
// ]
// },
//
// ...
//
// {
// "formattedValue": [
// "46"
// ],
// "geoCode": "US-SD",
// "geoName": "South Dakota",
// "hasData": [
// true
// ],
// "maxValueIndex": 0,
// "value": [
// 46
// ]
// }
// ]
// }
//}
Licensed under either of
at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.