Test your setup
Let's make sure everything is working with a simple test call.
Option A: Using cURL (Recommended for Beginners)
Open your terminal and copy and paste in and then run this command (replace YOUR_API_KEY_HERE with your actual key):
curl -X POST "https://api.simpler.grants.gov/v1/opportunities/search" \
-H "X-API-Key: YOUR_API_KEY_HERE" \
-H "Content-Type: application/json" \
-d '{
"pagination": {
"page_offset": 1,
"page_size": 5,
"sort_order": [
{
"order_by": "opportunity_id",
"sort_direction": "descending"
}
]
}
}'Option B: Using Postman
Create a new request:
Method:
POSTURL:
https://api.simpler.grants.gov/v1/opportunities/search
Add headers:
X-API-Key:YOUR_API_KEY_HEREContent-Type:application/json
Add request body (select "raw" and "JSON"):
Click Send
What Should Happen
If everything worked, you should see a response like this:
Congratulations You just made your first API call and retrieved grant opportunities!
Something not working as expected? Check out common issues & solutions.
Last updated
Was this helpful?