કન્ટેન્ટ પર જાઓ
API key મેળવો

ડૉક્સ

તમારી પહેલી Mantrilo API રિક્વેસ્ટ મોકલો

મંત્રો, પવિત્ર ઑડિયો, શાસ્ત્ર ગ્રંથો અને જ્યોતિષ માટે એક જ REST API. તમે જે બનાવી રહ્યા છો તેની માર્ગદર્શિકાથી શરૂ કરો, અથવા કોઈપણ endpoint શોધો. ઉદાહરણો રિસ્પોન્સ ફૉર્મેટ બતાવે છે. કેટલાંકમાં અંશ કે પ્લેસહોલ્ડર વપરાયા છે.

ક્વિકસ્ટાર્ટ

  1. key મેળવો. દરેક એકાઉન્ટ સેન્ડબોક્સ key થી શરૂ થાય છે. સેન્ડબોક્સ ક્વિકસ્ટાર્ટ ખોલો
  2. તેને તમારા સર્વર પર રાખો. તમારા બૅકએન્ડના environment માં MANTRILO_API_KEY અને MANTRILO_API_URL સેટ કરો.
  3. રિક્વેસ્ટ મોકલો. એક મંત્રની યાદી મેળવો, પછી endpoint સંદર્ભ અથવા તમારા ધ્યેય માટેની માર્ગદર્શિકા અનુસરો.
GET તમારી પહેલી રિક્વેસ્ટ
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 એક મિનિટમાં કામ કરતી બંધ થઈ જાય છે.

સેન્ડબોક્સ અને લાઇવ

Environmentkey પ્રિફિક્સતે શું વાંચી શકે
સેન્ડબોક્સmtr_sbx_નમૂના મંત્રો, નમૂના પુસ્તકોના શરૂઆતના શ્લોકો અને ઉપલબ્ધ જ્યોતિષ operations. દરેક એકાઉન્ટમાં એક હોય છે.
લાઇવmtr_live_ઉપલબ્ધ આખો કેટલૉગ. પેઇડ પ્લાન સાથે આપવામાં આવે છે.

સેન્ડબોક્સ અને લાઇવના વપરાશના કુલ આંકડા અલગ રહે છે. નમૂનાની બહારની આઇટમ માટેની સેન્ડબોક્સ રિક્વેસ્ટ 403 sandbox_sample_only આપે છે.

પેજિનેશન

યાદીના endpoints nextCursor આપે છે. આગલું પેજ વાંચવા તેને cursor તરીકે પાછો મોકલો. છેલ્લા પેજ પર તે null હોય છે. પેજનું કદ limit (1–100) વડે સેટ કરો.

અધ્યાય પેજ nextOffset આપે છે. એ જ અધ્યાયના વધુ શ્લોકો વાંચવા તેને offset તરીકે પાછો મોકલો.

GET nextCursor હાજર હોય ત્યાં સુધી ચાલુ રાખો
curl "$MANTRILO_API_URL/v1/books?collection=upanishads&limit=3&cursor={nextCursor}" \
  -H "Authorization: Bearer $MANTRILO_API_KEY"

ભૂલો

દરેક ભૂલનું માળખું એકસરખું હોય છે. code સ્થિર છે; message શું સુધારવું તે સમજાવે છે. ફક્ત સફળ રિસ્પોન્સ જ તમારા પ્લાનમાં ગણાય છે.

ભૂલ401
{
  "error": {
    "code": "invalid_api_key",
    "message": "Send a valid API key."
  },
  "requestId": "request-id"
}
સ્ટેટસકોડશું કરવું
400invalid_limit, invalid_cursor, invalid_deity, invalid_collection, invalid_offsetmessage માં જણાવેલો query પેરામીટર સુધારો.
400invalid_operation, invalid_input, invalid_datetime, invalid_timezone, …message માં જણાવેલો જ્યોતિષ ઇનપુટ સુધારો.
401invalid_api_key, revoked_api_keykey ખૂટે છે, ખોટી છે અથવા રદ થયેલી છે.
403plan_inactiveલાઇવ key માટે સક્રિય પેઇડ પ્લાન જોઈએ.
403sandbox_sample_onlyતે આઇટમ સેન્ડબોક્સ નમૂનાની બહાર છે. તમારી લાઇવ key વાપરો.
404not_found, audio_unavailableઆવી કોઈ આઇટમ નથી, અથવા તેનું રેકોર્ડિંગ નથી.
405method_not_allowedendpoint માટે દર્શાવેલી method વાપરો.
429rate_limitedRetry-After header જેટલી રાહ જુઓ, પછી ફરી પ્રયાસ કરો.
429quota_exceeded, audio_quota_exceededમાસિક ક્વોટા પૂરો થઈ ગયો છે.
429too_many_failed_attemptsએક જ સરનામેથી ઘણી ખોટી key આવી છે. પછીથી ફરી પ્રયાસ કરો.
500internal_errorફરી પ્રયાસ કરો, અને સમસ્યા ચાલુ રહે તો requestId જણાવો.
503books_unavailable, astrology_unavailable, astrology_operation_unavailableસેવા અથવા operation હાલ ઉપલબ્ધ નથી. પછીથી ફરી પ્રયાસ કરો.
504astrology_timeoutગણતરીમાં ઘણો સમય લાગ્યો. ફરી પ્રયાસ કરો. કોઈ ચાર્જ લાગતો નથી.

