Health Facility Certification Information API

This featured Application Programming Interface (API) page serves as a reference for developers who are building tools that interact with the data on Health Data NY. The page provides examples on how to retrieve data from each of the fields within the dataset. A description of each field is also provided. This specific API page is for the Health Facility Certification Information dataset. The dataset contains information on certifications for services and beds for Article 28, Article 36 and Article 40 health care facilities and programs from the Health Facilities Information System (HFIS). Article 28 facilities are hospitals, nursing homes, and diagnostic treatment centers. Article 36 facilities are certified home health care agencies and long term home health care programs. Article 40 facilities are hospices. The dataset currently only contains data on hospitals and hospital extension clinics. This dataset is available at: https://health.data.ny.gov/Health/Health-Facility-Certification-Information/2g9y-7kqm. For more information, go to the dataset and look in the "About" section.

Getting Started

All communication with the API is done through HTTPS, and errors are communicated through HTTP response codes. Available response types include JSON, XML, and CSV, which are selectable by the "extension" on API requests or by HTTP Accepts headers.

This documentation also includes inline, runable examples. Click on any link that contains a gear symbol next to it to run that example live against the Health Facility Certification Information API API.

App Tokens

All requests should include an app token that identifies your application, and each application should have its own unique app token. A limited number of requests can be made without an app token, but they are subject to much lower throttling limits than request that do include one. If you don't have an app token yet, click the button to the right to sign up for one.

Once you have an app token, you can include it with your request either by using the X-App-Token HTTP header, or by passing it via the $app_token parameter on your URL.

Response Codes

One of the following response codes will be returned with every request:

  1. 200Successful request.
  2. 202Request processing. You can retry your request, and when it's complete, you'll get a 200 instead.
  3. 400Bad request
  4. 401Unauthorized. You're not authorized to access this resource.
  5. 404Not found. The resource requested doesn't exist.
  6. 429Too Many Requests. The client has made too many requests and is currently being rate limited.
  7. 500Server errors. Our bad!

Code Samples

#!/usr/bin/env ruby

require 'net/https'
uri = URI('https://health.data.ny.gov/resource/health-facility-certification-information.json?recall_id=94')

http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_PEER

request = Net::HTTP::Get.new(uri.request_uri)
request.add_field('X-App-Token', ARGV[0])

response = http.request(request)
puts response.code
puts response.body
#!/usr/bin/env python

import sys
import requests

r = requests.get('https://health.data.ny.gov/resource/health-facility-certification-information.json?recall_id=94', headers={'X-App-Token': sys.argv[1]})
print r.status_code
print r.text
request = require 'request'
options = uri: 'https://health.data.ny.gov/resource/health-facility-certification-information.json?$$app_token=APP_TOKEN&recall_id=94'
request options, (err, response, body) ->  console.log body
#!/bin/sh 

curl --header "X-App-Token: $1" "https://health.data.ny.gov/resource/health-facility-certification-information.json?recall_id=94"

Fields

The following fields are available on the Health Facility Certification Information API API.

fac_id

Human Name: Facility ID
Type: number
Site specific facility identification number

Examples

Retrieve all records with fac_id equal to 9825:

Retrieve all records where fac_id is within 1 kilometer of Seattle, WA (47.598177,-122.33448):

https://health.data.ny.gov/resource/health-facility-certification-information.json?$where=within_circle(fac_id, 47.598177,-122.33448, 1000)

primary_nam

Human Name: Facility Name
Type: text
Current facility name

Examples

Retrieve all records with primary_nam equal to Your Choice at Home, Inc.:

Retrieve all records where primary_nam is within 1 kilometer of Seattle, WA (47.598177,-122.33448):

https://health.data.ny.gov/resource/health-facility-certification-information.json?$where=within_circle(primary_nam, 47.598177,-122.33448, 1000)

description

Human Name: Description
Type: text
Type of facility.

Examples

