← Back to API Ninjas
Get hospital data based on given parameters
Returns US hospitals matching a name, city, state, ZIP code, county or latitude/longitude bounding box, with location, contact information and bed count.
API Ninjas·$0.001 per call
Example code
// Using @orth/sdk - The simplest way to call APIs
// Install: npm install @orth/sdk
import Orthogonal from "@orth/sdk";
const orthogonal = new Orthogonal({
apiKey: process.env.ORTHOGONAL_API_KEY,
});
const output = await orthogonal.run({
api: "api-ninjas",
path: "/v1/hospitals"
});
console.log(output);Query parameters
name
string
Name of the hospital to search for. Supports partial matching.
city
string
City where the hospital is located.
state
string
State where the hospital is located.
zipcode
string
ZIP code of the hospital location.
county
string
County where the hospital is located.
min_latitude
number
Minimum latitude coordinate.
max_latitude
number
Maximum latitude coordinate.
min_longitude
number
Minimum longitude coordinate.
max_longitude
number
Maximum longitude coordinate.
limit
number
Number of results to return. Default is 5. Maximum is 100. (Default: 5)
offset
number
Number of results to skip. Default is 0. (Default: 0)