TransWikia.com

How can I export my Google Scholar Library as a BibTeX format?

Academia Asked on December 26, 2021

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

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


Answered by Ilya Zub on December 26, 2021

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!

Answered by Levent Sagun on December 26, 2021

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

Answered by flashton on December 26, 2021

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.

Answered by Fuhrmanator on December 26, 2021

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

Answered by Adam_G on December 26, 2021

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

Answered by Aubrey on December 26, 2021

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.

Answered by Michael on December 26, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP