Our RSS feeds are in RSS version
1.0 format. Our intention is to eventually move everyone over to
using our REST API rather than using
these feeds, but they are not going away any time soon.
Most of the interesting content is provided via our custom RSS module,
mod_regveg. When we talk about an "entry" in
describing the elements this module defines, we are referring to a
single database entry such as a restaurant, grocery, cofee shop, etc.
If you retrieve a location that contains other locations, then the
feed will contain all the entries for that location and the locations
it contains. For example, the feed for New York
City contains all the entries
for Manhattan,
Brooklyn, etc.
Feeds with more than
500
entries are too large to generate dynamically, so these feeds are
generated once per day.
Each <item> element will represent a single
entry. The item's rdf:about attribute (and
it's link element) will be a link to the main page
for that item. The item's title element will be the
entry's name. The item's description element will
contain a short description for the entry (no more than 255
characters).
The mod_regveg module defines the following <item>
elements:
- <regveg:long-description> (#CDATA) - A long
description for the entry. This may contain HTML.
- <regveg:phone> (#PCDATA) - Entry's phone number. The exact
format of this phone number varies by region.
- <regveg:address1> (#PCDATA) - Entry's address.
- <regveg:address2> (#PCDATA) - Additional address info for
the entry.
- <regveg:neighborhood> (#PCDATA) - Entry's neighborhood.
- <regveg:directions> (#PCDATA) - Directions to the entry.
- <regveg:city> (#PCDATA) - Entry's city.
- <regveg:region> (#PCDATA) - Entry's state/province/region.
- <regveg:postal-code> (#PCDATA) - Entry's postal (zip) code.
- <regveg:country> (#PCDATA) - Entry's country.
- <regveg:latitude> (#PCDATA) - Entry's latitude.
- <regveg:longitude> (#PCDATA) - Entry's longitude.
- <regveg:home-page> (#PCDATA) - An external link for
the entry, which will usually be that entry's website.
- <regveg:average-rating> float - Average rating for
the entry. This may not be included if the entry has not yet been
rated.
- <regveg:rating-count> integer - Number of ratings
for the entry. This may not be included if the entry has not yet
been rated.
- <regveg:price-range> (#PCDATA) - The price range for
the entry. This will be given as a string like "12-18". The numbers
are in the local currency for the entry.
- <regveg:price-range-number> integer (1-5) - The
price range expressed a integer from 1 to 5, with 1 being the least
expensive and 5 being the most expensive.
- <regveg:veg-level> (#PCDATA) - How veg*n the entry
is. This can be one of "vegetarian-friendly", "vegan-friendly",
"vegetarian" (which by itself implies not vegan-friendly),
"vegetarian/vegan-friendly", or "vegan". This element may be empty,
in which case the entry is either none of the above, or it is
an organization.
- <regveg:veg-level-number> integer (0-5) - How veg*n
the entry is, as a number from 0-5. These numbers mean the
following:
- vegetarian-friendly
- vegan-friendly
- vegetarian
- vegetarian/vegan-friendly
- vegan
0 means none of the above. If an entry is for an organization (like
an activist or social group), then this value is always 0.
- <regveg:allows-smoking> (#PCDATA) - This will be one
of "yes", "no", or "unknown".
- <regveg:accepts-reservations> (#PCDATA) - This will
be one of "yes", "no", or "unknown".
- <regveg:is-wheelchair-accesible> (#PCDATA) - This
will be one of "yes", "no", or "unknown".
- <regveg:creation-datetime> (#PCDATA) - A datetime in
W3CDTF format. This
will always be given as a UTC datetime (a time zone offset of
0:00).
- <regveg:last-modified-datetime> (#PCDATA) - A datetime
in W3CDTF format.
This will always be given as a UTC datetime (a time zone offset of
0:00).
- <regveg:edit-link> (#PCDATA) - Contains a URL for
the form which allows users to edit the entry.
- <regveg:edit-hours-link> (#PCDATA) - Contains a URL
for the form which allows users to edit the entry's hours.
- <regveg:read-reviews-link> (#PCDATA) - Contains a
URL for the page which contains the entry's reviews and ratings.
Currently, this is the main info page for the entry, but this may
change in the future.
- <regveg:write-review-link> (#PCDATA) - Contains a
URL for the form which allows a user to write a review for the
entry.
- <regveg:region-link> (#PCDATA) - Contains a URL for
the region in which this entry is located.
- <regveg:map-link> (#PCDATA) - Contains a URL that
links to a map for the entry. Note that this will be to a site like
MapQuest or MultiMap. These sites may restrict how the links may be
used. Please see their Terms of Service before using these
links.
- <regveg:image-link> (#PCDATA) - Contains a URL for
the entry's image.
- <regveg:image-x> (#PCDATA) - Contains the width of
the entry's image.
- <regveg:image-y> (#PCDATA) - Contains the height of
the entry's image.
- <regveg:categories> - This element will consist of
one or more <regveg:category> elements, each of which
contains #PCDATA, such as "Restaurant", "Bar", "General Store",
etc.
- <regveg:cuisines> - This element will consist of one
or more <regveg:cuisine> elements, each of which
contains #PCDATA like "Chinese", "Indian", etc.
- <regveg:payment-options> - This element
will consist of one or more <regveg:payment-option>
elements, each of which contains #PCDATA like "American Express",
"Check", etc. Note that it is assumed that all entries accept cash
as a payment option.
- <regveg:is-cash-only> - If this element exists, it
will be set to "yes".
- <regveg:features> - This element will consist of one
or more <regveg:feature> elements, each of which
contains #PCDATA like "Brunch", "Happy Hour", "Macrobiotic",
etc.
-
<regveg:hours> - This element will consist of a
structure of one or more <regveg:open-close> elements.
Every <regveg:open-close> element will always contain a
day attribute. This attribute is an integer from 0 to 6, with
Sunday as 0 and Saturday as 6.
This element may contain the following two attributes:
- open (#PCDATA) - A time in hours and minutes, such as
"08:30". The time will always be given in 24 hour (military)
time.
- close (#PCDATA) - A time in hours and minutes, such as
"13:45". The time will always be given in 24 hour (military)
time.
Times may range from "00:00" to "23:59". The closing time may be
earlier than the opening time. If this is the case, then it
means that the closing time occurs on the next day. It is also
possible that the opening and closing time will both be "00:00", in
which case that indicates that it is open all day (24 hours) on that
particular day of the week.
If it does not contain open and close attributes, then
the <regveg:open-close> element must contain one
of the following attributes:
- closed true - If given, this attribute is always true,
and it indicates that the entry is closed for that day of the
week.
- unknown true - If given, this attribute is always true,
and it indicates that the we don't know when the entry opens or
closes for that day of the week. It is possible that some days
will be listed as unknown, while others are known.
Note that a given day may have multiple opening and closing times, as
restaurants frequently close between lunch and dinner.
A single item will probably not contain all of these elements. The
only elements which are guaranteed to be present are the standard RSS
1.0 elements "title", "link", and "description".
Retrieving the Feeds
Each region has an "RSS Feed" link. If you want a feed of all the
regions, then check out the site feeds.
Sample Code
Some sample code for retrieving and parsing the data feeds is available:
- get-vegguide-rss-feed-pl - Retrieves an RSS data feed
from this site. Written in Perl. Download.
- get-and-parse-vegguide-rss-feed-php - Retrieves an RSS
data feed from this site and parses it. Written in PHP.
Contributed by Dac Chartrand. Download.
Example
Here is a sample data feed.