API Documentation

Complete reference for the Niriv Developer API

Authentication

All API requests require authentication using an API key. You can provide your API key in one of three ways:

1. Authorization Header (Recommended)

Authorization: Bearer YOUR_API_KEY

2. X-API-Key Header

X-API-Key: YOUR_API_KEY

3. Query Parameter

GET /wp-json/niriv/v1/developer/vegetable-prices?api_key=YOUR_API_KEY

Rate Limits

Rate limits are enforced per API key based on your tier:

  • Free: 10 requests/day OR 300 requests/month
  • Tier 1: 1,000 requests/day OR 30,000 requests/month
  • Tier 2: 5,000 requests/day OR 150,000 requests/month

Note: When you exceed your rate limit, you'll receive a 429 Too Many Requests response. Upgrade your tier for higher limits.

API Endpoints

GET Vegetable Prices

Get daily vegetable market prices

GET https://www.niriv.com/wp-json/niriv/v1/developer/vegetable-prices

Response:

{ "success": true, "data": [ { "name": "Tomato", "min": "Rs. 80", "max": "Rs. 120", "avg": "Rs. 100", "image": "..." } ], "last_updated": "2025-01-15 10:00:00" }

GET Forex Rates

Get currency exchange rates from Nepal Rastra Bank

GET https://www.niriv.com/wp-json/niriv/v1/developer/forex-rates

GET Fuel Prices

Get petrol, diesel, and LPG prices from NOC

GET https://www.niriv.com/wp-json/niriv/v1/developer/fuel-prices

GET Gold & Silver Rates

Get precious metal rates

GET https://www.niriv.com/wp-json/niriv/v1/developer/gold-silver-rates

GET Horoscope

Get daily horoscope by zodiac sign

GET https://www.niriv.com/wp-json/niriv/v1/developer/horoscope?zodiac_sign=aries

Parameters:

  • zodiac_sign (required): aries, taurus, gemini, cancer, leo, virgo, libra, scorpio, sagittarius, capricorn, aquarius, pisces
  • date (optional): YYYY-MM-DD format (defaults to today)

Error Codes

Code Description
400 Bad Request - Invalid parameters
401 Unauthorized - Missing or invalid API key
429 Too Many Requests - Rate limit exceeded
503 Service Unavailable - Data not available

Liked by

Loading...

Voted by

Loading...

Liked by