Quick Start Guide

Get started with the Niriv Developer API in minutes

1 Get Your API Key

2 Make Your First Request

Once you have your API key, you can start making requests. Here's a simple example using cURL:

curl -X GET "https://www.niriv.com/wp-json/niriv/v1/developer/vegetable-prices" \ -H "Authorization: Bearer YOUR_API_KEY"

Or using JavaScript (fetch):

fetch('https://www.niriv.com/wp-json/niriv/v1/developer/vegetable-prices', { headers: { 'Authorization': 'Bearer YOUR_API_KEY' } }) .then(response => response.json()) .then(data => console.log(data));

3 Example: Get Vegetable Prices

Here's a complete example in Python:

import requests api_key = "YOUR_API_KEY" url = "https://www.niriv.com/wp-json/niriv/v1/developer/vegetable-prices" headers = { "Authorization": f"Bearer {api_key}" } response = requests.get(url, headers=headers) data = response.json() if data.get('success'): for vegetable in data['data']: print(f"{vegetable['name']}: {vegetable['avg']}") else: print(f"Error: {data.get('message')}")

4 Example: Get Horoscope

Get today's horoscope for a specific zodiac sign:

curl -X GET "https://www.niriv.com/wp-json/niriv/v1/developer/horoscope?zodiac_sign=aries" \ -H "Authorization: Bearer YOUR_API_KEY"

Available zodiac signs: aries, taurus, gemini, cancer, leo, virgo, libra, scorpio, sagittarius, capricorn, aquarius, pisces

5 Handle Rate Limits

Always check the response for rate limit information:

{ "success": true, "data": [...], "rate_limit": { "allowed": true, "daily_used": 5, "daily_limit": 10, "monthly_used": 150, "monthly_limit": 300, "tier": "free" } }

If you exceed your limit, you'll receive a 429 Too Many Requests error. Consider upgrading your tier for higher limits.

Next Steps

Liked by

Loading...

Voted by

Loading...

Liked by