Get Services
-
Get It Done Online!
-
Find Government Jobs
-
Change of Address
Blog
-
News from our Blog
-
-
Find Government Agencies
-
All Government
-
Federal Government
-
State, Local, and Tribal
This documentation describes methods to use the Social Media Registry API to access the contents of the Social Media Registry.
The Social Media Registry is an official source of information about social media accounts that represent official U.S. federal government agencies, elected officials, or members of the President’s Cabinet.
If you work for the federal government and have a .gov or .mil e-mail address, you can register official U.S. federal accounts at HowTo.gov.
If you have questions about the Social Media Registry, please e-mail socialmediaregistry@gsa.gov.
The interface described here uses the same method URLs and parameters for all response formats, including HTML5, JSON, and XML. If no response format is specified at request time, the results are returned as HTML5 (with the assumption that a user is accessing the API via a web browser). To specify alternate formats, append the result format to the method call:
http://registry.usa.gov/accounts?agency_id=usda
http://registry.usa.gov/accounts.json?agency_id=usda
http://registry.usa.gov/accounts.xml?agency_id=usda
API requests can be called from remote sites via Javascript using the Cross-Origin Resource Sharing mechanism (CORS) supported in most browsers. All published API methods may be called from any domain.
If support for older browsers is required, JSON requests can be made with a callback parameter in order to return JSONP responses:
http://registry.usa.gov/accounts.json?agency_id=usda&callback=listaccounts
Some API methods are also available as feeds in the ATOM format. These feeds can be added to any news feed reader to list recent changes.
The ATOM format is an XML feed standard; each entry contains a summary of the Registry change and a link to the Registry API to view more information.
Feed Examples
List the most recently updated official Twitter accounts: http://registry.usa.gov/accounts.atom?service_id=twitter
List the most recently updated official accounts from the U.S. Department of Agriculture: http://registry.usa.gov/accounts.atom?agency_id=usda
List official U.S. government social media accounts entries in the registry. This method is also available as an ATOM feed.
Parameters
Output
Accounts
Example Calls
List all official accounts from the U.S. Department of Agriculture: http://registry.usa.gov/accounts?agency_id=usda
List all official Twitter accounts from the U.S. Department of Health and Human Services:
http://registry.usa.gov/accounts?service=twitter&agency_id=hhs
A synonym for the /accounts/verify method, using a canonical service and account ID provided by that method. For example, the service and account ID for http://twitter.com/JPL_Bear might be twitter/JPL_Bear, making the canonical URL take the form http://registry.usa.gov/accounts/twitter/JPL_Bear
This is provided primarily for REST-style browsing.
Check whether the provided URL is registered as an official government social media account.
Example: /accounts/verify?service_url=https%3A%2F%2Ftwitter.com%2F%23%21%2FJPL_Bear
Parameters
Output
(if verified is true:)
List the sponsoring agencies that may be specified in the /accounts/add method.
Parameters
Output
List the social media services that are currently supported in the /accounts/add method.
Parameters
Output
List tags that are suggested for describing an account.
Parameters
Output
The code for the Social Media Registry is open source and available on GitHub. It is written in Ruby.
By accessing the Social Media Registry API, you agree to our Terms of Service.
Page Last Reviewed or Updated: October 05, 2012