Skip to content

Provide a google scholar URL and SERPAPI key and output a .bib file containing all publications / articles in bibtex format

Notifications You must be signed in to change notification settings

jshinodea/scholar_to_bibtex

Repository files navigation

Google Scholar to BibTeX Converter API

A Flask API that converts Google Scholar publications to BibTeX format using SerpAPI.

Features

  • Convert Google Scholar profile to BibTeX format
  • RESTful API endpoints
  • Docker support
  • Health check endpoint

Prerequisites

Quick Start

Using Docker

  1. Clone the repository:
git clone https://github.com/jshinodea/scholar_to_bibtex
cd scholar_to_bibtex
  1. Create a .env file:
SERPAPI_KEY=your_api_key_here
  1. Build and run the Docker container:
docker build -t scholar_to_bibtex .
docker run -p 5000:5000 --env-file .env scholar_to_bibtex
  1. Get a .bib file from the API:
curl -X POST http://localhost:5000/convert -H "Content-Type: application/json" -d "{\"scholar_url\": \"PUT URL HERE\"}" --output citations.bib

Local Development

  1. Create a virtual environment:
python -m venv venv
source venv/bin/activate  # On Windows: .\venv\Scripts\activate
  1. Install dependencies:
pip install -r requirements.txt
  1. Run the application:
python app.py

API Endpoints

Convert Scholar Profile to BibTeX

POST /convert
Content-Type: application/json

{
    "scholar_url": "https://scholar.google.com/citations?user=AUTHOR_ID"
}

Health Check

GET /health

Development

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

License

MIT

About

Provide a google scholar URL and SERPAPI key and output a .bib file containing all publications / articles in bibtex format

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published