rust-trend
Overview
Unofficial Rust API for interacting with Google Trend
Documentation
Example
First, add the dependency to your project:
Then build a client and send the reqwest you want :
use ;
let country = US;
let keywords = new;
let client = new.build;
// Then select the data you want. The interest of your keywords filtered by region for example:
let region_interest = new.get;
println!;
// 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
// ]
// }
// ]
// }
//}
More example
- Simple
- Region Interest
- Search Interest
- Related Queries
- Related Topics
- Use filters
- Get response for specific keyword
Roadmap
- Write documentation & Doc Test [x] Release on crates.io
- Add examples
- Add "TOP" and "RISING" filter
- Add REGION and CITY filter
- Add METRO filter for country like USA or France
- Write more tests
- Make async feature (currently using Reqwest::blocking)
License
Licensed under either of
- Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.
Contribution
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.