MarkItDown API is a lightweight service built with FastAPI for converting files or URLs into Markdown using Microsoft's MarkItDown library. The API supports multiple file formats, such as PDF, DOCX, XLSX, and more.
- File Conversion: Upload a file and convert it to Markdown format.
- URL Conversion: Provide a URL to download and convert a file to Markdown.
- Python 3.10
- Docker (for containerized deployment)
- Clone the repository:
git clone https://github.com/your-repo/markitdown-api.git cd markitdown-api
- Create a virtual environment and activate it:
python3 -m venv venv source venv/bin/activate
- Install dependencies:
pip install -r requirements.txt
- Run the FastAPI server:
uvicorn main:app --reload
The API will be available at http://127.0.0.1:8000.
- Build the Docker image:
docker build -t markitdown-api .
- Run the Docker container:
docker run -p 8000:8000 markitdown-api
Access the API at http://127.0.0.1:8000.