Kabir Dohe API

Access over 2500 authentic couplets (dohe) by Sant Kabir, one of India’s greatest spiritual poets and philosophers. Kabir Dohe API offers seamless integration to fetch, search, and filter Kabir’s timeless wisdom in your web or mobile apps, educational platforms, and AI projects.

Introduction to Kabir Dohe API

Kabir Dohe API is a free and open REST API that gives easy access to a large collection of 2500+ dohe (couplets) by Sant Kabir Das, a revered Indian mystic poet and spiritual reformer. His verses are simple, meaningful, and still relevant today, covering topics like life, truth, love, and human nature.

This API is useful for developers, students, teachers, and anyone interested in Indian spiritual and cultural content. You can use it to build apps like daily quote generators, educational tools, or content-based platforms.

The API is simple to use and does not require authentication. It offers useful features such as:

  • Get random doha
  • Search dohe by keyword
  • Filter by language or ID

It is designed for fast performance and easy integration, making it a great choice for projects that need meaningful and culturally rich content.

API Endpoint

GET /api/couplets

The GET /api/couplets endpoint lets you fetch a list of dohe (couplets) by Kabir Das, one of India’s most well-known spiritual poets. The API returns data in JSON format, making it easy to use in web and mobile apps.

You can use optional query parameters to filter results, control pagination, or search by keyword. This makes it useful for apps like daily quotes, learning platforms, and Indian philosophy tools.

No authentication is needed, and the API is free to use for personal and educational projects.

Query Parameters

The following parameters can be used to filter and paginate results:

NameTypeDefaultDescription
search_querystringPerform a keyword search across available content.
search_contentbooleanfalseWhen true, extends search to include interpretations and analysis; defaults to primary text only.
tagsstringFilter results by a comma-separated list of tag slugs.
categorystringFilter results by a single category slug.
is_popularbooleanfalseFilter results to show only popular entries (true/false).
is_featuredbooleanfalseFilter results to show only featured entries (true/false).
sort_bystringnumberSpecify the field for ordering results. Supported: number, popular, featured, text_en, text_hi.
sort_orderstringascDirection of sorted results: "asc" (ascending) or "desc" (descending).
pagenumber1The page index for paginated results (positive integer).
per_pagenumber10The maximum number of records to return per request.
paginationbooleantrueToggle the inclusion of pagination metadata in the response object.

Response Format

Successful API requests return JSON with the following structure:

json
{  "success": true,  "data": {    "posts": [      {        "number": 1,        "slug": "couplet-slug",        "text_hi": "हिन्दी में दोहा",        "text_en": "English couplet",        "meaning_hi": "हिन्दी में अर्थ",        "meaning_en": "English meaning",        "category": {          "name": "Category Name",          "slug": "category-slug"        },        "tags": [          {            "slug": "tag1",            "name": "Tag 1"          },          {            "slug": "tag2",            "name": "Tag 2"          }        ],        "created_at": "2024-01-01T00:00:00.000Z",        "updated_at": "2024-01-01T00:00:00.000Z"      }    ],    "total": 100,    "totalPages": 10,    "page": 1,    "per_page": 10,    "pagination": true  }}

Response Fields

FieldDescription
successBoolean indicating if the request was successful
data.postsArray of post objects
data.totalTotal number of records matching the query
data.totalPagesTotal number of pages
data.pageCurrent page number
data.per_pageNumber of results per page
data.paginationBoolean indicating if pagination is enabled
posts[].numberPost number/identifier
posts[].slugURL-friendly slug
posts[].text_hiCouplet text in Hindi
posts[].text_enCouplet text in English
posts[].meaning_hiMeaning in Hindi (nullable)
posts[].meaning_enMeaning in English (nullable)
posts[].categoryCategory object with name and slug
posts[].tagsArray of tag objects with slug and name
posts[].created_atTimestamp when the post was created
posts[].updated_atTimestamp when the post was last updated

See query parameters for how to control pagination and filtering of fields.

Error Response Format

When an error occurs, the API will return a JSON response with the following structure:

json
{  "code": 400,  "error": "A descriptive error message"}

Error Response Fields

code

HTTP status code

Numeric HTTP status code indicating the result of the request.

error

Error message

A human-readable error message describing what went wrong.

Common Error Responses

400

Bad Request

Your request had invalid or missing parameters. Review the error message and try again.

404

Not Found

The endpoint you tried to access does not exist. Check the URL and request method.

500

Internal server error

Something went wrong on the server side. Try again later or contact support if the problem persists.

Usage Examples

Explore simple usage examples of the Kabir Dohe API in different environments like cURL, JavaScript, and Python.

These examples help you understand how to fetch and use dohe in your application. For JavaScript, you can also check the Fetch API documentation for more details.

Use the tabs to switch between languages. All code snippets are easy to copy and help you quickly integrate the API into your project.

bash
curl -X GET "https://kabirdoheapi.vercel.app/api/couplets?tags=devotion&per_page=5"

API Endpoint Examples

Browse common API requests below. Click on a section to view the example and understand how it works.

