Overview

The GSA.gov content API is an XML feed which supplies the public with a means to extract data out of the GSA.gov website. When the API returns multiple content items, it list them with the newest item(s) first, and oldest last.

Back to top

Getting Started

To begin using this API, you will need to register for an API Key. You can sign up for an API key below. After registration, you will need to provide this API key in the x-api-key HTTP header with every API request.

Loading signup form...

Back to top

HTTP Header Name Description
x-api-key API key from api.data.gov. For sample purposes, you can use DEMO_KEY as an API key.

Back to top

API Description

This API has two primary endpoints:

Endpoint 1: https://api.gsa.gov/technology/gsa-content/v2/by-type/{type}

Description: Information by Content Type

Example: https://api.gsa.gov/technology/gsa-content/v2/by-type/event

Query String Parameters

Parameter Name Description
Content Types There are three options: Events - event; Topic Pages (meta data about GSA.gov web pages) - cmp_page; or Text Assets (snippets which display on pages of the site) - text_asset
Page Number Each page displays 25 items, to get more results, you can goto “page 2” by adding a /2 to the end of the URL, or “page 3” by adding a /3, etc.

Expected Result

Name Description
title The title of the content-item
type The content-type of the content-item
body A blob of text contained as the body of this content item
public_url The public URL for this content item on GSA.gov
navigation_title The Navigation-Title for this page
created A unix timestamp indicating when the content-item was created
last_updated A unix timestamp indicating when the content-item was last edited
content_id A numerical unique ID for this content item in this system
last_modified_by The user who last modified this content-item
owner A numerical identifier that indicates who owns this content in this system. This is a reference to another items content_id
poc A numerical identifier that indicates who the POC is for this content in this system. This is a reference to another items content_id
page_content_area A numerical identifier that indicates which content item is used as the main-body-area for this page
page_children A numerical identifier that indicates which pages are considered child-pages to this one
contacts A numerical identifier that indicates which individuals are considered to be reachable contacts related to this content
generic_contact A numerical identifier that indicates which group of individuals are considered to be reachable contacts related to this content
info_infoblock A numerical identifier that indicates which content item shall be used as a right-side-bar for this page
rotating_feature_block A numerical identifier that indicates which content item shall be used as slide-show on this page
expiration_date The date at which the page will expire on GSA.gov (in unix epoch time)

Endpoint 2: https://api.gsa.gov/technology/gsa-content/v2/by-id/{id}

Description: An individual piece of content based on its content ID.

Example https://api.gsa.gov/technology/gsa-content/v2/by-id/73

Query String Parameters

Name Description
title The title of the content-item
type The content-type of the content-item
body A blob of text contained as the body of this content item
created A unix timestamp indicating when the content-item was created
last_updated A unix timestamp indicating when the content-item was last edited
content_id A numerical unique ID for this content item in this system
author The user who last modified this content-item
owner A numerical identifier that indicates who owns this content in this system. This is a reference to another items content_id
owner A numerical identifier that indicates who the POC is for this content in this system. This is a reference to another items content_id

Back to top

OpenAPI Specification File

You can view the full details of this API in the OpenAPI Specification file available here: Open API specification file for the Sample API

Back to top

HTTP Response Codes

The API will return one of the following responses:

HTTP Response Code Description
200 Successful. Data will be returned in JSON format.
400 Bad request. Verify the query string parmaters that were provided.
403 API key is not correct or was not provided.
4XX Additional 400-level are caused by some type of error in the information submitted.

Back to top

Contact Us

If you have questions or need help, please email us at ocmweb@gsa.gov or file an issue in this GitHub issue tracker.

Back to top