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/v1Authentication
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
/v1/grantsList all available grants with optional filters
Query Parameters
| Parameter | Type | Description |
|---|---|---|
limit | integer | Number of results (default: 20, max: 100) |
offset | integer | Pagination offset |
category | string | Filter by grant category |
min_amount | integer | Minimum grant amount |
max_amount | integer | Maximum grant amount |
Example Request
curl "https://api.grantauthority.org/v1/grants?limit=10&category=education" \
-H "Authorization: Bearer YOUR_API_KEY"/v1/grants/:idRetrieve 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"
}/v1/grants/searchSearch 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
/v1/applicationsCreate a new grant application
/v1/applicationsList 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.
| Plan | Requests/minute | Requests/day |
|---|---|---|
| Professional | 30 | 5,000 |
| Enterprise | 60 | 10,000 |
| Enterprise Plus | Custom | Custom |
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.
| Code | Description |
|---|---|
| 200 | OK - Request succeeded |
| 400 | Bad Request - Invalid parameters |
| 401 | Unauthorized - Invalid API key |
| 403 | Forbidden - API key lacks permissions |
| 404 | Not Found - Resource doesn't exist |
| 429 | Too Many Requests - Rate limit exceeded |
| 500 | Internal Server Error |
Need Help?
Have questions about the API? Our support team is here to help.