Documentation

Back to Dashboard

API Reference

Complete API documentation for GrantAuthority.org. Integrate our powerful grant discovery and application platform into your own applications.

Overview

The GrantAuthority.org API is organized around REST. Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.

Base URL

https://api.grantauthority.org/v1

Authentication

The GrantAuthority.org API uses API keys to authenticate requests. You can view and manage your API keys in the Dashboard.

curl https://api.grantauthority.org/v1/grants \
  -H "Authorization: Bearer YOUR_API_KEY"

Keep your API keys secure

Your secret API keys should be kept confidential and only stored on your own servers. Do not expose them in client-side code or public repositories.

API Endpoints

Grants

GET/v1/grants

List all available grants with optional filters

Query Parameters

ParameterTypeDescription
limitintegerNumber of results (default: 20, max: 100)
offsetintegerPagination offset
categorystringFilter by grant category
min_amountintegerMinimum grant amount
max_amountintegerMaximum grant amount

Example Request

curl "https://api.grantauthority.org/v1/grants?limit=10&category=education" \
  -H "Authorization: Bearer YOUR_API_KEY"
GET/v1/grants/:id

Retrieve a specific grant by ID

Example Response

{
  "id": "grant_123456",
  "title": "Education Innovation Grant",
  "agency": "Department of Education",
  "amount": {
    "min": 50000,
    "max": 250000,
    "currency": "USD"
  },
  "deadline": "2025-03-15T23:59:59Z",
  "eligibility": ["501c3", "educational_institution"],
  "category": "education",
  "description": "Support innovative educational programs...",
  "application_url": "https://grants.gov/...",
  "created_at": "2025-01-10T12:00:00Z"
}
POST/v1/grants/search

Search grants using AI-powered natural language queries

Request Body

{
  "query": "grants for mental health programs in rural areas",
  "filters": {
    "min_amount": 10000,
    "max_amount": 100000
  },
  "limit": 20
}

Applications

POST/v1/applications

Create a new grant application

GET/v1/applications

List all your grant applications

Rate Limits

The API is rate limited to ensure fair usage and maintain service quality. Rate limits vary by plan tier.

PlanRequests/minuteRequests/day
Professional305,000
Enterprise6010,000
Enterprise PlusCustomCustom

Rate Limit Headers

X-RateLimit-Limit: The maximum number of requests allowed

X-RateLimit-Remaining: The number of requests remaining

X-RateLimit-Reset: The time when the rate limit resets (Unix timestamp)

Code Examples

Python

import requests

API_KEY = "your_api_key_here"
BASE_URL = "https://api.grantauthority.org/v1"

headers = {
    "Authorization": f"Bearer {API_KEY}",
    "Content-Type": "application/json"
}

# Search for grants
response = requests.post(
    f"{BASE_URL}/grants/search",
    headers=headers,
    json={
        "query": "healthcare grants for nonprofits",
        "limit": 10
    }
)

grants = response.json()
for grant in grants["data"]:
    print(f"{grant['title']} - {grant['agency']}")

JavaScript / Node.js

const axios = require('axios');

const API_KEY = 'your_api_key_here';
const BASE_URL = 'https://api.grantauthority.org/v1';

const headers = {
    'Authorization': `Bearer ${API_KEY}`,
    'Content-Type': 'application/json'
};

// Search for grants
async function searchGrants() {
    try {
        const response = await axios.post(
            `${BASE_URL}/grants/search`,
            {
                query: 'education technology grants',
                limit: 10
            },
            { headers }
        );

        response.data.data.forEach(grant => {
            console.log(`${grant.title} - ${grant.agency}`);
        });
    } catch (error) {
        console.error('Error:', error.response.data);
    }
}

searchGrants();

cURL

# List grants
curl "https://api.grantauthority.org/v1/grants?limit=10" \
  -H "Authorization: Bearer YOUR_API_KEY"

# Search grants
curl -X POST "https://api.grantauthority.org/v1/grants/search" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "query": "environmental conservation grants",
    "limit": 10
  }'

# Get specific grant
curl "https://api.grantauthority.org/v1/grants/grant_123456" \
  -H "Authorization: Bearer YOUR_API_KEY"

Error Codes

GrantAuthority.org uses conventional HTTP response codes to indicate the success or failure of an API request.

CodeDescription
200OK - Request succeeded
400Bad Request - Invalid parameters
401Unauthorized - Invalid API key
403Forbidden - API key lacks permissions
404Not Found - Resource doesn't exist
429Too Many Requests - Rate limit exceeded
500Internal Server Error

Need Help?

Have questions about the API? Our support team is here to help.