API

Updated 9/17/2025 See our OpenAPI docs for most recent changes.

API Gateway Developer Guide

Overview

The Simpler Grants API Gateway provides developers with programmatic access to search federal grant opportunities through a RESTful API. This guide walks you through generating an API key via our web interface and integrating with your applications to search for funding opportunities.

Getting Started

Are you looking for more guidance? Check out our full API tutorial to get started creating applications that leverage the Simpler.Grants.gov API.

Prerequisites

  • A user account on the Simpler Grants platform

  • Basic understanding of REST APIs and HTTP requests

  • Access to make HTTP requests from your application

Step 1: Generate Your API Key

  1. Log into the Platform

    • Navigate to the Simpler Grants website

    • Sign in with your Login.gov credentials

  2. Access the API Dashboard

    • Go to the developer page under the community dropdown or via this link

    • Click "Manage API Keys" after reading through the developer page.

  3. Create a New API Key

    • Click "Create API Key"

    • Provide a descriptive name for your key (e.g., "My Grant Search App")

    • Click "Create API Key" to create the key

Step 2: API Authentication

All API requests must include your API key in the X-API-Key header:

X-API-Key: YOUR_API_KEY_HERE

API Endpoints

Base URL

  • Production: https://api.simpler.grants.gov

  • Development: Contact support for development endpoints

Core Endpoints

Search opportunitiesExtracts

Common Issues

  1. Invalid API Key

    • Ensure key is included in X-API-Key header

    • Verify key is active and not expired

    • Check for typos in the key

  2. Request Format Errors

    • Ensure Content-Type: application/json header

    • Validate JSON syntax

    • Check required fields (pagination is required)

  3. Parameter Validation

    • page_size must be between 1 and 100

    • Date formats must be YYYY-MM-DD

    • Enum values must match exactly (case-sensitive)

Best Practices

Rate Limiting

  • The API implements rate limiting to ensure fair usage

  • If you receive 429 responses, implement exponential backoff

  • Consider caching results to reduce API calls

  • If you are searching all opportunities then use the extracts endpoint

Efficient Searching

  • Use specific filters to reduce result sets

  • Implement pagination for large result sets

  • Consider using CSV format for bulk data downloads

Security

  • Never expose API keys in client-side code

  • Store keys securely using environment variables

  • Rotate keys periodically

  • Use HTTPS for all requests

Error Handling

  • Always check HTTP status codes

  • Implement retry logic with backoff for transient errors

  • Log errors for debugging but don't expose sensitive information

Example Use Cases

Build a dashboard that shows relevant opportunities based on user preferences:

def get_relevant_grants(user_interests, applicant_type):
    filters = {
        "opportunity_status": {"one_of": ["posted", "forecasted"]},
        "applicant_type": {"one_of": [applicant_type]}
    }
    
    # Search for each interest area
    all_opportunities = []
    for interest in user_interests:
        payload = {
            "query": interest,
            "filters": filters,
            "pagination": {"page_offset": 1, "page_size": 10}
        }
        # Make API call and collect results
        opportunities = search_opportunities(payload)
        all_opportunities.extend(opportunities)
    
    return deduplicate_opportunities(all_opportunities)

Support and Resources

Getting Help

  • Documentation: Check this guide and the OpenAPI documentation

  • Issues: Report bugs or request features through the appropriate channels

  • Community: Join developer discussions and share experiences

Additional Resources


Note: This API is under active development. Please refer to the latest documentation and release notes for the most current information. We welcome feedback and contributions from the developer community.

Last updated

Was this helpful?