get_bibtex

Get a BibTeX citation entry for a paper.

Searches Google Scholar for the paper by title and returns its BibTeX record as a plain string ready to paste into a .bib file.

Parameters

Parameter

Type

Default

Description

title

str

None

Title of the paper to get BibTeX for.

scholar_id

str

None

scholar_id of a paper from an earlier search result.

Note

Provide at least one of scholar_id or title (scholar_id wins), otherwise the call fails with [INVALID_ARGUMENT]. IDs avoid the title search, which takes the first hit and can return a different paper. With scholar_id the first entry of the paper’s version cluster is used.

Return Value

Returns a raw BibTeX string (str). Example output:

@article{vaswani2017attention,
  title={Attention is all you need},
  author={Vaswani, Ashish and Shazeer, Noam and Parmar, Niki and ...},
  journal={Advances in neural information processing systems},
  volume={30},
  year={2017}
}

Examples

Classic paper:

{
  "title": "Attention Is All You Need"
}

Recent work:

{
  "title": "Language Models are Few-Shot Learners"
}

Note

BibTeX entries are generated by the scholarly library from Google Scholar data. Field completeness varies by paper. Always verify the entry against the publisher’s official citation before submitting to a journal or conference.