You can use the EveryBlock Event API to publish recent EveryBlock scheduled events in your own site or application.
If you're not familiar with EveryBlock, read our about page and FAQ. The main takeaway is that EveryBlock gathers, organizes and publishes content at the level of neighborhood and city block. Given a location, we can tell you what's been happening there recently.
This API is designed to provide you with access to upcoming events on EveryBlock, across all of the current EveryBlock metros. But because EveryBlock deals with a diversity of Event sources -- we index everything from Eventbrite publicly available Google Calendars -- you'll need to understand some important things before you dive into the API:
- EveryBlock covers 10 metros: Boston, Chicago, Denver, Fresno, Hialeah, Houston, Medford, Nashville, Philadelphia and Seattle.
- Publicly available iCals, EventBrite, GSALR, Publicly available Google Calendars, MeetUp, and TicketLeap, as well as user generated events.
We've designed our API to help you through these quirks by (we hope) giving you a standard, abstract and consistent way of accessing our Events data. Our goal is to make things future-proof so that your application will magically continue working when we add cities, new types of content and (obviously) new content itself.
EveryBlock serves 10 metros. It's technically not the entire metro area -- just the city proper -- but we call these metros for future-compatibility.
Each piece of news on EveryBlock -- whether it's a link to a mainstream news article, a user discussion, etc. -- is called a news item. Simply put, a news item is a piece of data that has a date and a location. One way to think of EveryBlock is as a geographic filter of these news items: enter an address, and we'll show you news items near that address.
All news items have certain things in common -- each has an ID, a title, a URL, a location (both human-readable and longitude/latitude), a schema and a publication date. Beyond that, a news item may have schema-specific attributes, which are key-value pairs of structured data; for example, a crime may have a case number, a crime type and a police beat number, while a user-posted announcement may have a user ID and text of the announcement.
Each metro area that EveryBlock serves has a different list of available schemas.
EveryBlock offers distinct pages for neighborhoods, ZIP codes and, in some cases, city-specific entities such as wards. These are known as location types. A specific item in a location type is called a location. For example, Albany Park is a location of the neighborhood type.
We currently provide various API endpoints for accessing accessing and filtering the aformentioned news items. Each is described in a section below.
This is a simple REST-style Web API. Make
GET requests via HTTP, and we'll return a document with the content you requested. The document format can specified in the request. The supported formats are JSON, JSONP, and XML. If no format is specified, endpoints default to JSON.
Format types can be specified via an Accept header or extension within the URL.
An example using extensions: https://api.everyblock.com/content/.json
All endpoints are hosted on https://api.everyblock.com and require authentication. Authentication is handled with an API token in the HTTP request headers. Get an API token here.
Here is an example:
GET /content/ HTTP/1.1 Host: api.everyblock.com Authorization: Token 90fe24d329973b71272faf3f5d17a8602bff996b
Here is an example using the token URL parameter:
Events are part of the larger Content API. To access the events, you will need to understand the Content API. Here is the documentation. We have only included specific Event references with this documentation.
Top Events Endpoint
Returns the popular events for a specific metro. It is the API equivalent to Popular in Chicago. It is limited to 5 days worth of content.
/content/[metro]/topnews/events/ Eg. GET /content/chicago/topnews/events/ or GET /content/philly/topnews/events/
Location Specific Events Endpoint
Returns the locations for the specified type, with some useful data and related links within the API.
metro-- A metro's short_name. This can be found via the Content Endpoint.
location-- A location's slug. This can be found via the Location Endpoint.
Query string parameters:
date-- Sorts returned news items by date.News item results are by default sorted by their Everyblock blockscore in descending order. Newsitems may also be returned sorted by date; specifying the the 'date' url parameter and it's value as either 'ascending' or 'descending'. For example, the following query string will return news items sorted by date ascending.
attribute-- Filter the returned news item's associated attributes.News item results are displayed with associated attributes and values; specifying the the 'attribute' url parameter and the desired attribute as value, multiple attributes may be chained with the "&" operator. For example, the following query string will return news items with only the "comment" and "source" attributes displayed.
- start_date -- Format: yyyy-mm-dd; Limit results to events starting on or after the given date.
- end_date -- Format: yyyy-mm-dd; Limit results to events starting on or before the given date.
Results are paginated, so they come in an envelope containing the following attributes:
count-- A count of the total number of news items available from this endpoint.
next-- An API link to the next page of news items. It will be null if a next page does not exist.
previous-- An API link to the previous page of news items. It will be null if a previous page does not exist.
results-- A list of news items on the current page.
Each news item element has the following attributes:
id-- A numeric ID. This is unique within the metro.
title-- The news item's title. For news articles, it's the headline; for public records like crimes, it's a headline we've put automatically constructed from the structured data.
pub_date-- The date/time this item was added to EveryBlock, in the metro's local time zone.
item_date-- The date of the item. This can be before, on, or after the pub_date. For example, a food inspection might be published on the site on November 3rd, but the inspection actually occured on October 20th. In this case the pub_date would be October 20th and the item_date would be November 3rd.
location_name-- The name of the location that this item pertains to, e.g., "123 Main St." or "Wicker Park".
url-- The full URL of the item on everyblock.com. Note that in some cases (for news articles, school reviews, etc.) this might redirect to a third-party site.
reaction_count-- The number of reactions the news item received from EveryBlock members.
reaction_score-- The average reaction score the news item received from EveryBlock members.(Range is between Great 3 to Terrible -2)
comment_count-- The number of comments the news item received from EveryBlock members.
If you have any questions you'd like to ask, feel free to contact us via the Feedback form.