Search API
The search API allows developers to query against the Utah.gov indexed database. Use this to pull all or any of our various types and categories. The following document outlines sample sample code, parameters, and a type and category legend for making your queries.
Parameters
- keyword
-
categoryIds
You can pass multiple category ids. For example, to get data back for 'Health' and 'Hospitals & Medical Care' you would pass: '16,61'. See below for a complete list of category ids.
-
typeIds
See below for a complete list of type ids.
- limit
Sample Query
curl -H "Accept:application/json" "http://www.utah.gov/masterindex/search.json?keyword=oil&typeIds=17&categoryIds=12&limit=50"
This query pulls all the CSV files (typeIds 17) that match the category of Environmental Protection (categoryIds 12) and include the keyword "oil" and limits the results to 50.
Sample Result (jSON)
{
"results":[
{
"agencies":[
],
"categories":[
"Environmental Protection"
],
"description":"Utah Refinery Receipts of Crude Oil by State of Origin, 1960-2008",
"governmentClass":"state",
"imageName":"",
"name":"Utah Refinery Receipts of Crude Oil",
"type":"CSV",
"url":"http://geology.utah.gov/emp/energydata/oildata.htm"
},
{
"agencies":[
],
"categories":[
"Environmental Protection"
],
"description":"Soil sampling data from across the state of Utah.",
"governmentClass":"state",
"imageName":"",
"name":"Utah Core Research Sample Catalog",
"type":"CSV",
"url":"http://geology.utah.gov/emp/ucrc/ucrcfullcatalogue_13Jan09.txt"
}
],
"topAgency":"Department of Natural Resources",
"totalCount":2
}
Types
| ID | Name |
|---|---|
| 2 | Online Application |
| 35 | Data Viewer |
| 3 | Notification Service |
| 48 | Search Tool |
| 15 | Data |
| 17 | CSV |
| 18 | KMZ |
| 19 | SHP |
| 16 | XML |
| 49 | Form |
| 50 | Offline Form |
| 7 | Blog |
| 20 | RSS Feed |
| 5 | Website |
| 6 | Wiki |
| 33 | ESRI Map |
| 32 | GIS Map |
| 25 | Media |
| 28 | Audio Podcast |
| 42 | Flickr |
| 43 | |
| 46 | Scribd |
| 30 | Slideshare |
| 47 | Soundcloud |
| 29 | Video Podcast |
| 37 | Android App |
| 38 | Blackberry App |
| 36 | iPhone App |
| 14 | Tablet App |
| 45 | iPad App |
| 24 | |
| 22 | GooglePlus |
| 44 | |
| 23 | |
| 34 | YouTube |
Categories
| ID | Name |
|---|---|
| 2 | Agriculture and Food Production |
| 54 | Business |
| 4 | Business and Commerce |
| 52 | Citizen |
| 59 | Community |
| 6 | Communications |
| 8 | Education |
| 57 | Higher Education |
| 58 | Public Education |
| 10 | Energy and Utilities |
| 12 | Environmental Protection |
| 14 | Government |
| 60 | Legislature |
| 16 | Health |
| 61 | Hospitals & Medical Care |
| 18 | History and Culture |
| 20 | Housing and Community Development |
| 22 | Human Services and Social Programs |
| 24 | Industry and Technology |
| 26 | Jobs, Employment, and Occupations |
| 28 | Laws and Regulations |
| 30 | Legal Services and Courts |
| 32 | Natural Resources |
| 34 | Public Safety and Corrections |
| 36 | Recreation and Tourism |
| 38 | Taxes and Government Revenu |
| 40 | Transportation and Motor Vehicles |
| 42 | Voting and Elections |
General Note
All of our APIs are accessible with all server side programming languages. JavaScript requests will not work.