rv API reference

All of the poets and gods in the Rig Veda, presented with the mandal and sukta numbers, and the meters the verses are composed in

rv = Rig Veda

You can make only GET calls to the API.


Endpoint

https://api-rv.herokuapp.com/rv/v1

The response format is JSON.


Example response

[
    {
        "mandal": 7,
        "sukta": 43,
        "sungby": "Vasishth Maitravaruni",
        "sungbycategory": "human male",
        "sungfor": "Vishwadeva",
        "sungforcategory": "divine male",
        "meter": "Trishtup"
    },
    {
        "mandal": 7,
        "sukta": 43,
        "sungby": "Vasishth Maitravaruni",
        "sungbycategory": "human male",
        "sungfor": "Agni",
        "sungforcategory": "divine male",
        "meter": "Trishtup"
    },
    {
        "mandal": 7,
        "sukta": 44,
        "sungby": "Vasishth Maitravaruni",
        "sungbycategory": "human male",
        "sungfor": "Dadhikra",
        "sungforcategory": "animal",
        "meter": "Jagati"
    }
]

Resources

The GET calls are served over HTTPS. The following resources are available:

  • mandal: The mandal number for the verse. For example, 7.
    This is an integer resource. Filtering is like this: /resources?mandal=<number>. For example, /resources?mandal=4 returns all of the verses in the 4th book.
    Valid values for this resource are 1 through 10 (because there are only 10 mandals in the Rig Veda).
  • sukta: The sukta number for the verse. For example, 136.
    This is an integer resource. Filtering is like this: /resources?sukta=<number>. For example, /resources?sukta=23 returns all of the suktas numbered 23 from all of the 10 books.
    The number of suktas in each book is different; for example, mandal 10 contains 59 suktas. The highest value possible for this resource is 191 (which is the number in the 1st mandal).
  • sungby: The composer of the verse. For example, Vishwamitra.
    This is a string resource. Filtering is like this: /resources?sungby=<string>. For example, /resources?sungby=tra returns all composers whose name contains tra.
  • sungbycategory: The category that composer of the verse belongs to. For example, human male.
    The following categories are available:
    • animal
    • demon male
    • divine female
    • divine male
    • human female
    • human male
    This is a string resource. Filtering is like this: /resources?sungbycategory=<string>. For example /resources?sungbycategory=ale returns all of the verses composed by all males and females, whether human or divine.
  • sungfor: The god, person, or thing that the verse is composed for. For example, Agni or plough.
    This is a string resource. Filtering is like this: /resources?sungfor=<string>. For example, /resources?sungfor=ni returns all venerated beings or objects whose name contains ni, like Nirriti (god), Maitravaruni (human) or Sinivali (abstract thing).
  • sungforcategory: The category that the subject of the verse belongs. For example, object.
    The following categories are available:
    • abstract
    • animal
    • demon male
    • divine female
    • divine human
    • divine male
    • human couple
    • human female
    • human male
    • human unborn
    • object
    • plant
    This is a string resource. Filtering is like this: /resources?sungforcategory=<string>. For example /resources?sungforcategory=animal returns all animals.
  • meter: The meter that the verse is composed in. For example, Trishtubh.
    This is a string resource. Filtering is like this: /resources?meter=<string>. For example /resources?meter=tup returns all meters that contain tup, such as Anushtup and Trishtup.

Filtering on more than one parameter in a single API request is not supported.


SDKs

Some Python code is available in this ipynb file.

Some client libraries are at GitHub repo. These SDKs are generated automatically through Swagger and do not work on their own; you need to create an application that will use the SDK to make API calls. To get started, see the README.md file in the SDK.

If the language that you want is not listed, log a GitHub issue. Or, if you are on Swagger, generate your own client SDK by using the YAML file in the GitHub repo.