Getting Started | API conversation | Our Collections | Collection Filters | Apply! |
---|
This document describes the API to the database of MoreHockeyStats. You can query any of our websites (morehockeystats.com, hockeyeloratings.com, nhlerrata.com) with this API, they are all powered by the same database.
Getting StartedThe database itself is a MongoDB, and the API emulates a limited MongoDB client, with a subset of features for query and count of the fields. The data returned is a JSON object as returned by the database query.
Our data is run through a large list of tests to verify its validity, and although we cannot guarantee a 100% correctness, we consider the data to be of high quality. We perform a set of automatic data corrections described on our site NHL Errata.
Some of the data is free, but some requires payment to access. The charge on the queries is always by the amount of records retrieved. Only authorized users can access the database. If you prefer to work with the free publicly available data, you may choose to do so via pseudo-API queries of the website as described in the 'JSON' and 'CSV' links under each table. Running this site comes at a cost, and providing this kind of premium access is a way we hope to recoup some of this cost. We also supply tool to estimate the query costs before the queries are being executed. We do not provide live updates of the collections! All data is updated during a nightly run.
The query is performed by executing an HTTP Post at the API URL. The exchange is straightforward:
Sample conversation.Let's assume file post.json with the following simple query:
{ "user": "morehockeystats", "pass": "deadbeef", "query" : { "type": "find", "collection" : "coaches", "filter" : { "team" : "ARI" }, "fields" : { "name": 1, } } }
The fields user and pass are your API username and passwords. You can apply for one by contacting us via email or Twitter. Then there's the actual query JSON, which, in this case, is a query to find all coaches of the Arizona Coyotes franchise and return the field of the coach's name.
We execute the query with the help of wget:
wget -q -O- --post-file post.json https://morehockeystats.com/api
Here's the response to this query (pretty-formatted):
{ "count": 9, "cost": 0, "data":[ { "_id":"5b6e99e99ad6905c880b8928", "name":"DAN MALONEY" }, { "_id":"5b6e99bf9ad6905c880b8746", "name":"BOB MURDOCH" }, { "_id":"5b6eb4ae9ad6905c881110ee", "name":"BOB FRANCIS" }, { "_id":"5b6e99af9ad6905c880b86f1", "name":"TERRY SIMPSON" }, { "_id":"5b6e9ae29ad6905c880bcce0", "name":"JIM SCHOENFELD" }, { "_id":"5b6e9d229ad6905c880c4dea", "name":"RICK BOWNESS" }, { "_id":"5b6f6a4a9ad6907cd25ece14", "name":"WAYNE GRETZKY" }, { "_id":"5b6f5e029ad6907cd2577f01", "name":"DAVE TIPPETT" }, { "_id":"5b6fb9c49ad6900d2b347bfa", "name":"RICK TOCCHET" } ], "status":201 }
Each response contains a status code. Here's the list of the status codes and their meanings. If the status code indicates an error, there will be an error field in the JSON, describing the error. The _id fields contain the MongoDB BSON OIDs. Their usage and importance will be described below.
There are no rate limitations in this API, but we reserve the right to block the clients and the users that seem to be abusing the resource.
Please consult a variety of resources on MongoDB, including Mongo's own Getting Started for more information, and as a complement to the reading below. Please note that MoreHockeyStats is currently using MongoDB v3.4.
API conversationThe query JSON posted to the server must have the following fields:
> cat status.json { "user": "morehockeystats", "pass": "deadbeef", "query": { "type": "status" } } > wget -q -O- --post-file status.json https://morehockeystats.com/api { "cost" : 0, "data" : { "queries" : 2, "user" : "morehockeystats", "records" : 12, "history" : [ { "collection" : "coaches", "records" : 9, "cost" : 0 }, { "cost" : 0.03, "records" : 3, "collection" : "MISS" } ], "status" : "active", "balance" : "9.97" }, "status" : 201 }List query:
> cat list.json { "user": "morehockeystats", "pass": "deadbeef", "query": { "type": "list" } } > wget -q -O- --post-file list.json https://morehockeystats.com/api { "status" : 201, "cost" : 0, "data" : [ { "type" : "events", "updated" : 1, "name" : "BLOCK", "cost" : 0.01, "since" : 2005, "count" : 472473, "description" : "Blocked shot events" }, { … }, … ] }
The detailed list of the collection is available below
Fields queryLists the fields from the collection that are available to use in filtering. These are also the fields that will be returned for a successful query.
The list of the fields vary between collection to collection. Most of the fields for the query are mere scalar values and can be queried for these values or ranges of values. Some, though, are complex, contain substructures that can be queried by the subfields. These structures will be marked by a special notation and described in the complete fields reference below.
Example:> cat fields.json { "user": "morehockeystats", "pass": "deadbeef", "query": { "type": "fields", "collection": "schedule" } } > wget -q -O- --post-file fields.json https://morehockeystats.com/api { "status" : 201, "cost" : 0, "data" : [ "away", "date", "game_id", "home", "season", "stage", "ts", "year" ] }Count query
Counts the number of records that fit the given filter constructed from the fields of the list in the previous section. It's very useful to run before a massive query to realize how much cost it's going to incur.
The returned stricture has the following fields:If the query filter is omitted, returns the count of all records in the collection.
Example:> cat count.json { "user": "morehockeystats", "pass": "deadbeef", "query": { "type": "count", "collection": "SHOT", "filter" : { "season": 2017, "team1": "WSH" } } } > wget -q -O- --post-file count.json https://morehockeystats.com/api { "count" : 2804, "cost" : 28.04, "status" : 201 }
The above query returns the number of SHOT records for the team Washington Capitals in the 2017/18 season.
Find queryQueries the collection for the records that answer the optional query filter, returning the particular fields if specified, sorting the documents by a field if specified, limiting the number of records returned if specified.
Here, for a change, we start with the example.
Example:> cat find.json { "user": "morehockeystats", "pass": "deadbeef", "query" : { "type": "find", "collection" : "MISS", "filter" : { "$and": [ { "season" : 2017 }, { "player1": 8471214 } ] }, "fields" : { "team1": 1, "distance" : 1, "team2": 1 }, "sort" : { "distance": 1 }, "limit" : 3 } } > wget -q -O- --post-file find.json https://morehockeystats.com/api { "status": 201, "cost" : 0.03, "count" : 3, "data" : [ { "distance" : 5, "_id" : 2017205020017, "team2" : "ANA", "team1" : "WSH" }, { "distance" : 6, "_id" : 2017209130265, "team2" : "BUF", "team1" : "WSH" }, { "team1" : "WSH", "team2" : "PIT", "_id" : 2017200470295, "distance" : 8 } ] } >
This query returns the three closest misses by shooting distance Alex Ovechkin (ID 8471214) ihad n the 2017 season.
The collection MISS indicates we're searching the collection of missed shots. The filter is a combination ($and, in fact a redundant one) of the season (2017) and Ovechkin's NHL Id, used as the player firing the missing shot player1: 8471214. The fields key indicate return of the team1 (Ovechkin's team), team2 (the team against which the missed shot occurred), and the distance of the shot as specified in the NHL's play by play. The sort key indicates the sorting key: 1 means ascending, -1 means descending. There is no preset order in which sorting of multiple keys will apply unless you format your sorting criteria as:
"sort" : [ { "key1": 1|-1 }, { "key2": 1|-1 }, ]but it is not supported yet.
The limit value 3 specifies how many records need to be returned.
The returned data also contains the original _id field with which the record is stored in the Mongo database. Sometimes you will need these _id values for fields such as catalogs. You can explicitly prohibit the _id field from being returned by adding _id: -1 in the fields section. By specifying additional fields with values of -1 you can exclude them while still returning all the remaining available fields. This applies both to scalar and to complex fields.
Our CollectionsWe are providing the following collections for your queries.
Note: prior to 2007 the collections have less information about each event.
Note: for the item's structure please see the filters section.
Below are the descriptions and the examples of entries in each collection.
BLOCK{ "name" : "BLOCK", "cost" : 0.01, "since" : 2005, "description" : "Blocked shot events", "type" : "events", "count" : 472473, "updated" : 1 },
The collection contains blocked shot events, the query cost is $0.01 per returned event, it is available since 2005, the collection is of type events, there are currently 472473 events in the collection and it is updated daily.
{ "name" : "CHL", "cost" : 0.01, "since" : 2015, "type" : "events", "description" : "Challenge events, home, visitor and league", "updated" : 1, "count" : 658 },
The collection contains the CHL (challenge) events as reported by the live JSON and/or the PBP HTML report. Some challenges are missed and are only reported as STOP events. This collection largely overlaps with the challenges collection (see below) and the latter one is more recommended for use. It costs $0.0.1 per item, it's of type events, and it is updated daily since 2015, when challenges were introduced.
FAC{ "since" : 2002, "cost" : 0.01, "name" : "FAC", "count" : 1168365, "updated" : 1, "description" : "Faceoff events", "type" : "events" },
The collection contains the faceoff events. It's available since 2002 and costs $0.01 per item to retrieve. It's updated daily and is one of the largest collections with over 1 million of events, updated daily.
GEND{ "count" : 60141, "updated" : 1, "description" : "Game End events", "type" : "events", "cost" : 0.01, "since" : 1917, "name" : "GEND" },
The collection contains Game End events. Although they began only to appear since 2007 in the Play By Play HTML, we generate such one for every game since 1917 and append it to the game event list. It costs $0.01/item to retrieve and there are the same number of such events as the games, updated daily.
GIVE{ "count" : 294319, "updated" : 1, "description" : "Giveaway events", "type" : "events", "cost" : 0.01, "since" : 2005, "name" : "GIVE" },
The collection contains Giveaway events. They are available since 2005. The Giveaway statistic is not considered to be recorded reliably and consistently. It costs $0.01/item to retrieve and it is, updated daily.
GOAL{ "updated" : 1, "count" : 367861, "type" : "events", "description" : "Goal scoring events", "cost" : 0.01, "since" : 1917, "name" : "GOAL" },
The collection contains Goal events. They are available since the start of the league in 1917, although the data associated with it has been growing consistently. Post-game shootout goals are included in the collection but they are specifically marked as such. It costs $0.01/item to retrieve, and the is updated daily.
HIT{ "updated" : 1, "count" : 748681, "type" : "events", "description" : "Hit events", "since" : 2005, "cost" : 0.01, "name" : "HIT" },
The collection contains Hit events. They are available since 2005. It costs $0.01/item to retrieve and there are the same number of such events as the games, updated daily, and the number of items is surpassing 750K.
MISS{ "name" : "MISS", "since" : 2005, "cost" : 0.01, "description" : "Missed shot events", "type" : "events", "count" : 399962, "updated" : 1 },
The collection contains Miss (missed shots) events. They are available since 2005. A missed shot is a puck that is determined to have been shot towards a goal and did not encounter any obstacle until it crossed the goal line outside the goal, or until it hit the goal frame. Post-game shootout misses are included in the collection but they are specifically marked as such. It costs $0.01/item to retrieve and it is updated daily.
PEND{ "since" : 1917, "cost" : 0.01, "name" : "PEND", "updated" : 1, "count" : 191395, "type" : "events", "description" : "Period End events" },
The collection contains Period End events. Although they began only to appear since 2007 in the Play By Play HTML, we generate such one for every game since 1917 and append it to the game event list at the end of each period's events. It costs $0.01/item to retrieve and it is updated daily. Shootout periods have their PEND events as well.
PENL{ "name" : "PENL", "since" : 1917, "cost" : 0.01, "type" : "events", "description" : "Penalty events", "updated" : 1, "count" : 697374 },
The collection contains Penalty events. They are available since the start of the league in 1917, although the data associated with it has been growing consistently. It costs $0.01/item to retrieve and there are the same number of such events as the games, updated daily. We include all penalty events reported in the live feed and PBP reports, including penalty-shot penalties, coach and bench penalties.
PSTR{ "name" : "PSTR", "cost" : 0.01, "since" : 1917, "description" : "Period Start events", "type" : "events", "count" : 191395, "updated" : 1 },
The collection contains Period Start events. Although they began only to appear since 2007 in the Play By Play HTML, we generate such one for every game since 1917 and prepend it to the game event list at the start of each period's events. It costs $0.01/item to retrieve and it is updated daily. Shootout periods have their PSTR events as well. The number of the events in the PSTR and PEND collections is identical.
SHOT{ "cost" : 0.01, "since" : 2002, "name" : "SHOT", "count" : 1060954, "updated" : 1, "description" : "Shot on Goal events", "type" : "events" },
The collection contains SHOT (shot on goal) events. They are available since 2002. A shot on goal is a puck that is determined to have been shot or deflected towards a goal and did not encounter any obstacle until it was stopped by a goaltender. Shots that resulted in a Goal are in a separate collection. Post-game shootout shots on goal are included in the collection but they are specifically marked as such. It costs $0.01/item to retrieve and there are the same number of such events as the games, updated daily. This is one of the largest collection in the database, featuring over 1 million of items.
STOP{ "name" : "STOP", "since" : 2002, "cost" : 0.01, "type" : "events", "description" : "Stoppage events", "updated" : 1, "count" : 873958 },
The collection contains STOP (stoppage) events. They are available since 2002. Period End is not considered a stoppage event. Stoppage events except for the joint stoppage/penalty-shot penalty events are followed by faceoffs. We do not separate stoppages by their types. It costs $0.01/item to retrieve and there are the same number of such events as the games, updated daily.
TAKE{ "type" : "events", "description" : "Takeaway events", "updated" : 1, "count" : 234158, "name" : "TAKE", "since" : 2002, "cost" : 0.01 },
The collection contains Takeaway events. They are available since 2005. The Takeaway statistic is not considered to be recorded reliably and consistently. It costs $0.01/item to retrieve and it is, updated daily.
challenges{ "cost" : 0, "since" : 2015, "name" : "challenges", "count" : 1215, "updated" : 1, "description" : "Specially reworked generated challenge events", "type" : "events" },
The collection contains specially generated Challenge events deducted from both CHL and STOP events. They also include NHL challenge events. They are provided for free, and there are over 1200 such events since 2015 when challenges were introduced. It is updated daily.
coaches{ "since" : 1987, "cost" : 0, "name" : "coaches", "updated" : 1, "count" : 256, "type" : "people", "description" : "NHL coaches" },
The collection contains all the coaches who have been known to coach an NHL team. The data has been recorded in the live feeds since 1987, and so the collection contains the data since that season. The collection is also a catalog: all the names are mapped to the MongoDB BSON OIDs which are then in turn used elsewhere in the database. The collection is free and contains over 250 entries.
common_games{ "count" : 7698, "updated" : 1, "description" : "Common games between two players", "type" : "people", "since" : 1917, "cost" : 0.1, "name" : "common_games" },
The collection contains a specially generated list of game ids in which two given players participated together on the same team. This is a highly special collection because the primary id key in it are the NHL player IDs, and the keys in it are the players they have common games with. To avoid duplication only the players with numerically lesser IDs are used as keys within each item. The collection costs $0.10 per item and is updated daily.
conferences{ "since" : 1917, "cost" : 0, "name" : "conferences", "count" : 52, "updated" : 4, "description" : "NHL conferences through the years", "type" : "league" },
The collection contains all the complexions of the conferences in the NHL history. A somewhat obscure collection, it features the divisions that belong to that conference. The collection is free and updated on a yearly basis (when necessary). Please see more about this and the divisions collections in the seasons collection description.
divisions{ "name" : "divisions", "since" : 1917, "cost" : 0, "type" : "league", "description" : "NHL divisions through the years", "updated" : 4, "count" : 105 },
The collection contains all the complexions of the divisions in the NHL history. A somewhat obscure collection, it features the teams that belong to that division. The collection is free and updated on a yearly basis (when necessary). Please see more about this and the conferences collections in the seasons collection description.
games{ "count" : 60141, "updated" : 1, "description" : "All the NHL and Stanley Cup Playoffs games", "type" : "games", "cost" : 0.2, "since" : 1917, "name" : "games" },
The collection contains the games played in the NHL and in the Stanley Cup Playoffs including the games against the PCHA teams. Preseason games are not included. This is the core collection of the database, and it contains extensive data merged from the following sources available on the NHL website:
{ "since" : 1997, "cost" : 0, "name" : "locations", "count" : 153, "updated" : 3, "description" : "NHL venues", "type" : "league" },
The collection contains all the venues used for the NHL games since this data started being recorded in the NHL reports around the 1997/98 season. The collection also has the maximum attendance data for each venue. Special venues such as football stadiums for the outdoor games or European areans are not explicitly marked, but they may become. The collection contains over 150 different venues and is free.
misses{ "since" : 2005, "cost" : 0, "name" : "misses", "count" : 5, "updated" : 5, "description" : "Types of missed shots", "type" : "catalog" },
The collection contains the list of all types of misses being recorded in the NHL games and the default fallback UNKNOWN miss. The collection is a catalogue: all the string values are mapped to the MongoDB BSON OIDs which are then in turn used elsewhere in the database. The collection is free and it is updated manually and very rarely.
penalties{ "name" : "penalties", "since" : 1917, "cost" : 0, "type" : "catalog", "description" : "Types of penalties", "updated" : 5, "count" : 77 },
The collection contains the list of all types of penalties being recorded in the NHL games and the default fallback UNKNOWN penalty. The collection is a catalogue: all the string values are mapped to the MongoDB BSON OIDs which are then in turn used elsewhere in the database. The collection does not contain penalty length and/or severities. The collection is free and it is updated manually and very rarely.
players{ "type" : "people", "description" : "NHL players and drafted prospects", "updated" : 1, "count" : 19804, "name" : "players", "cost" : 0.1, "since" : 1917 },
The collection contains the list of all players who ever featured on the NHL rosters and were assigned an NHL id. In addition we also feature goalie Charlie Reid that appeared in two games of the 1924 Stanley Cup Finals but for some reason did not get an NHL id. Just like with the game data, each player item is tested for validity and sanity. Players that have only appeared as scratches and thus weren't assigned an NHL id are not included. The collection costs $0.10 per item and is updated daily.
schedule{ "updated" : 4, "count" : 61107, "type" : "games", "description" : "Season schedules of the NHL", "since" : 1917, "cost" : 0, "name" : "schedule" },
The collection contains the schedule of all of the NHL games as they were scheduled season by season. This collection is parallel to the games collection but only contains the pre-game data. The collection is free and it is updated when games are rescheduled, at the start of the season, once a new season schedule is published, and during the playoffs, when the series' schedules are published.
seasons{ "type" : "league", "description" : "NHL seasonal structure through the years", "updated" : 4, "count" : 102, "name" : "seasons", "since" : 1917, "cost" : 0 },
The collection contains the conference-division-team structure of each and every NHL season. The collection contains the OIDs of conferences for each season (or NHL if no conferences were defined), the conferences contain divisions (or NHL if no divisions were defined), and the divisions contain the franchise IDs as teams.
shot_types{ "name" : "shot_types", "cost" : 0, "since" : 2002, "description" : "Types of shots", "type" : "catalog", "count" : 8, "updated" : 5 },
The collection contains the list of all types of shots being recorded in the NHL games and the default fallback UNKNOWN miss. The collection is a catalogue: all the string values are mapped to the MongoDB BSON OIDs which are then in turn used elsewhere in the database. The collection is free and it is updated manually and very rarely.
stopreasons{ "count" : 32, "updated" : 5, "description" : "Reasons for stoppage", "type" : "catalog", "since" : 2002, "cost" : 0, "name" : "stopreasons" },
The collection contains the list of all types of stoppage reasons being recorded in the NHL games and the default fallback UNKNOWN stop reason. The collection is a catalogue: all the string values are mapped to the MongoDB BSON OIDs which are then in turn used elsewhere in the database. The collection is free and it is updated manually and very rarely.
strengths{ "updated" : 5, "count" : 4, "type" : "catalog", "description" : "Strength situation of NHL events", "cost" : 0, "since" : 1998, "name" : "strengths" },
The collection contains the list of all types of team strengths (EV, SH, PP) being recorded in the NHL games and the default fallback XX stop reason. The collection is a catalogue: all the string values are mapped to the MongoDB BSON OIDs which are then in turn used elsewhere in the database. Penalty shot and Empty Net are not considered separate strength situations. The collection is free and it is updated manually. The strength property of the event is superceded by the icecount field for the events since season 2007/08.
teams{ "description" : "NHL teams", "type" : "league", "count" : 43, "updated" : 4, "name" : "teams", "cost" : 0, "since" : 1917 },
The collection contains the franchises that played in the NHL since the 1917/18 seasons. The different incarnations of the franchises are available as sub-fields of the collection items. Both defunct and existing franchises are available, with the exception of the PCHA franchises who competed in the Stanley Cup Playoffs. The collection is free and is expected to be updated once Seattle joins the league.
zones{ "cost" : 0, "since" : 2002, "name" : "zones", "count" : 4, "updated" : 5, "description" : "Types of zones", "type" : "catalog" }
The collection contains the list of all zones (NEU, DEF, OFF) being recorded in the NHL games and the default fallback UNK stop reason. The collection is a catalogue: all the string values are mapped to the MongoDB BSON OIDs which are then in turn used elsewhere in the database. The coordinates property of events is supposed to supercede this setting, unfortunately, the coordinate system of reference varies by home/away between games. The collection is free and it is not updated.
Collection FiltersThe section below describes the collection search filters. The fields in these filters may be used later in the fields and sort modifiers, but only with 1/-1 values. We will begin with the description of all available fields, because some of them are applicable to more than one collection in exactly the same way. When the same field is used differently between two collections, we will provide two different descriptions. Then we will follow with the reference of fields by collection as well as examples of filters.
You cannot query more than one collection at once. That's the original limitation of Mongo, and while there are certain workarounds for this in direct operation against latest MongoDB servers, we are not going to implement that capacity. You can, however, provide some extra flexibility by using nested $and or $or logical operators followed by an array of filters. Not all fields may be present in every item within the same collection. You can filter for their existense by specifyin the value as a mapping: { "$exists": 1 }.
API Query Fields Reference (in alphabetic order){ "season": 2017, "icecount": 5151, "shot_type": "5b6e4b5c9ad690577c0b3dac", "coordinates.x": {"$gte" : 50} }Filter Explanation:
This filter searches the blocked shots in the 2017 season, at 5v5, whose X coordinate is more or equal than 50, of shots of type OID "5b6e4b5c9ad690577c0b3dac" which maps (q.v.) to "WRIST"
Collection: CHL{ "season": 2017, "period": 1, "game_id" : {"$lte": 201720100 } }Filter Explanation:
This filter searches the challenges issued in the first 100 games of the 2017 season (via game ids) in the first period.
Collection: FAC{ "player1": 8475172, "player2": 8476460, "zone": "5b6e4b5c9ad690577c0b3d96" }Filter Explanation:
This filter searches for all faceoffs Nazem Kadri (player ID 8475172) won against Mark Scheifele (player ID 8476460) in the Neutral zone defined by the OID.
Collection: GEND{ "season": 2017, "stage": 3, "ts" : {"$gt": 3600 } }Filter Explanation:
This query searches for all GEND events that happened after more than 3600 seconds of game time in the 2017/18 Playoffs.
Collection: GIVE{ "$or": [ { "t": 0, "on_ice.0": { "$elemMatch": { "$in": [8475172] } } }, { "t": 1, "on_ice.1": { "$elemMatch": { "$in": [8475172] } } } ] }Filter Explanation:
This filter searches for Giveaways when Nazem Kadri (player ID 8475172) was on the ice as the team committing the Giveaway. You can see the search through the on_ice field using the $elemMatch MongoDB operator.
Collection: GOAL{ "assist2": { "$exists": 1 }, "ne" : 1, "team2" : "SJS", "season" : { "$in": [2016, 2017] } }Filter Explanation:
This filter searches the Goals the San Jose Sharks allowed in seasons 2016 and 2017 that their opponent scored with an extra attacker, and that had a secondary assist as well.
Collection: HIT{ "$or" : [ { "player1" : 8471214, "player2" : 8471686 }, { "player2" : 8471214, "player1" : 8471686 } ] }Filter Explanation:
This filter searches the Hits for the hits Alex Ovechkin (id 8471214) and Marc Staal (id 8471686) have laid upon each other.
Collection: MISS{ "miss" : { "$in" : [ "5b6f69d09ad6907cd25ebf6d", "5b6f69e39ad6907cd25ec257" ] }, "player1" : 8475765, "stage" : 3 }Filter Explanation:
This filter searches for the times Vladimir Tarasenko (player ID 8475765) hit the post or the crossbar (misses converted to OIDs) in the playoffs.
Collection: PENDSee GEND example.
Filter Explanation:{ "servedby": 8470621, "player1": 8000001 }Filter Explanation:
This filter searches all the BENCH penalties (special player ID 8000001) served by Corey Perry (player id 8470621.
Collection: PSTRSee GEND example.
Filter Explanation:{ "player2" : { "$in" : [ 8474651, 8468685 ] }, "player1" : 8471675, "distance" : { "$lte" : 30 }, "icecount" : 4141 }Filter Explanation:
This filter searches for Shots by Sidney Crosby (player ID 8471675) while 4 on 4 (icecount 4141) saved by either Henrik Lundqvist (player ID 8468685) or Braden Holtby (player ID 8474651) from the distance of thirty feet or less from the goal.
Collection: STOP{ "season" : 2017, "game_id" : {"$lte": 201720100 }, "stopreasons" : "5b6f675a9ad6907cd25d3e45", "period" : 1 }Filter Explanation:
This filter searches the Stoppages when the puck went into benches ("PUCK IN BENCHES" as OID) in the first periods of the first hundred games of the 2017/18 season.
Collection: TAKESee GIVE example.
Collection: challenges{ "loser": "MTL", "type": "i" }Filter Explanation:
This filter searches for all goalie interference challenges where Montreal Canadiens were on the losing end, i.e. either challenged and lost, or had the other team challenge and won.
Collection: coaches{ "name" : { "$regex": /guy boucher/i } }Filter Explanation:
This provides all the coach data collected about GUY BOUCHER, including his OID used elsewhere, e.g. in games and challenges. Please note that all string values are in uppercase letters, putting them in a regex would catch lowercase, but put some extra load on the database :) .
Collection: common_games"filter" : { "_id": 8471675, }, "fields" : { "8471215" : 1, }Filter Explanation:
The best way to use the common_games collection is to combine it with the fields qualifier. The above filter returns the game where Sidney Crosby (player id 8471675) and Evgeny Malkin (player id 8471215) participated together. Always query by the smaller id, and always qualify by the larger one. Please note to quote the second id, since it is a field name.
Collection: conferences{ "name": "Eastern" }Filter Explanation:
This filter searches for all incarnations of "Eastern" conference in the NHL history.
Collection: divisions{ "teams": "DAL" }Filter Explanation:
This filter searches for all incarnations of the divisions that had the Dallas Stars franchise in it. It will also return the divisions the Minnesota North Stars were part of.
Collection: games{ "teams.name" : "CHI", "teams.score" : { "$gte": 6 }, "season" : { "$in" : [ 2012, 2013, 2014, 2015 ] }, "ot" : 0 }Filter Explanation:
This filter searches for games where one of the team was Chicago Blackhawks, and at least one team scored at least six goals in the seasons 2012/13-2015/16, and the game ended in regulation.
Collection: locations{ "capacity": { $gte: 20000 } }Filter Explanation:
This filter searches for all locations that had attendance of 20,000 people or over in their history.
Collection: misses{ "name": "OVER" }Filter Explanation:
This is a catalog query filter. The catalog collections have two fields: name and _id, and you can query by either, or retrieve all items at once, as they are seldom updated. The filter above searchs for the entry of the miss "OVER" (over the net) to retrieve the _id that is used in other collections.
Collection: penaltiesThis is a catalog collection.
Collection: players{ "undrafted" : 1, "country" : "CZE", "teams" : "ARI" }Filter Explanation:
This filter searches for undrafted players born in the territory of Czech Republic (that includes the Czech part of Czechoslovakia) that ever played for the Arizona Coyotes franchise.
Collection: schedule{ "season_id" : 1, "$or" : [ { "away": BOS }, { "home": BOS } ] }Filter Explanation:
This filter searches for the games where the Boston Bruins participated in the season opener either as the home or as the away team.
Filter Explanation:{ "conferences": "5bf71a159ad6904d9124db0f" }Filter Explanation:
This filter searches all the season where the conference is of the id given above (the one you fished before, probably.
Collection: shot_typesThis is a catalog collection.
Collection: stopreasonsThis is a catalog collection.
Filter Explanation:This is a catalog collection.
Collection: teams{ "folded" : 1, "founded" : { "$gte" : 1930 } }Filter Explanation:
This filter searches for teams that were founded since 1930 and folded.
Collection: zonesThis is a catalog collection.
It's easy to become the MoreHockeyStats API user!
In certain cases we may agree to provide you a free access to the data: