google-scholar-query

Crates.iogoogle-scholar-query
lib.rsgoogle-scholar-query
version0.1.6
created_at2025-02-20 17:41:42.640573+00
updated_at2025-02-25 13:36:28.236804+00
descriptionThe unofficial Google Scholar API
homepagehttps://github.com/Julien-cpsn/google-scholar-query
repositoryhttps://github.com/Julien-cpsn/google-scholar-query
max_upload_size
id1562881
size100,859
Julien C. (Julien-cpsn)

documentation

README

google-scholar-query

The unofficial Google Scholar API

fn query_google_scholar() {
    let scholar_query = scholar::ScholarArgs{
        query: String::from("machine-learning"),
        cite_id: None,
        from_year: Some(2018),
        to_year: Some(2021),
        sort_by: Some(0),
        cluster_id: None,
        lang: Some(String::from("en")),
        lang_limit: None,
        limit: Some(3),
        offset: Some(0),
        adult_filtering: None,
        include_similar_results: None,
        include_citations: None,
    };
    
    let client = scholar::init_client();
    match client.scrape_scholar(Box::from(scholar_query)).await {
        Ok(result) => assert_eq ! (result.len(), 3),
        Err(_e) => assert_eq ! (true, false),
    };
}
Commit count: 25

cargo fmt