Login

Factual Blog /

Rest Easy, Factual's Hotels Data Just Got Even Better

To me, the most fun thing in the world is working with big data. But the second most fun thing? That has to be road trips.

And luckily for me, I have one coming up this Summer that I’m really excited about, too. My girlfriend and I will be driving up to Sea Ranch, CA to attend one of our best friends’ wedding.

But that means we’ll have to find lodging, and that’s not such a fun thing. Figuring out where to stay is stressful and difficult: where are the nearest hotels on our route? Which will work best for us?

Fortunately, we’ve been cooking on a solution to that problem here at Factual: a brand-spanking-new update to our Hotels Extended Attributes set. This update to Hotels is a significant release: Hotels v3 has 145k hotels versus 98k in our previous Hotels release. Additionally, like our Restaurants and Doctors data, it is perfectly synchronized against our core US Places data. Which is all to say this release is great news for App Developers, Hotel Nerds, and Data Enthusiasts alike!

So: I’m looking for a Bed and Breakfast near Carmel, CA. That search is a total cinch with the Factual API:

http://api.v3.factual.com/t/hotels-v3?filters=
  {
    "$and":
    [
      {"locality":{"$eq":"Carmel"}},
      {"type":{"$includes":"B&B"}},
      {"region":{"$eq":"CA"}}
    ]
  }

Note: I’ve omitted URL-encoding for clarity. In practice, your query will look more like this. You can run me in Apigee.

And what if we want to treat ourselves to something fancy before we head out – a five star hotel with a rating above 4.0 in downtown Los Angeles. Well, that’s easy too:

http://api.v3.factual.com/t/hotels-v3?filters=
  {
    "$and":
    [
      {"locality":{"$eq":"los angeles"}},
      {"neighborhood":{"$includes":"Downtown"}},
      {"stars":{"$eq":5}},
      {"rating":{"$gt":4.0}}
    ]
  }

See me run!

Still, what I really want is a hotel with an outdoor pool in Ojai. And it better be pet-friendly, in case Nieco the dog wants in on this trip (this shouldn’t surprise you by now, but that’s easy, too):

http://api.v3.factual.com/t/hotels-v3?filters=
  {
    "$and":
    [
      {"locality":{"$eq":"Ojai"}},
      {"pool":{"$includes":"Outdoor"}},
      {"region":{"$eq":"CA"}},
      {"pets":{"$includes":true}}
    ]
  }

See me swim!

Starting, well, now, you can access the beta Hotels v3 data at /t/hotels-v3. To help you transition, we’re keeping our older hotel data available at /t/hotels-v2 and (during a transitional period) at the existing canonical endpoint of /t/hotels-us for the sake of existing apps. Starting in June, we’ll be pointing the canonical endpoint at the v3 data, so make sure you’ve transitioned to the new schema by then!

Yours in data,
Ben Coppersmith
Software Engineer

Interested in Global Places?
Learn More