25

In the My Library of Google Scholar, is there a way to export all of the citations, whether to BibTex or something similar?

7 Answers 7

5

Here is a little python script that emulates the copy paste of bib entries of all references in My Library and appends them to a file.

It utilizes Selenium and chromedriver to open and navigate the browser. Initial run requires manual login. Then it goes to My Library, selects all, clicks on bibtex export, copies and appends the bibtex entries to a file, and goes to the next page until it crashes.

This way, I was able to automatically export all bibtex entries of the starred articles in my account on Google Scholar. Note that the code is far from being clean, many things are hard coded. But it got the job done for me when I needed a solution rather quickly, but there is huge room for improvement!

1
  • 1
    This is very cool. Thanks! One thing I had to do was hardcode the path to chromedriver even though I moved it to the script's directory. driver = webdriver.Chrome(executable_path='/Users/adamg/tutorials/GoogleScholar/chromedriver')
    – Adam_G
    Commented Jun 23, 2019 at 16:57
14

As of August 31, 2016, this functionality has been added! See this blog post: https://googlescholar.blogspot.com/2016/08/organizing-your-scholar-library.html

1
  • 3
    The problem with this approach (My Library) is that it only exports a single screen-full at a time. It's possible to Export All of your "My Citations" but that is different than "My Library" Commented Aug 15, 2017 at 14:43
9

I can only add that you can download citations one by one:

  • in Settings > Bibliography Manager, check Show link to import citation into BibTex.

With that, you can probably write a script (maybe using Scholar.py) that downloads all your citations. An example URL is:

http://scholar.google.com/scholar.bib?scila=u_35RYKgDlwC&output=citation&hl=en&ct=citation&cd=1
6

You can use the scholar R package. I copied this answer from this tweet, in R

install.packages("scholar")
library(scholar)

ID <- "Put your id from pic below in here"
pubs <- get_publications(ID)
write.csv(pubs, file="citations.csv")

There may be another package which allows you to write out bibtex.

enter image description here

1
  • In Ubuntu you need additional packages for the R scholar package to be correctly installed: sudo apt-get install --assume-yes libudunits2-dev libcurl4-openssl-dev Commented Dec 5, 2018 at 10:19
5

As far as I know Google does not offer a user interface to do that. Actually they still do not offer an API to interact with your results.

However, if you can handle code a little or you know someone who does, I found this.

As they say, you: Can extract publication title, main online URL, number of citations, number of online versions, link to Google Scholar's main cluster for the work, and Google Scholar's cluster of all works referencing the publication.

Since you have this information you can write another script that puts what you need into BibTex.

0
5

I couldn't find a way to export all citations from My Library (it seems to only work one page at a time), but it's possible to save all citations from the edit mode of My Citations:

  • Log in to https://scholar.google.ca
  • Click enter image description hereMy Citations
  • Click the leftmost checkbox on the bar at the top of the list of citations: Google Scholar citations menu bar
  • Click Export > BibTeX and choose Export all my articles then Export Google Scholar export pop-up window

You should get a browser window with the BibTeX file of your citations that you can "Save as..." or copy/paste to a text editor and save.

4
  • That's helpful. Also, you can set the number of articles displayed per page to 20, so you can at least get a BibTeX for 20 articles at a time.
    – Adam_G
    Commented Aug 15, 2017 at 18:58
  • 2
    @Adam_G The number of items per page can be set higher than 20 by appending &pagesize= to the URL. For instance to set it up to 100: https://scholar.google.com/citations?user=<Your ID here>&hl=en&pagesize=100.
    – plannapus
    Commented Aug 17, 2017 at 9:11
  • @plannapus - Very interesting! But it seems to only work for My Citations, and not My Library.
    – Adam_G
    Commented Aug 17, 2017 at 13:08
  • @Adam_G indeed, as I never use that page I never noticed. In theory, to control the number of results on that kind of page one needs to append &num= instead of &pagesize= but it seems to be still an hard-limit set at 20. I'll look deeper just in case but it seems you're right.
    – plannapus
    Commented Aug 17, 2017 at 13:15
1

Disclosure: I work at SerpApi.


You can use google-search-results package to extract data from Google Scholar citations. Check a demo at Repl.it.

from serpapi.google_search_results import GoogleSearchResults
from more_itertools import first_true

client = GoogleSearchResults({
    "engine": "google_scholar",
    "q": "coffee",
})

