Home Link About The Data Contact Us
Masthead: Home Link  

Printer friendly display link PRINTER-FRIENDLY


API Documentation

General Information

OMB Watch is pleased to announce the availability of fedspending.org data in an Application Programming Interface (API). This API is intended for non-commercial use only; you should not use it if you charge anyone to access your site. In addition, parent company identification information for contractors is data provided by Eagle Eye Publishing, and should not be bulk copied and resold.

The API consists of two methods, fpds.php and faads.php, that allow access to the data to the Federal contracts and Federal assistance databases respectively. All data present on fedspending.org is available through the API, except for pie charts and end-of-search totals.

To call the API., prefix the methods below with "http://www.fedspending.org/fpds/" for contracts or "http://www.fedspending.org/faads/" for assistance. i.e.

Summary for contracts for the state of Alabama:
http://www.fedspending.org/fpds/fpds.php?datype=X&detail=-1&state=AL

List of assistance transactions to entities with "Smith" in their name for FY 2006:
http://www.fedspending.org/faads/faads.php?datype=X&detail=2&recipient_name=Smith&fiscal_year=2006

Methods

Important: API calls will retrieve a maximum of 1000 records per call, in order to save bandwidth. Please don't attempt to retrieve large subsections of the database through repeated calls to the API.

The two links below show how to retrieve data in XML through API calls:

fpds.php

faads.php

Sample Mashup

A sample mashup as well as a brief tutorial can be found here.

XML Formats

The XML format will vary by the level of detail: detail = -1 (summary) will produce different output than detail = 4 (complete). The XML formats will hopefully be fairly self explanatory; for meanings of specific data fields, consult the data dictionary. There are also format examples within the two methods pages linked above.