1. Description
This document is intended to serve software developers as an implementation guide for integration with Content API.
Content API – component which provides historical data of downloading and sharing content using the BitTorrent protocol. Historical data is based on data from DHT network and in rare cases can be inaccurate.
2. Connectivity
2.1. Connection type
Connection to Content API is available over the HTTPS protocol based on REST.
Every request that your application sends to the Content API needs to contain API key as GET parameter key
.
Please request API key from your manager.
2.2. Content Summary Statistics
You can get Content Summary Report:
- where
-
-
host
- hostname, will be provided. -
day
- day, format "yyyy-MM-dd". -
imdb
- IMDB ID, optional. Response contains all contents if IMDB ID is not specified. You can pass severalimdb
like 'imdb=tt2345759&imdb=tt1631867' -
countryCode
- ISO 3166-1 alpha-2 country code, optional. Response contains all countries ifcountryCode
is not specified. -
short
- short report, true/false. Optional, by default - false. -
key
- API Key.
-
Response format - Json, example:
{
"day": "2017-02-06",
"totalPeers": 10085580,
"contents": [
{
"imdb": "tt1567432",
"name": "Teen Wolf",
"totalPeers": 22268,
"countries": [
{
"code": "BR",
"peers": 3296
},
{
"code": "US",
"peers": 2234
},
{
"code": "RU",
"peers": 1481
}
]
},
{
"imdb": "tt3300542",
"name": "London Has Fallen",
"totalPeers": 20064,
"countries": [
{
"code": "RU",
"peers": 5141
},
{
"code": "FR",
"peers": 1135
},
{
"code": "UA",
"peers": 1044
}
]
}
]
}
Short report is the same report without "countries" in response Json.
- Response JSON fields
Field | Description |
---|---|
|
Date of report |
|
Sum of totalPeers of all contents |
|
Array of contents |
|
imdbId of movie |
|
Title of movie |
|
Total unique ip sharing/downloading content |
|
Statistics by country |
|
Country ISO code |
|
Number of unique ip in country |
Report for previous day usually is ready at 8 A.M. UTC+0.
2.3. Content Downloads Statistics
Downloads is number of new unique pairs ip-content per day. You can get Content Downloads Report:
- where
-
-
host
- hostname, will be provided. -
day
- day, format "yyyy-MM-dd". -
imdb
- IMDB ID, optional. Response contains all contents if IMDB ID is not specified. You can pass severalimdb
like 'imdb=tt2345759&imdb=tt1631867' -
countryCode
- ISO 3166-1 alpha-2 country code, optional. Response contains all countries ifcountryCode
is not specified. -
short
- short report, true/false. Optional, by default - false. -
key
- API Key.
-
Response format - Json, example:
{
"day": "2017-06-06",
"totalDownloads": 5464699,
"contents": [
{
"imdb": "tt3315342",
"name": "Logan",
"totalPeers": 59557,
"countries": [
{
"code": "CN",
"peers": 933
},
{
"code": "AU",
"peers": 525
}
]
},
{
"imdb": "tt4425200",
"name": "John Wick: Chapter Two",
"totalPeers": 59147,
"countries": [
{
"code": "BY",
"peers": 1393
},
{
"code": "US",
"peers": 2899
}
]
}
]
}
Short report is the same report without "countries" in response Json.
- Response JSON fields
Field | Description |
---|---|
|
Date of report |
|
Sum of totalDownloads of all contents |
|
Array of contents |
|
imdbId of movie |
|
Title of movie |
|
Total downloads per day |
|
Statistics by country |
|
Country ISO code |
|
Number of downloads in country |
Report for previous day usually is ready at 10 A.M. UTC+0.
2.4. HTTP response codes
-
200 - OK
-
500 - Internal server error