data = client.get_dict()

print("Links")

for result in data['organic_results']:
    client = GoogleSearchResults({
        "api_key":
        "demo",
        "engine":
        "google_scholar_cite",
        "q":
        result["result_id"],
    })

    data = client.get_dict()

    link = first_true(data['links'], lambda link: link['name'] == 'BibTex',
                      None)

    print(f"""
    Name: {link['name']}
    Link: {link['link']}""")

Output

Links

    Name: BibTeX
    Link: https://scholar.googleusercontent.com/scholar.bib?q=info:re9ssrU-exUJ:scholar.google.com/&output=citation&scisdr=CgUgMydbGAA:AAGBfm0AAAAAXoSezaQALOlFVjCLJgcTVUPBVLhAC4P_&scisig=AAGBfm0AAAAAXoSezSdi7qdJVVpppb0Qjy9URFYAVvDb&scisf=4&ct=citation&cd=-1&hl=en

    Name: BibTeX
    Link: https://scholar.googleusercontent.com/scholar.bib?q=info:9WouRiFbIK4J:scholar.google.com/&output=citation&scisdr=CgXJdXzTGAA:AAGBfm0AAAAAXoSe_tPBybZ8u8VTSEOl_bwnW6MesS32&scisig=AAGBfm0AAAAAXoSe_q2vGhtlDC1qD-MUihajS43pIwqJ&scisf=4&ct=citation&cd=-1&hl=en

    Name: BibTeX
    Link: https://scholar.googleusercontent.com/scholar.bib?q=info:xY3q9qnkN54J:scholar.google.com/&output=citation&scisdr=CgXhmeGHGAA:AAGBfm0AAAAAXoSe_zIPHELNrzNBJx7LANjv2IOpiu0c&scisig=AAGBfm0AAAAAXoSe_98jnDbvzh1pjf3N-yQyeXjJ2Ymt&scisf=4&ct=citation&cd=-1&hl=en

    Name: BibTeX
    Link: https://scholar.googleusercontent.com/scholar.bib?q=info:fGeQlvu-2_IJ:scholar.google.com/&output=citation&scisdr=CgXtSK1OGAA:AAGBfm0AAAAAXoSfAWesoBxkblC33sy6Mwvap1ZhRO4s&scisig=AAGBfm0AAAAAXoSfAZCH98TGUSWB69hUOtQPECUPTBby&scisf=4&ct=citation&cd=-1&hl=en

    Name: BibTeX
    Link: https://scholar.googleusercontent.com/scholar.bib?q=info:Zu7aKNjvAUwJ:scholar.google.com/&output=citation&scisdr=CgXIa_eGGAA:AAGBfm0AAAAAXoSfArPmBDyaM3SUXrjLBzYMWDMRXpUv&scisig=AAGBfm0AAAAAXoSfAsZ2ayvj7ugoRdygul9ot981uovl&scisf=4&ct=citation&cd=-1&hl=en

    Name: BibTeX
    Link: https://scholar.googleusercontent.com/scholar.bib?q=info:pIjQPO7__AYJ:scholar.google.com/&output=citation&scisdr=CgVPosX6GAA:AAGBfm0AAAAAXoSfAzmhcfCJHuCELZ7mYASR3OXkOtGR&scisig=AAGBfm0AAAAAXoSfA1gD689aqgRLYIrefzXFAp-b3ohf&scisf=4&ct=citation&cd=-1&hl=en

    Name: BibTeX
    Link: https://scholar.googleusercontent.com/scholar.bib?q=info:UwtLySK5iawJ:scholar.google.com/&output=citation&scisdr=CgXEOW-BGAA:AAGBfm0AAAAAXoSfBUlA7r5lA5aL2yNPviXWq9UMobDz&scisig=AAGBfm0AAAAAXoSfBU6nawZyrVvngRnT_fg9jVsm9aZi&scisf=4&ct=citation&cd=-1&hl=en

    Name: BibTeX
    Link: https://scholar.googleusercontent.com/scholar.bib?q=info:fSVlrXX7dIUJ:scholar.google.com/&output=citation&scisdr=CgVO0I1QGAA:AAGBfm0AAAAAXoSfDLa1ZyBpvtn9R7iHWhtZPp1_5Rdq&scisig=AAGBfm0AAAAAXoSfDEISqsJV_AFPyBcG5RtNOL1rBZsC&scisf=4&ct=citation&cd=-1&hl=en

    Name: BibTeX
    Link: https://scholar.googleusercontent.com/scholar.bib?q=info:_3o-xhuGyg0J:scholar.google.com/&output=citation&scisdr=CgUsJS1HGAA:AAGBfm0AAAAAXoSfDlzXSDxT7NaRePw8LQN5H6FAKj2l&scisig=AAGBfm0AAAAAXoSfDoaKmhM3yJGzMycKG9po8hpOwgQh&scisf=4&ct=citation&cd=-1&hl=en

    Name: BibTeX
    Link: https://scholar.googleusercontent.com/scholar.bib?q=info:VJySkcFsQ1EJ:scholar.google.com/&output=citation&scisdr=CgVZmmy9GAA:AAGBfm0AAAAAXoSfD1o5xq89bx4YdTidC0oBncMAiLHs&scisig=AAGBfm0AAAAAXoSfD0LnTMh68lgySxXBcmf0hrJp8bTz&scisf=4&ct=citation&cd=-1&hl=en

