You can use the EveryBlock Content API to publish recent EveryBlock content in your own site or application.

Some, but not all, of the API endpoints require an API key. Get an API key here.

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 the latest content on EveryBlock, across all of the current EveryBlock metros. But because EveryBlock deals with a diversity of sources -- we index everything from blog posts to crime reports, and information varies by city -- you'll need to understand some important things before you dive into the API:

  • EveryBlock covers only 1 metro, Chicago.
  • Each metro has different content availability. Certain types of content are available across all metros (e.g., locations in the media and user discussions); other types of content are available in a subset of our metros; still other types of news are available only in a single metro.
  • Even when multiple metros have the same content available, the nature of the data may differ.

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 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 1 metro. 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.

A schema is a news item's type. For example, this news item has schema of "announcements" while this news item has schema of "crime".

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 or community boards. 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.

      JSON
      Accept: application/json
      .json

      JSONP
      Accept: application/javascript
      .jsonp

      XML
      Accept: application/xml
      .xml
    

An example using extensions: http://api.everyblock.com/content/.json

All endpoints are hosted on http://api.everyblock.com.

Returns a list of all current EveryBlock metros, with some useful data and related data links within the API.

/content/

The content endpoint is merely a list of all current EveryBlock metros. See the Metro Endpoint for output details.

Returns a specific EveryBlock metros, with some useful data and related data links within the API.

/content/[metro]/

URL parameters:

  • metro -- A metro's short_name. This can be found via the Content Endpoint.

Each metro element contains the following attributes:

  • short_name -- A unique identifier for a metro.
  • metro_name -- The nice name for a metro.
  • schemas -- The API URL to schemas for the metro. See the Schemas Endpoint.
  • topnews -- The API URL to popular content for the metro. See the Popular News Item Endpoint.
  • neighborhoods -- The API URL to neighborhoods for the metro. See the Location Endpoint.
  • wards --The API URL to wards for the metro. See the Location Endpoint.
  • zipcodes -- The API URL to zipcodes for the metro. See the Location Endpoint.
  • custom_locations -- The API URL to custom locations for the metro. See the Location Endpoint.

Returns the schemas for a specific metro.

/content/[metro]/schemas/

URL parameters:

  • metro -- A metro's short_name. This can be found via the Content Endpoint.

Each schema element contains the following attributes:

  • id -- A numeric ID. This is unique within the metro.
  • name -- The name of the schema, in all lowercase. It's in lowercase so that applications have the option of capitalizing the first word automatically if it's at the start of a sentence, or leaving it as-is for usage in the middle of a sentence.
  • plural_name -- The plural name of the schema, likewise in all lowercase.
  • slug -- The code for the schema, containing no spaces, which is used in URLs and in other places where we need to represent a schema without spaces.
  • indefinite_article -- Either a or an, depending on the rules of English grammar. For "crime," it would be "a". For "anchovy" it would be "an".
  • is_active -- The current status of the schema. If true, the schema is currently being using for new content. If false, the schema is not being used for new content.
  • about -- The full URL of the schema's "about" page on everyblock.com.

Returns the popular news items 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/

URL parameters:

  • metro -- A metro's short_name. This can be found via the Content Endpoint.

Query string parameters:

  • schema -- A schema's slug. This can be found via the Schema Endpoint. It is used to filter results to one or more schemas. To filter multiple schema specify the query string parameter multiple times. For example, the following query string would be used to access only crime and neighbor messages.
    ?schema=crime&schema=announcements

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.
  • 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.
  • thank_count -- The number of thanks the news item received from EveryBlock members.
  • comment_count -- The number of comments the news item received from EveryBlock members.

Returns the locations for the specified type, with some useful data and related links within the API.

      /content/[metro]/[location_type]/
      /content/[metro]/neighborhoods/
      /content/[metro]/wards/
      /content/[metro]/zippres/
      /content/[metro]/custom-locations/
    

URL parameters:

  • metro -- A metro's short_name. This can be found via the Content Endpoint.
  • location_type -- A location type. This can be neighbhoods, wards, zippres, or custom-locations.

Each location element has the following attributes:

  • id -- A numeric ID. This is unique within the metro.
  • name -- The name of the location, in correct capitalization.
  • slug -- The code for the location, containing no spaces, which is used in URLs and in other places where we need to represent a location without spaces.
  • url -- The full URL of the location's page on everyblock.com.
  • timeline -- The API URL for the news item timeline.

Returns the locations for the specified type, with some useful data and related links within the API. It is limited to 5 days worth of content.

/content/[metro]/locations/[location]/timeline/

URL parameters:

  • 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:

  • schema -- A schema's slug. This can be found via the Schema Endpoint. It is used to filter results to one or more schemas. To filter multiple schema specify the query string parameter multiple times. For example, the following query string would be used to access only crime and neighbor messages.
    ?schema=crime&schema=announcements

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.
  • 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.
  • thank_count -- The number of thanks the news item received from EveryBlock members.
  • 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