About 10 years ago I wrote a perl script called "bibweb" which uses MathSciNet to produce bibtex entries for references. If you have access to MathSciNet and you run

bibweb -c 'hartshorne;algebraic-geometry'


then one of its answers is

@book {MR0463157,
AUTHOR = {Hartshorne, Robin},
TITLE = {Algebraic geometry},
NOTE = {Graduate Texts in Mathematics, No. 52},
PUBLISHER = {Springer-Verlag},