Description
FCC.gov uses the Drupal Content API Module to make hundreds of thousands of Commission documents available to the public, in addition to all of the content on FCC.gov. Drupal developers can use the module on their own site to publish all of the site's content without any programming.The Drupal Content API Module is completely dynamic, publishing your content as an API even as your site structure and content changes. The module is integrated with CCK and will discover new fields when added, and provides granular permissions.
The module makes the following query parameters searchable:
- type
- title
- author
- content fields
- relationship (including taxonomy term)
Why We Provide It
Organizing, searching and finding important content in the volume of documents which are published by the Commission is a daunting task. The Content API module makes your content accessible to any application or platform, while leveraging Drupal’s strengths as a content management system. Encouraging the ability to easily publish content to multiple applications and devices promotes transparency and accessibility.Usage Documentation
FCC.gov’s content is accessible via the Content API. All content can be accessed at http://fcc.gov/api/content.jsonOutput formats
Support for json and jsonpjsonp: add .jsonp and a callback=[function] parameter. If no callback parameter is passed, regular json will be returned.
Accessing Content
Call: /api/content.json
/api/content/id.json
Description: query content using various parameter filters
Parameters:
Searches content titles for the input string.
Returns all content items with “broadband” in the title
type
Search content by type. Alternative format is types[]=[type] to return multiple types.
Returns all blog posts.
Available types:
- edoc (Official Document)
- event
- blog_post
- article (Encyclopedia article)
- page
- guide
- help
- map
- report
- proceeding (Rulemaking)
- topic
- video
- working_paper
terms
Search content by categorization terms.
Bureaus and Offices
|
|
EDOC terms
|
|
Topics
|
|
Query Parameters
- terms[]=[term id]
- Search for content based on specific term IDs. A list of the available terms can be found in the Edoc Terms and Bureaus and Offices sections above.
- Example Request for “Administrative Law Judges” content
- Example Return
- [{"count":"12","pages":1,"itemsPerPage":10,"currentPage":0},{"nid":"37043","title":"Initial Decision of Chief ALJ Sippel","created":"2011-12-20","changed":"2011-12-21","type":"edoc","webUrl":"http:\/\/www.fcc.gov\/document\/initialdecision-chief-aljsippel","uri":"http:\/\/www.fcc.gov\/api\/content\/37043"},...]
- topics[]=[topic id]
- Search for content based on specific topic IDs. A list of available topics can be found in the Topics section above.
- Example Request for Broadband Content
- Example Return
- [{"count":"623","pages":62,"itemsPerPage":10,"currentPage":0},{"nid":"37071","title":"Open Internet Workshops and Speeches","created":"2011-12-21","changed":"2011-12-21","type":"article","webUrl":"http:\/\/www.fcc.gov\/encyclopedia\/openinternet-workshops-andspeeches","uri":"http:\/\/www.fcc.gov\/api\/content\/37071"},...]
- title=[title]
- Exact title search. For this to work, you must know the exact title of the piece(s) of content you want to retrieve.
- Example Request for “Open Internet Workshop and Speeches”
- Example Return
- [{"count":"1","pages":0,"itemsPerPage":10,"currentPage":0},{"nid":"37071","title":"Open Internet Workshops and Speeches","created":"2011-12-21","changed":"2011-12-21","type":"article","webUrl":"http:\/\/www.fcc.gov\/encyclopedia\/openinternet-workshops-andspeeches","uri":"http:\/\/www.fcc.gov\/api\/content\/37071"}]
- created_before=[YYYY-MM-DD] (inclusive)
- Search for content created before the specified date
- Example Request for content created before December 1, 2011
- Example Return
- [{"count":"19174","pages":1917,"itemsPerPage":10,"currentPage":0},{"nid":"36717","title":"FCC Workshops on the Telephone","created":"2011-11-30","changed":"2011-12-01","type":"edoc","webUrl":"http://www.fcc.gov/document/fcc-workshopstelephone","uri":"http://www.fcc.gov/api/content/36717"},...]
- created_after=[YYYY-MM-DD]
- Search for content created after the specified date
- Example Request for content created after December 1, 2011
- Example Return
- [{"count":"308","pages":30,"itemsPerPage":10,"currentPage":0},{"nid":"37071","title":"Open Internet Workshops and Speeches","created":"2011-12-21","changed":"2011-12-21","type":"article","webUrl":"http://www.fcc.gov/encyclopedia/openinternet-workshops-andspeeches","uri":"http://www.fcc.gov/api/content/37071"},...]
- changed_before=[YYYY-MM-DD]
- Search for content changed before a specified date
- Example Request for content changed before December 1, 2011
- Example Return
- [{"count":"19482","pages":1948,"itemsPerPage":10,"currentPage":0},{"nid":"37071","title":"Open Internet Workshops and Speeches","created":"2011-12-21","changed":"2011-12-21","type":"article","webUrl":"http://www.fcc.gov/encyclopedia/openinternet-workshops-andspeeches","uri":"http://www.fcc.gov/api/content/37071"},...]
- changed_after=[YYYY-MM-DD]
- Search for content changed after a specified date
- Example Request for content changed after December 1, 2011
- Example Return
- [{"count":"19482","pages":1948,"itemsPerPage":10,"currentPage":0},{"nid":"37071","title":"Open Internet Workshops and Speeches","created":"2011-12-21","changed":"2011-12-21","type":"article","webUrl":"http://www.fcc.gov/encyclopedia/openinternet-workshops-andspeeches","uri":"http://www.fcc.gov/api/content/37071"},...]
- limit=[limit]
- Limit the total number of results shown on each page of results. There can be a maximum number of results returned to the user set by an administrator. Unless this parameter is specified, 10 results will be returned.
- Example Request with 50 results
- Example Return
- [{"count":"19482","pages":389,"itemsPerPage":50,"currentPage":0},{"nid":"37071","title":"Open Internet Workshops and Speeches","created":"2011-12-21","changed":"2011-12-21","type":"article","webUrl":"http://www.fcc.gov/encyclopedia/openinternet-workshops-andspeeches","uri":"http://www.fcc.gov/api/content/37071"},...]
- page=[page]
- Results page to return.
- Example Request for page 1900
- Example Return
- [{"count":"19482","pages":1948,"itemsPerPage":10,"currentPage":1900},{"nid":"17687","title":"Spectrum Task Force Poised to Drive the Implementation of the National Broadband Plan's Spectrum Agenda","created":"2010-04-26","changed":"2011-04-05","type":"blog_post","webUrl":"http:\/\/www.fcc.gov\/blog\/spectrumtask-force-poised-drive-implementation-national-broadband-plans-spectrumagenda","uri":"http:\/\/www.fcc.gov\/api\/content\/17687"},...]
Field Queries
- You can query for any field by using field_[field name]=[value]
Example:
This will return all content where the author’s job title is “Managing Director”
[{"count":"7","pages":0,"itemsPerPage":10,"currentPage":0},{"nid":"37030","title":"Introducing MyFCC Beta","created":"2011-12-20","changed":"2011-12-20","type":"blog_post","webUrl":"http:\/\/www.fcc.gov\/blog\/introducing-myfccbeta","uri":"http:\/\/www.fcc.gov\/api\/content\/37030"},
Other Parameters
- fields=all -- displays all node fields, including body, topics, taxonomy, cck fields etc.
For proceedings, related edocs and comments can be returned with the following parameters:
- edocs=true
- comments=true
Example: http://fcc.gov/api/content.json?type=proceeding&edocs=true&comments=true
This will return related commission documents as well as publicly filed comments
To get major topics, call http://fcc.gov/api/content.json?major_topics=true
- major_topics=true
Available Types
The types parameter consists of the following options:
- edoc (Official Document)
- event
- blog_post
- article (Encyclopedia article)
- page
- guide
- help
- map
- report
- proceeding (Rulemaking)
- topic
- video
- working_paper
Gotcha-yas
The first result in any query contains count and page values. The count is how many items match your query, and the page is how many pages exist with your current limit parameter. Pagination starts at 0
{
"count":"19174",
"pages":1917,
"itemsPerPage":10,
"currentPage":0
}
… actual node results ...