Description

This API returns the US Census Bureau Census Block number (aka the 15 character FIPS Code) given a passed Latitude and Longitude. The API also returns the US State and County name associated with the Block.

Why We Provide It

Just about every major dataset in the US Federal Government uses some form of Census geography. The lowest level of that geography is the Census Block. This geography is highly nested, such that removing coded values from the right hand site aggregates to the next highest geography (e.g. from block to tract, and from tract to County). Providing this search allows developers to build applications which foster connectivity from their individual location to the full array of federal databases based on census geography.

Web Application Description Language (WADL)

Endpoint - http://data.fcc.gov/api/block/application.wadl

WADL Content

<application>
  <doc jersey:generatedBy="Jersey: 1.0.2 02/11/2009 07:45 PM"/>
   <resources base="http://data.fcc.gov:80/block/">
    <resource path="">
    <resource path="find">
     <method name="GET" id="findBlockByCoordinates">
      <request>
       <param type="xs:double" style="query" name="latitude"/>
       <param type="xs:double" style="query" name="longitude"/>
       <param type="xs:string" style="query" name="format"/>
       <param type="xs:string" style="query" name="jsoncallback"/>
      </request>
      <response>
       <representation mediaType="application/x-javascript"/>
       <representation mediaType="application/json"/>
       <representation mediaType="application/xml"/>
      </response>
     </method>
    </resource>
   </resource>
  </resources>
</application>

Census Block Method Call

  • find

    api call
    http://data.fcc.gov/api/block/find?latitude=<parameter1>&longitude=<parameter2>
    sample call
    http://data.fcc.gov/api/block/find?latitude=40.0&longitude=-85
    parameters
    • latitude – Latitude of the point
    • longitude – Longitude of the point
    response
    JSONP
    callback({"@executionTime":"0.184","@status":"OK","Block":{"FIPS":"181770103002004","CountyName":"Wayne","StateName":"Indiana"}})
    JSON
    {
     "@executionTime": "0.172",
     "@status": "OK",
    "Block": {
     "FIPS": "181770103002004",
     "CountyName": "Wayne",
     "StateName": "Indiana"
     }
    }
    XML
    <Response executionTime="0.047" status="OK" xmlns="http://data.fcc.gov/api">
     <Block>
      <FIPS>181770103002004</FIPS>
      <CountyName>Wayne</CountyName>
      <StateName>IN</StateName>
     </Block>
    </Response>
    Error Response

    In case there is any exception on the server side it is caught and the http status code 500 is returned. (INTERNAL SERVER ERROR). The status description contains the detailed reason for the failure.