REST API v1

OpenGrants API

Programmatic access to 14.8k+ grants, 19.7k+ contracts, and 4.8k+ funders. Build monitoring tools, CRM integrations, and custom search portals.

All systems operational
|
Data updated daily

API Key Auth

Bearer token authentication. Generate keys from your Developer Dashboard.

Unlimited Requests

Developer tier includes unlimited daily API calls with no throttling.

Webhooks

Get notified when new opportunities match your criteria via HTTP callbacks.

Authentication

All requests require a Bearer token in the Authorization header

curl -X GET 'https://qnoicxojartltrownmal.supabase.co/functions/v1/grants-api?search=education&status=open' \
  -H 'Authorization: Bearer YOUR_API_KEY'

API Playground

Test endpoints live. Paste your API key and configure parameters to see real responses.

GET
Code
curl -X GET \
  'https://qnoicxojartltrownmal.supabase.co/functions/v1/grants-api' \
  -H 'Authorization: Bearer YOUR_API_KEY'
Response

Enter your API key to get started

Endpoints

Grants

Search and filter grant opportunities with date ranges, funding amounts, and custom sorting.

GET/functions/v1/grants-api

Returns paginated list of grants with full filtering, sorting, and metadata.

ParameterTypeRequiredDescription
searchstringOptionalFull-text search across title and description
statusstringOptionalFilter by status: open, closed, upcoming
categorystringOptionalFilter by grant category name
deadline_afterstringOptionalISO date (YYYY-MM-DD). Only grants with deadline after this date
deadline_beforestringOptionalISO date (YYYY-MM-DD). Only grants with deadline before this date
posted_afterstringOptionalISO date (YYYY-MM-DD). Only grants created after this date
min_amountnumberOptionalMinimum funding amount (filters on amount_max)
max_amountnumberOptionalMaximum funding amount (filters on amount_min)
sort_bystringOptionalSort field: created_at, deadline_date, amount_min, amount_max, title
orderstringOptionalSort direction: asc or desc (default: desc)
count_onlybooleanOptionalIf true, returns only the total count matching filters
limitnumberOptionalResults per page (1-100, default: 20)
offsetnumberOptionalPagination offset (default: 0)
GET/functions/v1/grants-api/{id}

Returns a single grant with all available fields including categories and funder name.

ParameterTypeRequiredDescription
iduuidRequiredGrant UUID (path parameter)

Contracts

Access government contract opportunities with NAICS codes, set-aside filters, and geographic scope.

GET/functions/v1/contracts-api

Returns paginated list of contracts with all filters including NAICS and set-aside codes.

ParameterTypeRequiredDescription
searchstringOptionalFull-text search across title and description
statusstringOptionalFilter by status: open, closed
geographystringOptionalFilter by geographic scope
naicsstringOptionalFilter by 6-digit NAICS industry code
set_asidestringOptionalFilter by set-aside code (8A, HUBZone, etc.)
categorystringOptionalFilter by contract category name
deadline_afterstringOptionalISO date. Only contracts with deadline after this date
deadline_beforestringOptionalISO date. Only contracts with deadline before this date
posted_afterstringOptionalISO date. Only contracts created after this date
min_amountnumberOptionalMinimum funding amount
max_amountnumberOptionalMaximum funding amount
sort_bystringOptionalSort field: created_at, deadline_date, amount_min, amount_max, title
orderstringOptionalSort direction: asc or desc
count_onlybooleanOptionalReturns only the total count
limitnumberOptionalResults per page (1-100, default: 20)
offsetnumberOptionalPagination offset
GET/functions/v1/contracts-api/{id}

Returns a single contract with all fields including NAICS, set-aside code, and contact info.

ParameterTypeRequiredDescription
iduuidRequiredContract UUID (path parameter)

Funders

Look up funding organizations by name with sortable results.

GET/functions/v1/funders-api

Returns paginated list of funding organizations sorted alphabetically by default.

ParameterTypeRequiredDescription
searchstringOptionalSearch by funder name or summary
sort_bystringOptionalSort field: name, created_at
orderstringOptionalSort direction: asc or desc
count_onlybooleanOptionalReturns only the total count
limitnumberOptionalResults per page (1-100, default: 20)
offsetnumberOptionalPagination offset
GET/functions/v1/funders-api/{id}

Returns a single funder profile including website and summary.

ParameterTypeRequiredDescription
iduuidRequiredFunder UUID (path parameter)

Response Schema

List Response Wrapper

interface ListResponse<T> {
  results: T[];
  pagination: {
    total: number;
    limit: number;
    offset: number;
    returned: number;
  };
  meta: {
    response_time_ms: number;
    sort_by: string;
    order: "asc" | "desc";
  };
}

Grant Object

interface Grant {
  id: string;               // UUID
  title: string;
  description: string;
  amount_min: number | null;
  amount_max: number | null;
  deadline_date: string | null; // ISO date
  status: string;
  geography: string | null;
  funder_id: string;
  funder_name: string;
  listing_url: string | null;
  created_at: string;       // ISO datetime
  categories: string[];
}

Contract Object

interface Contract {
  id: string;
  title: string;
  description: string;
  amount_min: number | null;
  amount_max: number | null;
  deadline_date: string | null;
  status: string;
  geography: string | null;
  document_url: string | null;
  listing_url: string | null;
  naics: string | null;
  primary_contact_email: string | null;
  set_aside_code: string | null;
  funder_id: string;
  funder_name: string;
  created_at: string;
  categories: string[];
}

Status Codes

200OKRequest succeeded
400Bad RequestInvalid parameters
401UnauthorizedMissing or invalid API key
403ForbiddenSubscription tier does not include API access
404Not FoundResource not found (single record lookup)
429Rate LimitedDaily request quota exceeded
500Server ErrorInternal error - contact support if persistent

Rate Limiting

Developer tier includes unlimited API requests. All responses include rate limit headers:

X-RateLimit-Limit

Your daily request quota (-1 for unlimited)

X-RateLimit-Remaining

Requests remaining until midnight UTC reset

Webhooks

Subscribe to events and receive HTTP POST callbacks when new opportunities are added or updated. Manage webhooks from your Developer Dashboard.

Available Events

grant.createdgrant.updatedgrant.deadline_approachingcontract.createdcontract.updatedcontract.deadline_approachingfunder.createdfunder.updated

Signature Verification

Each delivery includes an X-OpenGrants-Signature header containing an HMAC-SHA256 signature of the payload using your webhook secret.

const crypto = require('crypto');

function verifySignature(payload, signature, secret) {
  const expected = 'sha256=' + crypto
    .createHmac('sha256', secret)
    .update(JSON.stringify(payload))
    .digest('hex');
  return crypto.timingSafeEqual(
    Buffer.from(signature),
    Buffer.from(expected)
  );
}

Ready to integrate?

Get started with a Developer subscription for full API access, webhooks, and unlimited requests.

Download OpenAPI Spec