વપરાશ મર્યાદાઓ

ક્વોટા દરેક key પર નહીં, પણ તમારા આખા વર્કસ્પેસ પર લાગુ પડે છે, અને UTC પ્રમાણે દર મહિને રીસેટ થાય છે. દરેક સફળ કન્ટેન્ટ રિસ્પોન્સ અથવા જ્યોતિષ ગણતરી એક રિક્વેસ્ટ ગણાય છે. દરેક ઑડિયો લિંકમાં ફાઇલનું કદ પણ ગણાય છે.

પ્લાનમાસિક રિક્વેસ્ટઑડિયોરેટબર્સ્ટ
મફત500ફક્ત નમૂના ઑડિયોપ્રતિ સેકન્ડ 210
Starter50,00010 GBપ્રતિ સેકન્ડ 1020
Growth2,50,00050 GBપ્રતિ સેકન્ડ 2550
Business10,00,000200 GBપ્રતિ સેકન્ડ 50100

રિસ્પોન્સમાં 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 અધ્યાય

Ramayana પુસ્તક અને પહેલો અધ્યાય
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 અધ્યાય

Mahabharata પુસ્તક અને પહેલો અધ્યાય
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 સંદર્ભ

GET /v1

API નું નામ, વર્ઝન અને રિસોર્સ યાદી. હેલ્થ ચેક તરીકે ઉપયોગી.

key ની જરૂર નથી

કોઈ પેરામીટર નથી.

GET રિક્વેસ્ટ
curl "$MANTRILO_API_URL/v1"
સેન્ડબોક્સ રિક્વેસ્ટ ટેસ્ટર ખોલો
રિસ્પોન્સ200 OK
{
  "name": "Mantrilo API",
  "version": "1",
  "authentication": "Authorization: Bearer <your Mantrilo API key>",
  "resources": [
    "/v1/mantras",
    "/v1/books?collection={collection}",
    "…"
  ]
}

GET /v1/mantras

સ્થિર ક્રમમાં મંત્રો અને શ્લોકો. દરેક આઇટમ શ્લોકો વગરનો સારાંશ છે.

limit query
પૂર્ણાંક, 1–100. ડિફૉલ્ટ 20.
cursor query
અગાઉના પેજનો nextCursor.
deity query
દેવતાનું id, જેમ કે shiva અથવા annapurna. ચોક્કસ મેળ.
GET રિક્વેસ્ટ
curl "$MANTRILO_API_URL/v1/mantras?limit=1" \
  -H "Authorization: Bearer $MANTRILO_API_KEY"