bash
curl -X GET https://kabirdoheapi.vercel.app/api/couplets
bash
curl -X GET https://kabirdoheapi.vercel.app/api/couplets?search_query=itna%20dijai
bash
curl -X GET https://kabirdoheapi.vercel.app/api/couplets?search_query=wisdom&search_content=true
bash
curl -X GET https://kabirdoheapi.vercel.app/api/couplets?tags=spiritual,life
bash
curl -X GET https://kabirdoheapi.vercel.app/api/couplets?category=philosophy
bash
curl -X GET https://kabirdoheapi.vercel.app/api/couplets?is_popular=true
bash
curl -X GET https://kabirdoheapi.vercel.app/api/couplets?is_featured=true
bash
curl -X GET https://kabirdoheapi.vercel.app/api/couplets?sort_by=text_en&sort_order=asc
bash
curl -X GET https://kabirdoheapi.vercel.app/api/couplets?page=2&per_page=5
bash
curl -X GET https://kabirdoheapi.vercel.app/api/couplets?search_query=wisdom&search_content=true&tags=philosophy&is_popular=false&is_featured=false&sort_by=number&sort_order=desc&page=1&per_page=10

Who Was Sant Kabir?

Sant Kabir Das(1440–1518) was a well-known Indian poet and spiritual teacher linked to the Bhakti and Sufi traditions. He is respected by Hindus, Muslims, and Sikhs. Some of his verses are also included in the Guru Granth Sahib, the holy book of Sikhism.

Kabir believed in Nirguna Bhakti, which means devotion to a formless God. He spoke against caste system and blind religious practices, and encouraged people to follow truth and inner understanding.

His main work, the Bijak, is an important text in the Kabir Panth tradition. Through Kabir Dohe API, we aim to make his timeless teachings easy to access in the modern digital world.

Explore the Wisdom of Kabir with Our Dohe API

Kabir Dohe API is a simple and easy-to-use REST API that gives access to over 2500+ dohe (couplets) of Sant Kabir, a well-known Indian poet and saint. Each doha includes the original Hindi text, meaning, and English translation.

This API is useful for building educational apps, websites, or tools that focus on Indian philosophy and spiritual content. It helps you easily add meaningful and culturally rich content to your projects.

Why use Kabir Dohe API?

  • Provides Kabir dohe in JSON format, making it easy to use across different platforms and applications.
  • Built on fast and reliable serverless architecture and hosted on Vercel, ensuring good performance and uptime.
  • Fully open-source, allowing anyone to view, use, and contribute to the project.
  • Easy to integrate with technologies like JavaScript, Python, and frameworks like React Native.
  • Supports pagination and filtering, making it easy to work with large collections of dohe.

When to Use Kabir Dohe API?

  • Educational Platforms: Use it in learning apps, school projects, or websites to teach Indian philosophy, values, and literature in a simple way.
  • Daily Quote Apps: Show dohe as daily quotes to inspire users and encourage self-reflection.
  • Research and Study: Helpful for students and researchers exploring Kabir’s teachings, Bhakti movement, or cultural studies.
  • Content Websites and Blogs: Add meaningful and SEO-friendly content related to spirituality, motivation, and Indian culture.
  • Mobile Apps: Easily integrate dohe into Android or iOS apps for learning, quotes, or reading experiences.
  • Chatbots and AI Tools: Use dohe as responses or training data for apps focused on philosophy and knowledge sharing.
  • Language Learning Tools: Help users learn Hindi with real cultural content and simple meanings.
  • Social Media Content: Generate posts, reels, or shareable content based on Kabir’s dohe.

Who Can Use Kabir Dohe API?

  • Developers: Build apps, websites, or tools that use meaningful and cultural content.
  • Students and Learners: Study Kabir’s dohe, Indian philosophy, and moral teachings in a simple format.
  • Teachers and Educators: Use dohe as learning material in classrooms, courses, or online teaching.
  • Content Creators: Create blogs, videos, or social media content based on Kabir’s teachings.
  • Researchers: Analyze dohe for cultural, linguistic, or philosophical studies.
  • AI and NLP Developers: Use the dataset for tasks like text analysis, translation, or training language models.
  • Startups and Indie Makers: Add unique and valuable content to apps focused on learning, quotes, or spirituality.

What Can You Build with Kabir Dohe API?

  • Quote Apps: Create daily doha apps that show meaningful quotes for inspiration and reflection.
  • Social Media Bots: Build bots that automatically post Kabir’s dohe on platforms like Twitter (X) or other social platforms.
  • Educational Websites: Develop platforms to teach Indian philosophy, values, and literature.
  • Language Learning Tools: Help users learn Hindi with dohe and their English translations.
  • Mobile Apps: Build Android or iOS apps focused on reading, learning, or sharing dohe.
  • Chatbots and AI Tools: Create bots that share dohe or answer questions using Kabir’s teachings.
  • Voice Assistants: Integrate dohe into voice apps using Amazon Alexa or Google Assistant.
  • Content Platforms: Build blogs, tools, or websites that share spiritual and cultural content.

Contribute to the Project

We need your help! This project grows with support from the community. You can contribute in many simple ways.

Whether you are a developer or not, you can help improve this project:

  • Developers: Fix bugs, improve code, add new features, or enhance API endpoints.
  • Non-developers: Help with translations, data checking, and improving documentation.
  • Everyone: You can help update our Excel sheets by fixing mistakes, improving translations, or adding new dohe.
Contribute on GitHub