ડૉક્સ
તમારી પહેલી Mantrilo API રિક્વેસ્ટ મોકલો
મંત્રો, પવિત્ર ઑડિયો, શાસ્ત્ર ગ્રંથો અને જ્યોતિષ માટે એક જ REST API. તમે જે બનાવી રહ્યા છો તેની માર્ગદર્શિકાથી શરૂ કરો, અથવા કોઈપણ endpoint શોધો. ઉદાહરણો રિસ્પોન્સ ફૉર્મેટ બતાવે છે. કેટલાંકમાં અંશ કે પ્લેસહોલ્ડર વપરાયા છે.
ક્વિકસ્ટાર્ટ
- key મેળવો. દરેક એકાઉન્ટ સેન્ડબોક્સ key થી શરૂ થાય છે. સેન્ડબોક્સ ક્વિકસ્ટાર્ટ ખોલો
- તેને તમારા સર્વર પર રાખો. તમારા બૅકએન્ડના environment માં
MANTRILO_API_KEYઅનેMANTRILO_API_URLસેટ કરો. - રિક્વેસ્ટ મોકલો. એક મંત્રની યાદી મેળવો, પછી endpoint સંદર્ભ અથવા તમારા ધ્યેય માટેની માર્ગદર્શિકા અનુસરો.
curl "https://api.mantrilo.com/v1/mantras?limit=1" \
-H "Authorization: Bearer $MANTRILO_API_KEY"તમારા ધ્યેયથી શરૂ કરો
દરેક માર્ગદર્શિકા તમે ચલાવી શકો તેવી રિક્વેસ્ટથી શરૂ થાય છે, પછી સર્વર કોડ, પેજિનેશન અને ક્વોટા બતાવે છે.
ઉપનિષદો લોડ કરો
એક સંગ્રહને સીધો કૉલ કરો, તેનાં પેજ ફેરવો, પછી પુસ્તક, અધ્યાય કે શ્લોક ખોલો.
માર્ગદર્શિકા ખોલોશોધી શકાય તેવી શ્લોક લાઇબ્રેરી બનાવો
મંત્રો અને શ્લોકોની યાદી બનાવો, દેવતા પ્રમાણે ફિલ્ટર કરો અને લોડ કરેલાં શીર્ષકોમાં શોધો.
માર્ગદર્શિકા ખોલોપવિત્ર ઑડિયો વગાડો
રેકોર્ડિંગ ધરાવતી એન્ટ્રી માટે કામચલાઉ પ્લેબૅક URL માંગો.
માર્ગદર્શિકા ખોલોપુસ્તક રીડર બનાવો
સંસ્કૃત શ્લોકો અથવા રામાયણ અને મહાભારતનાં અંગ્રેજી પુનઃકથન વાંચો.
માર્ગદર્શિકા ખોલોજન્મ કુંડળી ઉમેરો
વૈકલ્પિક દશા સમયગાળા સાથે લાહિરી જન્મ કુંડળી બનાવો.
માર્ગદર્શિકા ખોલોદૈનિક પંચાંગ ઉમેરો
સ્થાનિક દૈનિક પંચાંગ કૅલેન્ડર બનાવો.
માર્ગદર્શિકા ખોલોદૈનિક મંત્ર બતાવો
પસંદ કરેલો મંત્ર મેળવો અને તેનું મૂળ સંસ્કૃત અને લિપ્યંતર બતાવો.
માર્ગદર્શિકા ખોલોજ્યોતિષની દરેક ક્ષમતા માટે માર્ગદર્શિકા છે. જ્યોતિષ ક્ષમતાઓ જુઓ
ઑથેન્ટિકેશન
દરેક રિક્વેસ્ટ પર તમારી key Authorization: Bearer YOUR_KEY તરીકે મોકલો. API બ્રાઉઝરના cross-origin કૉલ બ્લૉક કરે છે, એટલે તેને તમારા સર્વર પરથી કૉલ કરો અને તમારી ઍપને ફક્ત કન્ટેન્ટ આપો. key ક્યારેય વેબ બંડલ, મોબાઇલ ઍપ કે રિપોઝિટરીમાં ન મૂકો. જો key લીક થાય, તો તેને કન્સોલમાં ફરી જનરેટ કરો; જૂની key એક મિનિટમાં કામ કરતી બંધ થઈ જાય છે.
સેન્ડબોક્સ અને લાઇવ
| Environment | key પ્રિફિક્સ | તે શું વાંચી શકે |
|---|---|---|
| સેન્ડબોક્સ | mtr_sbx_ | નમૂના મંત્રો, નમૂના પુસ્તકોના શરૂઆતના શ્લોકો અને ઉપલબ્ધ જ્યોતિષ operations. દરેક એકાઉન્ટમાં એક હોય છે. |
| લાઇવ | mtr_live_ | ઉપલબ્ધ આખો કેટલૉગ. પેઇડ પ્લાન સાથે આપવામાં આવે છે. |
સેન્ડબોક્સ અને લાઇવના વપરાશના કુલ આંકડા અલગ રહે છે. નમૂનાની બહારની આઇટમ માટેની સેન્ડબોક્સ રિક્વેસ્ટ 403 sandbox_sample_only આપે છે.
પેજિનેશન
યાદીના endpoints nextCursor આપે છે. આગલું પેજ વાંચવા તેને cursor તરીકે પાછો મોકલો. છેલ્લા પેજ પર તે null હોય છે. પેજનું કદ limit (1–100) વડે સેટ કરો.
અધ્યાય પેજ nextOffset આપે છે. એ જ અધ્યાયના વધુ શ્લોકો વાંચવા તેને offset તરીકે પાછો મોકલો.
curl "$MANTRILO_API_URL/v1/books?collection=upanishads&limit=3&cursor={nextCursor}" \
-H "Authorization: Bearer $MANTRILO_API_KEY"ભૂલો
દરેક ભૂલનું માળખું એકસરખું હોય છે. code સ્થિર છે; message શું સુધારવું તે સમજાવે છે. ફક્ત સફળ રિસ્પોન્સ જ તમારા પ્લાનમાં ગણાય છે.
{
"error": {
"code": "invalid_api_key",
"message": "Send a valid API key."
},
"requestId": "request-id"
}| સ્ટેટસ | કોડ | શું કરવું |
|---|---|---|
400 | invalid_limit, invalid_cursor, invalid_deity, invalid_collection, invalid_offset | message માં જણાવેલો query પેરામીટર સુધારો. |
400 | invalid_operation, invalid_input, invalid_datetime, invalid_timezone, … | message માં જણાવેલો જ્યોતિષ ઇનપુટ સુધારો. |
401 | invalid_api_key, revoked_api_key | key ખૂટે છે, ખોટી છે અથવા રદ થયેલી છે. |
403 | plan_inactive | લાઇવ key માટે સક્રિય પેઇડ પ્લાન જોઈએ. |
403 | sandbox_sample_only | તે આઇટમ સેન્ડબોક્સ નમૂનાની બહાર છે. તમારી લાઇવ key વાપરો. |
404 | not_found, audio_unavailable | આવી કોઈ આઇટમ નથી, અથવા તેનું રેકોર્ડિંગ નથી. |
405 | method_not_allowed | endpoint માટે દર્શાવેલી method વાપરો. |
429 | rate_limited | Retry-After header જેટલી રાહ જુઓ, પછી ફરી પ્રયાસ કરો. |
429 | quota_exceeded, audio_quota_exceeded | માસિક ક્વોટા પૂરો થઈ ગયો છે. |
429 | too_many_failed_attempts | એક જ સરનામેથી ઘણી ખોટી key આવી છે. પછીથી ફરી પ્રયાસ કરો. |
500 | internal_error | ફરી પ્રયાસ કરો, અને સમસ્યા ચાલુ રહે તો requestId જણાવો. |
503 | books_unavailable, astrology_unavailable, astrology_operation_unavailable | સેવા અથવા operation હાલ ઉપલબ્ધ નથી. પછીથી ફરી પ્રયાસ કરો. |
504 | astrology_timeout | ગણતરીમાં ઘણો સમય લાગ્યો. ફરી પ્રયાસ કરો. કોઈ ચાર્જ લાગતો નથી. |
વપરાશ મર્યાદાઓ
ક્વોટા દરેક key પર નહીં, પણ તમારા આખા વર્કસ્પેસ પર લાગુ પડે છે, અને UTC પ્રમાણે દર મહિને રીસેટ થાય છે. દરેક સફળ કન્ટેન્ટ રિસ્પોન્સ અથવા જ્યોતિષ ગણતરી એક રિક્વેસ્ટ ગણાય છે. દરેક ઑડિયો લિંકમાં ફાઇલનું કદ પણ ગણાય છે.
| પ્લાન | માસિક રિક્વેસ્ટ | ઑડિયો | રેટ | બર્સ્ટ |
|---|---|---|---|---|
| મફત | 500 | ફક્ત નમૂના ઑડિયો | પ્રતિ સેકન્ડ 2 | 10 |
| Starter | 50,000 | 10 GB | પ્રતિ સેકન્ડ 10 | 20 |
| Growth | 2,50,000 | 50 GB | પ્રતિ સેકન્ડ 25 | 50 |
| Business | 10,00,000 | 200 GB | પ્રતિ સેકન્ડ 50 | 100 |
રિસ્પોન્સમાં X-RateLimit-Limit, X-RateLimit-Remaining, X-Quota-Requests-Remaining અને X-Request-Id હોય છે. rate_limited રિસ્પોન્સમાં Retry-After પણ હોય છે. સેન્ડબોક્સ key હંમેશાં મફત પ્લાનનો રેટ વાપરે છે. જો તમારા વર્કસ્પેસમાં માસિક રિક્વેસ્ટની કોઈ મર્યાદા ન હોય, તો X-Quota-Requests-Remaining unlimited હોય છે. પ્લાનની સરખામણી કરો
રામાયણ અને મહાભારત
આ અંગ્રેજી ગદ્ય પુનઃકથન વાંચવા લાઇવ key વાપરો. અધ્યાય અનુક્રમણિકા માટે પુસ્તક ખોલો, પછી એક જ રિક્વેસ્ટમાં આખો અધ્યાય લોડ કરવા અધ્યાય નંબર વાપરો.
Ramayana
22 અધ્યાય
curl "$MANTRILO_API_URL/v1/books/ramayana" \
-H "Authorization: Bearer $MANTRILO_API_KEY"
curl "$MANTRILO_API_URL/v1/books/ramayana/chapters/1" \
-H "Authorization: Bearer $MANTRILO_API_KEY"Mahabharata
62 અધ્યાય
curl "$MANTRILO_API_URL/v1/books/mahabharata" \
-H "Authorization: Bearer $MANTRILO_API_KEY"
curl "$MANTRILO_API_URL/v1/books/mahabharata/chapters/1" \
-H "Authorization: Bearer $MANTRILO_API_KEY"પુસ્તકો format: "prose" અને language: "en" આપે છે. અધ્યાય માટે, data.source બતાવો અને data.sections પર લૂપ ચલાવો. દરેક વિભાગનું title અને paragraphs ક્રમમાં રેન્ડર કરો. ગદ્ય અધ્યાયો ખાલી verses array અને nextOffset: null આપે છે.
Endpoint સંદર્ભ
curl "$MANTRILO_API_URL/v1"{
"name": "Mantrilo API",
"version": "1",
"authentication": "Authorization: Bearer <your Mantrilo API key>",
"resources": [
"/v1/mantras",
"/v1/books?collection={collection}",
"…"
]
}GET /v1/mantras
સ્થિર ક્રમમાં મંત્રો અને શ્લોકો. દરેક આઇટમ શ્લોકો વગરનો સારાંશ છે.
limitquery- પૂર્ણાંક, 1–100. ડિફૉલ્ટ 20.
cursorquery- અગાઉના પેજનો nextCursor.
deityquery- દેવતાનું id, જેમ કે shiva અથવા annapurna. ચોક્કસ મેળ.
curl "$MANTRILO_API_URL/v1/mantras?limit=1" \
-H "Authorization: Bearer $MANTRILO_API_KEY"{
"data": [
{
"id": "annapurna-aham-vaishvanaro-bhuthva",
"title": "Aham Vaishvanaro Bhuthva",
"deity": {
"id": "annapurna",
"name": "Lord Annapurna"
},
"category": "Annapurna Stotras",
"source": "Sanatana Shastras",
"description": "Aham Vaishvanaro Bhutva means \"I, having become the universal fire,\" and in Bhagavad Gita 15.14 Krishna says he lives in every body and digests its food. United with the prana and apana breaths, this inner fire cooks the four kinds of food: chewed, swallowed, licked and sucked. Families often say it before a meal to treat eating as an offering.",
"verseCount": 1,
"audio": {
"href": "/v1/mantras/annapurna-aham-vaishvanaro-bhuthva/audio"
}
}
],
"nextCursor": "YW5uYXB1cm5hLWFoYW0tdmFpc2h2YW5hcm8tYmh1dGh2YQ",
"requestId": "request-id"
}GET /v1/mantras/{id}
તેના શ્લોકો સાથે એક મંત્ર. કોઈપણ ટેક્સ્ટ ફીલ્ડ null હોઈ શકે છે, એટલે જે હાજર હોય તે જ રેન્ડર કરો.
idpath- યાદીના રિસ્પોન્સમાંથી મંત્રનું id.
description મંત્રનો ટૂંકો જાહેર સારાંશ છે. રેકોર્ડમાં સારાંશ ન હોય ત્યારે તે null હોય છે.
curl "$MANTRILO_API_URL/v1/mantras/annapurna-aham-vaishvanaro-bhuthva" \
-H "Authorization: Bearer $MANTRILO_API_KEY"{
"data": {
"id": "annapurna-aham-vaishvanaro-bhuthva",
"title": "Aham Vaishvanaro Bhuthva",
"deity": {
"id": "annapurna",
"name": "Lord Annapurna"
},
"category": "Annapurna Stotras",
"source": "Sanatana Shastras",
"description": "Aham Vaishvanaro Bhutva means \"I, having become the universal fire,\" and in Bhagavad Gita 15.14 Krishna says he lives in every body and digests its food. United with the prana and apana breaths, this inner fire cooks the four kinds of food: chewed, swallowed, licked and sucked. Families often say it before a meal to treat eating as an offering.",
"verseCount": 1,
"audio": {
"href": "/v1/mantras/annapurna-aham-vaishvanaro-bhuthva/audio"
},
"verses": [
{
"number": 1,
"title": "Aham Vaishvanaro Bhuthva – Verse 1",
"sanskrit": "अहं वैश्वानरो भूत्वा प्राणिनां देहमाश्रितः\nप्राणापान समायुक्तः पचाम्यन्नं चतुर्विधम्",
"transliteration": "ahaṃ vaiśvānaro bhūtvā prāṇināṃ dehamāśritaḥ\nprāṇāpāna samāyuktaḥ pacāmyannaṃ caturvidham",
"translation": null,
"wordMeanings": []
}
]
},
"requestId": "request-id"
}GET /v1/mantras/{id}/audio
જે મંત્રનું audio ફીલ્ડ null ન હોય તેનું રેકોર્ડિંગ. format=json વિના રિસ્પોન્સ ફાઇલ પર 302 રીડાયરેક્ટ હોય છે.
idpath- મંત્રનું id.
formatquery- json રીડાયરેક્ટ કરવાને બદલે signed લિંક JSON તરીકે આપે છે.
લિંક 15 મિનિટ ચાલે છે. દરેક લિંક તેની ફાઇલના કદ જેટલો તમારો ઑડિયો ક્વોટા વાપરે છે.
curl "$MANTRILO_API_URL/v1/mantras/annapurna-aham-vaishvanaro-bhuthva/audio?format=json" \
-H "Authorization: Bearer $MANTRILO_API_KEY"{
"data": {
"url": "https://storage.googleapis.com/mantrilo-media/…?X-Goog-Signature=…",
"expiresAt": "2026-11-10T06:45:00.000Z",
"bytes": 123077,
"contentType": "audio/x-m4a"
},
"requestId": "request-id"
}GET /v1/books
કેટલૉગ ક્રમમાં લાઇવ પુસ્તકો. ઉપનિષદો જેવા સમૂહને સીધો કૉલ કરવા collection પ્રમાણે ફિલ્ટર કરો.
collectionquery- સંગ્રહનું id: upanishads, bhagavad-gita, advaita-vedanta-prakarana-granthas, vedanta, yoga.
limitquery- પૂર્ણાંક, 1–100. ડિફૉલ્ટ 24.
cursorquery- અગાઉના પેજનો nextCursor.
સેન્ડબોક્સ key ઈશ ઉપનિષદ અને ભગવદ્ ગીતા બતાવે છે. બીજા સંગ્રહોમાં કદાચ કોઈ સેન્ડબોક્સ શીર્ષક ન મળે.
curl "$MANTRILO_API_URL/v1/books?collection=upanishads&limit=3" \
-H "Authorization: Bearer $MANTRILO_API_KEY"{
"data": [
{
"id": "ishaUpanishad",
"title": "Īśāvāsya Upaniṣad",
"author": "Vedic Rishis",
"category": null,
"subcategory": null,
"collection": {
"id": "upanishads",
"name": "Upanishads"
},
"description": "One of the shortest and most profound Upanishads, revealing the nature of the Supreme Lord who pervades all.",
"verseCount": 18
}
],
"nextCursor": null,
"sandbox": true,
"requestId": "request-id"
}GET /v1/books/{id}
અધ્યાય અનુક્રમણિકા સાથે પુસ્તકનો સારાંશ. લખાણ માંગવા અધ્યાય નંબર વાપરો.
idpath- યાદીના રિસ્પોન્સમાંથી પુસ્તકનું id.
સેન્ડબોક્સ key માટે preview true હોય છે, અને તે ફક્ત શરૂઆતનો અધ્યાય જોઈ શકે છે.
curl "$MANTRILO_API_URL/v1/books/ishaUpanishad" \
-H "Authorization: Bearer $MANTRILO_API_KEY"{
"data": {
"id": "ishaUpanishad",
"title": "…",
"collection": {
"id": "upanishads",
"name": "Upanishads"
},
"description": "…",
"chapters": [
{
"number": 1,
"title": "…",
"description": null,
"verseCount": 18
}
],
"preview": false
},
"requestId": "request-id"
}GET /v1/books/{id}/chapters/{chapter}
વધુમાં વધુ 30 શ્લોકોનું પેજ અથવા ગદ્ય પુનઃકથનનો આખો અધ્યાય.
idpath- પુસ્તકનું id.
chapterpath- પુસ્તકની અધ્યાય અનુક્રમણિકામાંથી અધ્યાય નંબર.
offsetquery- શ્લોકો માટે, અગાઉના પેજનો nextOffset આપો. ગદ્ય માટે છોડી દો.
સેન્ડબોક્સ key નમૂના પુસ્તકોના શરૂઆતના અધ્યાયના પહેલા ત્રણ શ્લોકો વાંચી શકે છે. રામાયણ અને મહાભારત માટે લાઇવ key જોઈએ.
curl "$MANTRILO_API_URL/v1/books/ishaUpanishad/chapters/1" \
-H "Authorization: Bearer $MANTRILO_API_KEY"{
"data": {
"number": 1,
"title": "…",
"verseCount": 18,
"verses": [
{
"number": 1,
"sanskrit": "…",
"transliteration": "…",
"translation": null,
"translator": "…",
"wordMeaning": null,
"commentary": null
}
],
"nextOffset": null
},
"requestId": "request-id"
}GET /v1/astrology
વર્તમાન operation કેટલૉગ, ID, શ્રેણીઓ અને જ્યાં ઉપલબ્ધ હોય ત્યાં નમૂના ઇનપુટ સાથે.
key ની જરૂર નથીકોઈ પેરામીટર નથી.
curl "$MANTRILO_API_URL/v1/astrology"{
"data": [
{
"id": "positions",
"name": "Planetary positions",
"description": "…"
},
{
"id": "vedic-panchang",
"name": "Panchang",
"category": "Vedic",
"availability": "available",
"example": {
"…": "…"
}
}
]
}POST /v1/astrology/calculate
એક operation ચલાવો. operation અને તે operation ના ઇનપુટ JSON તરીકે મોકલો. દરેક operation ના ઇનપુટ જ્યોતિષ પેજ પર છે.
operationbody- GET /v1/astrology માંથી operation id.
datetimebody- positions અને panchang માટે: સેકન્ડ અને UTC ઑફસેટ સાથે ISO 8601.
…body- બીજા ઇનપુટ operation પર આધાર રાખે છે.
નિષ્ફળ ગણતરીઓનો ચાર્જ લાગતો નથી.
Hindi responses: five operations answer in Hindi when you add "lang": "hi" or "language": "hi" under parameters. These are Daily Rashifal, Daily Rashifal for all signs, the Western daily sign horoscope, Daily Muhurat lookup and Moon sign compatibility. Codes and scores stay the same in both languages. Every other operation answers in English. The list is on the Astrology page.
curl -X POST "$MANTRILO_API_URL/v1/astrology/calculate" \
-H "Authorization: Bearer $MANTRILO_API_KEY" \
-H "Content-Type: application/json" \
-d '{"operation":"positions","datetime":"2026-11-10T12:00:00+05:30"}'{
"data": {
"engineVersion": "mantrilo-astro-1",
"datetimeUtc": "2026-11-10T06:30:00.000Z",
"referenceFrame": "geocentric_true_ecliptic_of_date",
"ayanamsa": {
"model": "lahiri_linear_approximation",
"degrees": 24.232277,
"approximate": true
},
"operation": "positions",
"planets": [
{
"body": "Moon",
"tropicalLongitudeDegrees": 238.933105,
"siderealLongitudeDegrees": 214.700828,
"latitudeDegrees": -4.987681,
"distanceAU": 0.00267702,
"motion": {
"degreesPerDay": 12.232549,
"retrograde": false
},
"rashi": {
"number": 8,
"name": "Vrishchika",
"degreesWithin": 4.700828
},
"nakshatra": {
"number": 17,
"name": "Anuradha",
"pada": 1
}
}
]
},
"calculated": true,
"requestId": "request-id"
}