JSON Response

{
  "citations": [
    {
      "title": "MLA",
      "snippet": "Farah, Adriana, and Carmen Marino Donangelo. \"Phenolic compounds in coffee.\" Brazilian journal of plant physiology 18.1 (2006): 23-36."
    },
    {
      "title": "APA",
      "snippet": "Farah, A., & Donangelo, C. M. (2006). Phenolic compounds in coffee. Brazilian journal of plant physiology, 18(1), 23-36."
    },
    {
      "title": "Chicago",
      "snippet": "Farah, Adriana, and Carmen Marino Donangelo. \"Phenolic compounds in coffee.\" Brazilian journal of plant physiology 18, no. 1 (2006): 23-36."
    },
    {
      "title": "Harvard",
      "snippet": "Farah, A. and Donangelo, C.M., 2006. Phenolic compounds in coffee. Brazilian journal of plant physiology, 18(1), pp.23-36."
    },
    {
      "title": "Vancouver",
      "snippet": "Farah A, Donangelo CM. Phenolic compounds in coffee. Brazilian journal of plant physiology. 2006 Mar;18(1):23-36."
    }
  ],
  "links": [
    {
      "name": "BibTeX",
      "link": "https://scholar.googleusercontent.com/scholar.bib?q=info:re9ssrU-exUJ:scholar.google.com/&output=citation&scisdr=CgUgMydbGAA:AAGBfm0AAAAAXoSezaQALOlFVjCLJgcTVUPBVLhAC4P_&scisig=AAGBfm0AAAAAXoSezSdi7qdJVVpppb0Qjy9URFYAVvDb&scisf=4&ct=citation&cd=-1&hl=en"
    },
    {
      "name": "EndNote",
      "link": "https://scholar.googleusercontent.com/scholar.enw?q=info:re9ssrU-exUJ:scholar.google.com/&output=citation&scisdr=CgUgMydbGAA:AAGBfm0AAAAAXoSezaQALOlFVjCLJgcTVUPBVLhAC4P_&scisig=AAGBfm0AAAAAXoSezSdi7qdJVVpppb0Qjy9URFYAVvDb&scisf=3&ct=citation&cd=-1&hl=en"
    },
    {
      "name": "RefMan",
      "link": "https://scholar.googleusercontent.com/scholar.ris?q=info:re9ssrU-exUJ:scholar.google.com/&output=citation&scisdr=CgUgMydbGAA:AAGBfm0AAAAAXoSezaQALOlFVjCLJgcTVUPBVLhAC4P_&scisig=AAGBfm0AAAAAXoSezSdi7qdJVVpppb0Qjy9URFYAVvDb&scisf=2&ct=citation&cd=-1&hl=en"
    },
    {
      "name": "RefWorks",
      "link": "https://scholar.googleusercontent.com/scholar.rfw?q=info:re9ssrU-exUJ:scholar.google.com/&output=citation&scisdr=CgUgMydbGAA:AAGBfm0AAAAAXoSezaQALOlFVjCLJgcTVUPBVLhAC4P_&scisig=AAGBfm0AAAAAXoSezSdi7qdJVVpppb0Qjy9URFYAVvDb&scisf=1&ct=citation&cd=-1&hl=en"
    }
  ]
}

If you want more information, check out SerpApi documentation or live playground.

SerpApi playground


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .