API

Getting started with the powerful HigherGov API

Access, Limits, and Pricing

All HigherGov subscriptions include access to the API and 10,000 records per month through the API. If you require more data, please contact us with your use case for pricing.

Endpoints

A list of available endpoints and fields is available in the OAS documentation. The OAS Documentation can also generate sample API calls by pressing the Try It Out button under each endpoint, selecting the desired Parameters, and pressing Execute.

We also offer APIs customized to your needs. Please contact us if you are interested in learning more.

Creating Keys

API keys can be managed when signed in by selecting the gear icon in the upper right and selecting API or by clicking here. Only an account administrator will have access to create keys. To create an API key, select the Generate Key button. Note that the full key will only be available on this screen once so make sure to copy and securely save the key.

Using the search_id Parameter

For the Opportunity, Federal Contract, and Federal Grant endpoints, HigherGov provides a search_id parameter that allows a HigherGov search to be easily converted into an API call. The search_id parameter does not accept all search fields, please see the endpoint documentation for a list of supported fields.

Example

If you have the below search in Federal Contract Opportunities:

You can take the searchID listed in the URL:

https://www.highergov.com/contract-opportunity/?searchID=2F6PPA1a7NAQ4C1OUh7XB

and use that in your API call as the search_id parameter:

https://www.highergov.com/api-external/opportunity/?api_key=your-api-key-here&search_id=2F6PPA1a7NAQ4C1OUh7XB&captured_date=2024-05-01&page_size=10&source_type=sam

Best Results

For best results with the search_id filter in the Opportunity endpoint, we recommend also using the source_type and captured_date filters to limit your call to the most relevant data source(s) and most recent dates.

Data Refresh Rate

Data is generally updated shortly after the underlying data source. Some examples are shown below.

EndpointData Update Frequency

Opportunity

20 Minutes

Federal Contract

Daily

Federal Grant

Daily

Awardee

Daily

Code Examples

Below are a few code snippets to get started accessing the API.

import requests
import json

# Define the Endpoint and Key
endpoint = 'https://www.highergov.com/api-external/contract/'
api_key = 'your-api-key-here'

#Define Parameters
params = {
    'api_key': api_key,
    'last_modified_date': '2023-07-06',
    'page_number': '1',
}

#Call API
response = requests.get(endpoint, params=params)

#Convert Response to JSON
data = response.json()
#print(json.dumps(data, indent=4))  # Print the JSON

#Loop through results
for result in data.get('results'):
    contract_award_id = result.get('award_id')
    ...

Last updated