સેન્ડબોક્સ રિક્વેસ્ટ ટેસ્ટર ખોલો
રિસ્પોન્સ200 OK
{
  "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 હોઈ શકે છે, એટલે જે હાજર હોય તે જ રેન્ડર કરો.

id path
યાદીના રિસ્પોન્સમાંથી મંત્રનું id.

description મંત્રનો ટૂંકો જાહેર સારાંશ છે. રેકોર્ડમાં સારાંશ ન હોય ત્યારે તે null હોય છે.

GET રિક્વેસ્ટ
curl "$MANTRILO_API_URL/v1/mantras/annapurna-aham-vaishvanaro-bhuthva" \
  -H "Authorization: Bearer $MANTRILO_API_KEY"
સેન્ડબોક્સ રિક્વેસ્ટ ટેસ્ટર ખોલો
રિસ્પોન્સ200 OK
{
  "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 રીડાયરેક્ટ હોય છે.

id path
મંત્રનું id.
format query
json રીડાયરેક્ટ કરવાને બદલે signed લિંક JSON તરીકે આપે છે.

લિંક 15 મિનિટ ચાલે છે. દરેક લિંક તેની ફાઇલના કદ જેટલો તમારો ઑડિયો ક્વોટા વાપરે છે.

GET રિક્વેસ્ટ
curl "$MANTRILO_API_URL/v1/mantras/annapurna-aham-vaishvanaro-bhuthva/audio?format=json" \
  -H "Authorization: Bearer $MANTRILO_API_KEY"
સેન્ડબોક્સ રિક્વેસ્ટ ટેસ્ટર ખોલો
રિસ્પોન્સ200 OK
{
  "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 પ્રમાણે ફિલ્ટર કરો.

collection query
સંગ્રહનું id: upanishads, bhagavad-gita, advaita-vedanta-prakarana-granthas, vedanta, yoga.
limit query
પૂર્ણાંક, 1–100. ડિફૉલ્ટ 24.
cursor query
અગાઉના પેજનો nextCursor.

સેન્ડબોક્સ key ઈશ ઉપનિષદ અને ભગવદ્ ગીતા બતાવે છે. બીજા સંગ્રહોમાં કદાચ કોઈ સેન્ડબોક્સ શીર્ષક ન મળે.

GET રિક્વેસ્ટ
curl "$MANTRILO_API_URL/v1/books?collection=upanishads&limit=3" \
  -H "Authorization: Bearer $MANTRILO_API_KEY"
સેન્ડબોક્સ રિક્વેસ્ટ ટેસ્ટર ખોલો
રિસ્પોન્સ200 OK
{
  "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}

અધ્યાય અનુક્રમણિકા સાથે પુસ્તકનો સારાંશ. લખાણ માંગવા અધ્યાય નંબર વાપરો.

id path
યાદીના રિસ્પોન્સમાંથી પુસ્તકનું id.

સેન્ડબોક્સ key માટે preview true હોય છે, અને તે ફક્ત શરૂઆતનો અધ્યાય જોઈ શકે છે.

GET રિક્વેસ્ટ
curl "$MANTRILO_API_URL/v1/books/ishaUpanishad" \
  -H "Authorization: Bearer $MANTRILO_API_KEY"
સેન્ડબોક્સ રિક્વેસ્ટ ટેસ્ટર ખોલો
રિસ્પોન્સ200 OK
{
  "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 શ્લોકોનું પેજ અથવા ગદ્ય પુનઃકથનનો આખો અધ્યાય.

id path
પુસ્તકનું id.
chapter path
પુસ્તકની અધ્યાય અનુક્રમણિકામાંથી અધ્યાય નંબર.
offset query
શ્લોકો માટે, અગાઉના પેજનો nextOffset આપો. ગદ્ય માટે છોડી દો.

સેન્ડબોક્સ key નમૂના પુસ્તકોના શરૂઆતના અધ્યાયના પહેલા ત્રણ શ્લોકો વાંચી શકે છે. રામાયણ અને મહાભારત માટે લાઇવ key જોઈએ.

GET રિક્વેસ્ટ
curl "$MANTRILO_API_URL/v1/books/ishaUpanishad/chapters/1" \
  -H "Authorization: Bearer $MANTRILO_API_KEY"
સેન્ડબોક્સ રિક્વેસ્ટ ટેસ્ટર ખોલો
રિસ્પોન્સ200 OK
{
  "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 ની જરૂર નથી

કોઈ પેરામીટર નથી.

GET રિક્વેસ્ટ
curl "$MANTRILO_API_URL/v1/astrology"
સેન્ડબોક્સ રિક્વેસ્ટ ટેસ્ટર ખોલો
રિસ્પોન્સ200 OK
{
  "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 ના ઇનપુટ જ્યોતિષ પેજ પર છે.

operation body
GET /v1/astrology માંથી operation id.
datetime body
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.

POST રિક્વેસ્ટ
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"}'
સેન્ડબોક્સમાં ગ્રહ સ્થિતિ અજમાવો
રિસ્પોન્સ200 OK
{
  "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"
}
દરેક કન્ટેન્ટ પ્રકાર શું આપે છે તે પહેલાં જોવું છે? લાઇબ્રેરી જુઓ.