Retrieve all records with description equal to School Based Primary Care Hospital - Critical Access Extension Clinic:
Retrieve all records with description equal to School Based Primary Care Hospital - Critical Access Extension Clinic:

Retrieve all records that are greater than Adult Day Health Care Program - Offsite:

Retrieve all records with description equal to School Based Primary Care Hospital - Critical Access Extension Clinic:

Retrieve all records where description is within 1 kilometer of Seattle, WA (47.598177,-122.33448):

https://health.data.ny.gov/resource/health-facility-certification-information.json?$where=within_circle(description, 47.598177,-122.33448, 1000)

fac_desc_short

Human Name: Short Description
Type: text
Abbreviated name for type of facility.

Examples

Retrieve all records with fac_desc_short equal to null:

Retrieve all records where fac_desc_short is within 1 kilometer of Seattle, WA (47.598177,-122.33448):

https://health.data.ny.gov/resource/health-facility-certification-information.json?$where=within_circle(fac_desc_short, 47.598177,-122.33448, 1000)

attribute_type

Human Name: Attribute Type
Type: text
BED OR SERVICE.

Examples

Retrieve all records with attribute_type equal to Service:

Retrieve all records where attribute_type is within 1 kilometer of Seattle, WA (47.598177,-122.33448):

https://health.data.ny.gov/resource/health-facility-certification-information.json?$where=within_circle(attribute_type, 47.598177,-122.33448, 1000)

attribute_value

Human Name: Attribute Value
Type: text
BED OR SERVICE NAME.

Examples

Retrieve all records with attribute_value equal to Yates:

Retrieve all records where attribute_value is within 1 kilometer of Seattle, WA (47.598177,-122.33448):

https://health.data.ny.gov/resource/health-facility-certification-information.json?$where=within_circle(attribute_value, 47.598177,-122.33448, 1000)

measure_value

Human Name: Measure Value
Type: number
COUNT OF BED OR SERVICE UNIT.

Examples

Retrieve all records with measure_value equal to 1572:

Retrieve all records where measure_value is within 1 kilometer of Seattle, WA (47.598177,-122.33448):

https://health.data.ny.gov/resource/health-facility-certification-information.json?$where=within_circle(measure_value, 47.598177,-122.33448, 1000)

sub_type

Human Name: Sub Type
Type: text
TEMPORARY OR PERMANENT.

Examples

Retrieve all records with sub_type equal to Processing Stations:

Retrieve all records where sub_type is within 1 kilometer of Seattle, WA (47.598177,-122.33448):

https://health.data.ny.gov/resource/health-facility-certification-information.json?$where=within_circle(sub_type, 47.598177,-122.33448, 1000)

county

Human Name: County
Type: text
County where facility is located.

Examples

Retrieve all records with county equal to Yates:

Retrieve all records where county is within 1 kilometer of Seattle, WA (47.598177,-122.33448):

https://health.data.ny.gov/resource/health-facility-certification-information.json?$where=within_circle(county, 47.598177,-122.33448, 1000)

regional_office

Human Name: Regional Office
Type: text
Name of NYSDOH Regional Office for facility.

Examples

Retrieve all records with regional_office equal to Western Regional Office - Rochester:
Retrieve all records with regional_office equal to Western Regional Office - Rochester:

Retrieve all records where regional_office is within 1 kilometer of Seattle, WA (47.598177,-122.33448):

https://health.data.ny.gov/resource/health-facility-certification-information.json?$where=within_circle(regional_office, 47.598177,-122.33448, 1000)

effective_date

Human Name: Effective Date
Date the attribute became effective.

Examples

Retrieve all records with effective_date equal to 2015-08-14T00:00:00:

Retrieve all records where effective_date is within 1 kilometer of Seattle, WA (47.598177,-122.33448):

https://health.data.ny.gov/resource/health-facility-certification-information.json?$where=within_circle(effective_date, 47.598177,-122.33448, 1000)