Skip to content

AlexSKorn/InstagramRecipeExtractor

Repository files navigation

Insta-Recipe.md 🍳

Extract recipes from Instagram Reels and save them as organized Markdown files.

React FastAPI Ollama

Features

  • 📥 Paste any public Instagram Reel URL with a recipe
  • 🤖 AI extracts ingredients (with checkboxes) and instructions
  • ⚡ Real-time streaming as the recipe is generated
  • 💾 Save recipes as Markdown files
  • 📚 Browse your saved recipe collection

Prerequisites

Before running this project, you need:

1. Ollama (Local AI)

# Install Ollama (macOS/Linux)
curl -fsSL https://ollama.com/install.sh | sh

# Pull the llama3.2 model
ollama pull llama3.2

# Start Ollama (if not running)
ollama serve

2. yt-dlp (Instagram Scraping)

pip install yt-dlp

3. Node.js & Python

  • Node.js 18+
  • Python 3.10+

Quick Start (Docker)

The fastest way to get running:

# Make sure Ollama is running with llama3.2
ollama serve &
ollama pull llama3.2

# Start the app
docker-compose up --build

Then visit http://localhost:3000

Note: Ollama must run on the host machine (not in Docker) for GPU access.

Getting Started (Manual)

1. Clone the repository

git clone https://github.com/yourusername/InstagramRecipeExtractor.git
cd InstagramRecipeExtractor

2. Set up the Backend

cd backend

# Create virtual environment
python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate

# Install dependencies
pip install -r requirements.txt

# Start the server
uvicorn main:app --reload --port 8000

3. Set up the Frontend

cd frontend

# Install dependencies
npm install

# Start the dev server
npm run dev

4. Open the App

Visit http://localhost:5173 in your browser.

Usage

  1. Find an Instagram Reel with a recipe
  2. Copy the URL (e.g., https://www.instagram.com/reel/ABC123/)
  3. Paste it into the input field
  4. Click Analyze and watch the recipe stream in
  5. Click Save as Markdown to keep it

Project Structure

InstagramRecipeExtractor/
├── backend/              # FastAPI Python server
│   ├── main.py           # API endpoints
│   ├── scraper.py        # yt-dlp wrapper
│   └── requirements.txt
├── frontend/             # React + Vite + TypeScript
│   └── src/
│       ├── App.tsx       # Main extraction page
│       ├── RecipesPage.tsx
│       └── api.ts        # API client
└── recipes/              # Saved recipes (auto-created)

Troubleshooting

Issue Solution
"yt-dlp not found" Install with pip install yt-dlp and ensure it's in PATH
"Could not extract description" Make sure the Instagram Reel is public
Ollama connection error Run ollama serve to start the Ollama server
CORS errors Ensure backend is running on port 8000

License

MIT

About

Extract recipes from Instagram videos using AI

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors