Authorization

All requests to the Verdantly API are authenticated through the RapidAPI platform. This guide covers how to authenticate your requests, which endpoints are publicly accessible, and how rate limiting works.

RapidAPI authentication

Every authenticated request to the Verdantly API requires two headers:

  • Name
    X-RapidAPI-Key
    Type
    string
    Description

    Your unique API key from RapidAPI. Found in the RapidAPI developer dashboard under the Authorization tab.

  • Name
    X-RapidAPI-Host
    Type
    string
    Description

    Always set to verdantly.p.rapidapi.com.

To get your API key:

  1. Sign up at RapidAPI
  2. Subscribe to the Verdantly API
  3. Copy your API key from the dashboard

Example authenticated request

curl -G "https://verdantly.p.rapidapi.com/v1/plants/varieties/search?q=tomato" \
  -H "X-RapidAPI-Host: verdantly.p.rapidapi.com" \
  -H "X-RapidAPI-Key: YOUR_API_KEY"

Public endpoints

Some endpoints are publicly accessible and do not require an API key. These are read-only reference endpoints:

  • Hardiness zonesGET /v1/hardiness-zones/zipcode/:zipcode
  • Frost datesGET /v1/frost-dates/:zipcode
  • Companion plantingGET /v1/companion-planting/:plantType
  • PestsGET /v1/pests/:plantType
  • DiseasesGET /v1/diseases/:plantType
  • Growing guidesGET /v1/growing-guides/:plantType

Public endpoints follow the same response format as authenticated endpoints. No headers are required.

Public endpoint example

GET
/v1/hardiness-zones/zipcode/10001
curl "https://verdantly.p.rapidapi.com/v1/hardiness-zones/zipcode/10001"

Rate limits

The Verdantly API enforces rate limits to ensure fair usage and protect the service. Limits vary by endpoint type:

  • Name
    Short burst
    Type
    20 requests / 10 seconds
    Description

    Applies to all endpoints. Prevents rapid-fire requests.

  • Name
    Default
    Type
    200 requests / 60 seconds
    Description

    Standard rate limit for most endpoints.

  • Name
    Auth endpoints
    Type
    5 requests / 60 seconds
    Description

    Stricter limit on authentication-related endpoints.

Rate limit response headers

Every response includes headers to help you track your usage:

  • Name
    X-RateLimit-Limit
    Type
    integer
    Description

    The maximum number of requests allowed in the current window.

  • Name
    X-RateLimit-Remaining
    Type
    integer
    Description

    The number of requests remaining in the current window.

  • Name
    X-RateLimit-Reset
    Type
    integer
    Description

    Unix timestamp (in seconds) when the rate limit window resets.

When you exceed a rate limit, the API returns a 429 Too Many Requests status code. Wait until the X-RateLimit-Reset time before retrying.

429 Response

{
  "statusCode": 429,
  "message": "Too many requests. Please try again later.",
  "error": "Too Many Requests"
}

Was this page helpful?