Skip to content
 
 

Repository files navigation

🌿 Ayurveda API

Status License Stars

⚡ A free, open-source REST API serving 200+ Ayurvedic medicines, 40+ home remedies, and disease treatments with classical references, dosage data, and product images.

🚀 Quick Start

No authentication required. Just start making requests!

// Fetch all medicines
const res = await fetch("https://your-api-url.onrender.com/api/medicines");
const data = await res.json();
console.log(data);
# cURL examples
curl "https://your-api-url.onrender.com/api/medicines?search=churna&limit=5"
curl "https://your-api-url.onrender.com/api/remedies?category=Skin"
curl "https://your-api-url.onrender.com/api/diseases"

📡 API Endpoints

Method Endpoint Description
GET /api API metadata, version, and total counts
GET /api/medicines List all medicines (paginated, searchable, filterable)
GET /api/medicines/:name Get a single medicine by name
GET /api/remedies List all home remedies (paginated, searchable)
GET /api/remedies/:condition Get remedies for a specific condition
GET /api/diseases List all diseases with Ayurvedic treatments
GET /api/diseases/:name Get a specific disease entry

Query Parameters

Medicines (/api/medicines)

  • page — Page number (default: 1)
  • limit — Items per page (default: 20, max: 100)
  • search — Search by name, synonyms, or indications
  • class — Filter by class (A, B, C)
  • form — Filter by form (Churna, Taila, Vati, etc.)

Remedies (/api/remedies)

  • page, limit — Pagination
  • search — Search by condition or remedy name
  • category — Filter by category (Skin, Digestive, Hair care, etc.)

Diseases (/api/diseases)

  • page, limit — Pagination
  • search — Search by disease name

📦 Response Format

All list endpoints return paginated JSON:

{
  "success": true,
  "count": 20,
  "total": 200,
  "page": 1,
  "totalPages": 10,
  "data": [ ... ]
}

✨ Features

  • 🔓 No Authentication — Completely free, no API keys required
  • 🔒 HTTPS — Secure connections
  • 🌐 CORS Enabled — Use from any domain or client
  • ⚡ Rate Limited — 100 requests / 15 minutes per IP
  • 🖼️ Medicine Images — 195 product images at /images/
  • 📖 Classical References — Sanskrit names, rasa, guna, virya, dosha actions
  • 📄 Pagination — Built-in pagination on all list endpoints

🛠️ Run Locally

# Clone the repository
git clone https://github.com/Rajath2005/ayurveda-api.git
cd ayurveda-api

# Install dependencies
npm install

# Start the server
npm start

# Or run in development mode (auto-restart)
npm run dev

The API will be available at http://localhost:3000

🏗️ Project Structure

ayurveda-api/
├── src/
│   ├── server.js           # Express app entry point
│   ├── data/
│   │   └── index.js         # Data loading & normalization
│   └── routes/
│       ├── index.js          # Root & /api routes
│       ├── medicines.js      # /api/medicines routes
│       ├── remedies.js       # /api/remedies routes
│       └── diseases.js       # /api/diseases routes
├── public/
│   └── index.html            # API documentation page
├── images/                    # 195 medicine product images
├── ayur-med-updated.json      # Medicine data (200+ entries)
├── remedies.json              # Home remedies data (40+ entries)
├── disease.json               # Disease treatments data
├── package.json
├── render.yaml                # Render.com deployment config
└── README.md

🚢 Deploy

Render.com (Recommended — Free)

  1. Push your code to GitHub
  2. Go to render.com → New Web Service
  3. Connect your GitHub repo
  4. Render auto-detects render.yaml and deploys!

Environment Variables

Variable Default Description
PORT 3000 Server port

🤝 Contributing

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/new-remedies)
  3. Add data or features following existing structure
  4. Submit a pull request

📄 License

MIT License — free for personal and commercial use!


Built with ❤️ by

Sanath00007 • Rithesh0115 • Rajath2005

Powering MediQ

About

A lightweight static API delivering curated, evidence-based Ayurvedic remedies in pure JSON. Plug & play, CDN-ready, and perfect for health apps or frontend projects.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Contributors

Languages