#search #api-client #api #api-bindings #wordstat #trends #yandex-direct

wordstat-rs

A library that allows easy interactions with Yandex Direct API for getting statistics about keyword searches from Wordstat service

1 unstable release

0.1.0 Jan 13, 2024

#626 in #search

MIT license

39KB
653 lines

wordstat-rs

Rust library for interacting with the Yandex Wordstat API

Usage:

Create the client:

let client = Client::new("token", "https://api-sandbox.direct.yandex.ru/v4/json/");

Get the list of available regions:

let regions = get_regions(&client).await.unwrap();

Start the report generation:

let request = ReportRequest::new()
    .add_phrase("rust")
    .add_geo(54); // Geo is optional
let report_id = create_report(&client, &request).await.unwrap();

Getting the list of all available reports and their statuses:

let report_list = get_report_list(&client).await.unwrap();

Get the generated report:

let report = get_report(&client, report_id).await.unwrap();

Delete the reports (you can have more than 5 reports on your account simultaneously):

delete_report(&client, report_id).await.unwrap();

Stuff to do:

  • Creating reports
  • Deleting reports
  • Getting reports
  • Getting reports list
  • Getting regions list
  • Cover the methods with tests
  • Documentation

Dependencies

~4–16MB
~214K SLoC