Introduction
VICE provides a simple and powerful REST API to integrate its platform into your application.
This API reference provides information on available endpoints and how to interact with them.
Please visit our Getting Started doc for information on important resources and concepts, authentication, and recommended access patterns.
Pagination
All GET endpoints which return an object list support pagination with pagination information in the headers. This means that to get all objects, you need to paginate through the results.
Default limit is set to 10 but values up to 25 are permitted. Due to permissions and access level control, the response list might in some cases return less objects than specified by the limit parameter. This is normal behaviour and should be expected.
The result list is in descending order by default (newest item first) but it can be reversed by supplying order=-:field
instead, where field represents the order you want to sort by, please refer to the specific resource to discover possible values.
Optional arguments
Parameter | Description |
---|---|
per_page Number |
Number of results per call. Accepted values: 0 - 25. Default 10 |
page Number |
An offset for use in pagination. page is the current offset times the count of items you want to start with. |
published_at String |
Fetch list of items based on a given date range. Possible values are a string separated by a comma in the format of YYYYMMDD e.g. 20171201,20171231 , or {number}_{unit} compared to current time e.g. 12_hours (sets the start time as 12 hours ago, end time now ) |
Request context
VICE operates a global editorial and contains multiple channels (verticals). Every client is provided with a default context (site, locale and publish state), the following parameters allow VICE clients to request data for specific context to display listed objects or individual items.
If you request a context thats beyond the scope of your client you will recieve a 401.
Optional arguments
Parameter | Description |
---|---|
site String |
site name, see sites for more details and possible values |
locale String |
locale locale_fragment , see locales for more details and possible values |
status Number |
published status, most clients will have this set to published only. Refer to content policies for more details |
Feed Visibility
Feed visibility describes where an object should be listed, it contains the following are the definitions:
- PUBLIC: Object will appear in feeds, sites, sitemaps, etc. Object has a public page, and may appear on show/topic pages, and in search results.
- UNLISTED: Object will not appear in feeds and sites. Object has a public page, and may appear on show/topic pages, and in search results.
- EMBED ONLY: Object does not have a public page, will not appear on sites and feeds. It may still be embedded where desired using the embed code.
Optional arguments
Parameter | Description |
---|---|
feedvisibility Boolean |
Get a list of public objects, true for public and false for unlisted |
embed Boolean |
Include embed only objects |
Filters
Each resource that you can retrieve through the API supports a set of filters for limiting the result set. For example, by using the &web_id=<some_string>
filter, you can limit the result set to only include articles with the given web_id
(which, in this case, will be at most 1 article).
All filters in the API support comma-separated lists and logical negation. Comma-separated lists are filters like &web_id=aaa,bbb,ccc,
which in this case would limit the result set to those three articles. Logical negation is possible by prefixing a filter with not_
. For example, using the filter ¬_web_id=aaa,bbb,ccc
would retrieve all articles except the specified three.
Optional arguments
Parameter | Description |
---|---|
:field String |
field to filter by, see specific resource for possible values. Replace :field for proper property |
not_:field String |
exclude field value from results, see specific resource for possible values. Replace :field for proper property |
Versioning
When we make backwards-incompatible changes to the API, we release new, dated versions.
To set the API version on a specific request, send a X-Vice-Version
header on all calls.
The format of the version should be YYYY-MM-DD
, this can be the current date where changes where made in the client and it does not have to match a specific version in the API changelog
Authentication
VICE uses JWT tokens for authentication, and follows the OAUTH 2.0 protocol
Token types
- Acess token: self contained access code to access resources diretly. Usually have an expiration date and are short-lived
- Refresh token: grants access to get new access tokens. Commonly used to get new access tokens after old ones expire or getting access to a new resource for the first time. Refresh tokens can also expire but are long-lived.
Security considerations
Refresh tokens should be stored securely. If a refresh token is leaked, it can be used to generate new acccess tokens until is blacklisted or expires (usually more than 30 days). Access tokens should also be kept secure but considerations are less strict since they are short-lived
Application-Only Authentication
Allows for applications to obtain a Bearer token which can be used to make API requests without a user context. This token can be generating by using the client credentials method
Tokens can be invalidated using DELETE /token.
Tokens received by this method should be cached. If attempted too frequently, requests will be rejected with a HTTP 429
Authorization Request header field
The access token can be sent in the Authorization request header defined by HTTP/1.1 [RFC2617], the client should use the Bearer authentication scheme to transmit the access token.
curl "https://api.vice.com/resource"
-H "Authorization: Bearer mF_9.B5f-4.1JqM"
const rp = require('request-promise');
const basicAuth = Buffer.from(`${:clientId}:${:clientSecret}`).toString('base64');
const options = {
uri: `https://api.vice.com/resource`,
headers: {
Authorization: `Basic ${basicAuth}`,
},
};
rp(options)
.then((res) => {
// API response
})
.catch((err) => {
// API call failed...
});
The syntax of the Authorization header field for this scheme follows the usage of the Basic scheme defined in Section 2 of [RFC2617].
The client credentials can be also sent in the Authorization header in the base64(client:secret) form.
curl "https://api.vice.com/resource"
-H "Authorization: Basic YmVhdTpiZWF1
User Authentication and Registration
In addition to generating a token using your client credentials, you can also create and login new users. These users will be associated with your client id and will be able to make requests to the API using their own tokens.
For an example of how to use the user signin API calls see https://github.com/VICEMedia/user-auth-example
Logging in with external provider
We currently support three external login providers: google
, facebook
, and okta
(for internal users only, and the only ones currently with more than readonly access).
To login with one of these providers you make a request to:
GET https://api.vice.com/v1/authorize/<provider>?client_id=<client_id>&redirect_url=<redirect_url>
This will return a 302 redirect which you should redirect the user to where they will be taken through the given provider's authentication process at the end of which the user will be brought back to the passed in "redirect_url" with the user's access_token added to the hash.
Setting token on cookie
In addition to setting your token in the Authorization header of a request, if your client is configured with the cookie_name setting, then upon login the user will have their token set to the to the SB_SID
cookie. Subsequent requests sent to the API with this cookie will automatically be authenticated.
Invalidating token
To invalidate a client's token you can hit:
GET https://api.vice.com/v1/logout
Which will add the token to a blacklist and subsequent requests with this token will fail
Associating account with another login strategy
By default logging in from different providers with the same verified email address will merge the login strategies to one account. However, if you want to associate a user's account with another login provider that may not have the same email then you can send them to the /v1/authorize
route with their SB_SID cookie set. If they make the final callback to the API server with their user token provided then the new login strategy will be added to their user.
Registering and logging in with email/password
A new user can be created with an email/password login strategy by sending JSON formatted POST request:
POST https://api.vice.com/v1/users
with the a data payload of the format:
json
{
"email": "",
"password": "",
}
An email will be sent to the user with a confirmation link after which their account will be verified and they can login with:
POST https://api.vice.com/v1/token
json
{
"email": "",
"password": "",
"grant_type": "password",
}
If a custom confirmation landing page is being used, the user's confirmation token can be passed to the following endpoint:
GET https://api.vice.com/v1/verify_email/:token
To have the user's token confirmed and have their email login activated.
Checking if email has been verified
You can check to see if a user has a verified email by hitting:
GET https://api.vice.com/v1/users/:user_id/isVerified
json
{
"verified": true
}
An email confirmation can be resent
A confirmation email can be resent to an email address, if that address has been registered and not already verified, with:
A new user can be created with an email/password login strategy by sending JSON formatted POST request:
POST https://api.vice.com/v1/users/resend
json
{
"email": "",
}
Resetting password
To trigger a password reset email send a:
POST https://api.vice.com/v1/forgot
with a data payload of the format
json
{
"email": ""
}
A password reset email will then be sent to the passed in email address with a one-time link allowing the user to change their password
MVPD TV cable login
The following refers to the workflow for cable login authentication. For all mvpd requests the device id will be required
Get codes page
Genereates the code with the steps required for login
GET https://api.vice.com/<API version>/mvpd/devices/:device-id/codes
{
"id": "8a574ebf-9896-4138-981a-5620f4c35c14",
"code": "XRMW5Z5",
"requestor": "VICELAND",
"generated": 1544813174336,
"expires": 1544814974336,
"deviceId": "MzIxMzIxMzIxMzIxMzEyMw==",
"registrationURL": "https://staging-viceland.viceops.net/en_us/activate"
}
Object Properties
Property and type | Nullable | Description | Example |
---|---|---|---|
id string |
false | ID of the generated code | 8a574ebf-9896-4138-981a-5620f4c35c14 |
code string |
false | code required to login | XRMW5Z5 |
requestor string |
false | Identificator used to login with cable providers | VICELAND |
generated number |
false | Timestamp when the code was generated | 1544813174336 |
expires number |
false | Timestamp when the code will expire | 1544814974336 |
deviceId string |
false | base64 encoded device id | MzIxMzIxMzIxMzIxMzEyMw== |
registrationURL string |
false | URL the user needs to go to login with cable credentials | https://staging-viceland.viceops.net/en_us/activate |
Authenticate
GET https://api.vice.com/<API version>/mvpd/devices/:device-id/authenticate
While the user is has the authorization code, the client should follow the data-poll-interval
passed to request in intervals if authorization has been granted. This should also be done on app start up to check if device id has logged in already. This will return a 404 if no code found
{
"expires": "1546021231000",
"mvpd": "Cablevision",
"requestor": "VICELAND",
"userId": "c2e7b65554e83a4ddecb83decf7b95dc"
}
Playback authorization
Before each playback the client should make a request to the api to retrieve a playback token.
GET https://api.vice.com/<API version>/mvpd/devices/:device-id/authorize
If a 403 is returned with noAuthz
code given, this means the user has no access from the tv provider to access the content
Query Parameters
Parameter and Type | Description | Example |
---|---|---|
title string |
Title of the video to playback | Wee%20Week |
guid string |
id of the item to playback | `057a204088cb727dec794c67f |
rating string |
TV rating of the item | TV-ML |
Logout
GET https://api.vice.com/<API version>/mvpd/devices/:device-id/logout
Remove session from a device
Reset temp pass
DELETE https://api.vice.com/<API version>/mvpd/devices/:device-id/reset-tempass
Resets adobe temp pass
Get media token
GET https://api.vice.com/<API version>/mvpd/devices/:device-id/mediatoken
Retrieve a media token from adobe. http://tve.helpdocsonline.com/obtain-short-media-token
Query Parameters
Parameter and Type | Description | Example |
---|---|---|
title string |
Title of the video to playback | Wee%20Week |
guid string |
id of the item to playback | `057a204088cb727dec794c67f |
rating string |
TV rating of the item | TV-ML |
Get authorization token
GET https://api.vice.com/<API version>/mvpd/devices/:device-id/authz
Retrieve an authorization token from adobe. http://tve.helpdocsonline.com/retrieve-authorization-token
Query Parameters
Parameter and Type | Description | Example |
---|---|---|
title string |
Title of the video to playback | Wee%20Week |
guid string |
id of the item to playback | `057a204088cb727dec794c67f |
rating string |
TV rating of the item | TV-ML |
Get user metadata
GET https://api.vice.com/<API version>/mvpd/devices/:device-id/usermetadata
Retrieve an authorization token from adobe. http://tve.helpdocsonline.com/user-metadata-call
Query Parameters
Parameter and Type |
---|
appId string |
deviceUser string |
User Profile Management
The /me
route and its subroutes can be used to manage user identity and profiles of different contexts associated with the user. The use of these endpoints requires that your request be associated with a user.
Get User and Client Info
Get the user and client information associated with the passed in token.
HTTP Request
GET https://api.vice.com/v1/me
{
"_id":"59a99799374e48741e5aa94b",
"first_name":"Michael",
"last_name":"Henderson",
"updated":1504286617537,
"created":1504286617537,
"active":true,
"__v":0,
"id":"59a99799374e48741e5aa94b",
"client":{
"_id":"5759efcca6f9c6ec636b9c6b","client_id":"TvjuRjYMU90433snKO4CmSVwZ45667dsBT",
"client":"cms"
},
"email":"michael.henderson@vice.com",
"scope":[
{"site":1,"locale":4294967295},
{"site":2,"locale":4294967295},
{"site":4,"locale":4294967295},
{"site":8,"locale":4294967295},
{"site":16,"locale":4294967295},
{"site":32,"locale":4294967295},
{"site":64,"locale":4294967295},
{"site":128,"locale":4294967295},
{"site":256,"locale":4294967295},
{"site":512,"locale":4294967295},
{"site":1024,"locale":4294967295},
{"site":2048,"locale":4294967295},
{"site":4096,"locale":4294967295},
{"site":8192,"locale":4294967295},
{"site":16384,"locale":4294967295},
{"site":32768,"locale":4294967295},
{"site":65536,"locale":4294967295},
{"site":131072,"locale":4294967295}
]
}
Astro Profile
Profile management for the astro profile associated with the passed in token.
Get Astro Profile
Get the astro profile associated with the passed in token.
HTTP Request
GET https://api.vice.com/v1/me/astro
{
"id": "5c183708e775d306c377dcf5",
"place_of_birth": {
"type": "Point",
"coordinates": [
50,
4
]
},
"date_of_birth": {
"year": 1992,
"month": 5,
"day": 5
},
"time_of_birth": {
"hours": 12,
"minutes": 30
},
"phone_number": "(217) 555-1234",
"astrology_data": {
"asc": "09’30",
"moon": "09’30",
"sun": "09’30"
},
"sun_sign_override": "leo",
"zodiac": {
"sun": "leo",
"moon": "taurus",
"asc": "scorpio"
},
// The values in the `user` field are global to
// the Vice ecosystem and are shared with other services.
// Additionally, they may be autofilled by logging in with
// a third-party provider
"user": {
"first_name": "CJ",
"last_name": "DiMaggio",
"gender": "male",
"timezone": -4
},
"created_at": "2018-12-17T23:53:44.916Z",
"updated_at": "2018-12-18T01:39:13.792Z"
}
Update Astro Profile
Update the astro profile associated with the passed in token.
HTTP Request
PATCH https://api.vice.com/v1/me/astro
with a payload of application/json
data.
// Updatable fields
{
"place_of_birth": {
"type": "Point",
"coordinates": [
50,
4
]
},
"date_of_birth": {
"year": 1992,
"month": 5,
"day": 5
},
"time_of_birth": {
"hours": 12,
"minutes": 30
},
"phone_number": "(217) 555-1234",
"sun_sign_override": "leo",
"user": {
"first_name": "CJ",
"last_name": "DiMaggio",
"gender": "male",
"timezone": -4,
"new_email": "newemail@test.com",
"new_password": "newpassword",
"password": "currentpassword"
},
}
VICE Profile
Profile management for VICE.com and mobile app profile associated with the passed in token. This profile will allow users to follow their favorite sections. More functionality and settings expected to come later this year.
Get VICE Profile
Get the VICE profile associated with the passed in token.
HTTP Request
GET https://api.vice.com/v1/me/vice?locale=1&site=1
{
"id":"5d3222b71bc46800572a39cf",
"user_id":"59a99799374e48741e5aa94b",
"created_at":"2019-07-19T20:06:16.021Z",
"updated_at":"2019-07-19T20:06:45.986Z",
"following": {
"sections":[
{
"id":"5cc0c9ce1fe57a000702e280",
"title":"Entertainment",
"slug":"entertainment",
"social_title":"",
"social_description":"",
"socials": {
"id":"5cc0c9ce1fe57a000702e281",
"site_id":null,
"locale_id":"57a204068cb727dec794c573",
"channel_id":null,
"show_id":null,
"section_id":"5cc0c9ce1fe57a000702e280",
"reddit_url":"",
"tumblr_url":"",
"twitch_url":"",
"twitter_url":"",
"youtube_url":"",
"facebook_url":"",
"instagram_url":"",
"pinterest_url":"",
"soundcloud_url":"",
"tiktok_url":"",
"snapchat_url":"",
"email_newsletter":null,
"email_newsletter_weekly": null,
"reddit_handle":null,
"tumblr_handle":null,
"twitch_handle":null,
"twitter_handle":null,
"youtube_handle":null,
"facebook_handle":null,
"facebook_page_id":null,
"instagram_handle":null,
"pinterest_handle":null,
"soundcloud_handle":null,
"tiktok_handle":null,
"snapchat_handle":null,
"newsletter_signup_headline":null,
"newsletter_signup_dek":null,
"newsletter_signup_list_id":null,
"site_promotional_message":null,
"created_at":1556138446848,
"updated_at":1556138446848
},
"brand_name":null,
"brand_logo_svg_url":null,
"brand_attribution_svg_url":null,
"brand_description":null,
"brand_background":null,
"highlight_video":true,
"show_content":null,
"social_lede":null,
"web_id":"z68v6d"
}
]
},
"user": {
"id":"59a99799374e48741e5aa94b",
"first_name":"Michael",
"last_name":"Henderson",
"gender":null,
"username":null,
"timezone":null
},
"email":"michael.henderson@vice.com"
}
Update VICE Profile
Update the VICE profile associated with the passed in token.
HTTP Request
PATCH https://api.vice.com/v1/me/vice?locale=1&site=1
with a payload of application/json
data.
//Updatable fields
{
"following": {
"sections":[
"5cc0c9ce1fe57a000702e280"
]
},
"user": {
"id":"59a99799374e48741e5aa94b",
"first_name":"Michael",
"last_name":"Henderson",
"gender":null,
"username":null,
"timezone":null,
"email": "michael.henderson@vice.com",
"password": "testingTesting12345"
}
}
Follow a New Entity
This endpoint allows a user to follow a new single entity. Right now, the only type
that a user is able to follow is sections
, but in the future we will open this up to contributors
, topics
, etc.
HTTP Request
POST https://api.vice.com/v1/me/vice/follow/sections/5cc0c9ce1fe57a000702e280?locale=1&site=1
{}
Images
Images are used to add grphics to API resources, they can be attached as body content or lede images. Image types can be:
tv_background
apple_tv_background
apple_tv_banner
card
card_landscape
lede
social_lede
logo
badge
gallery-image
Guidelines
Make images high-resolution so they can be smoothly scaled down.
Use image types JPEG (with .jpg) when it can be lossly compressed (e.g when there is no text). Use PNG when you want losless compression (keep in mind this increases file size significantly)
Don't upload gifs as images, embed them as oembed or video files
Use images no larger than 10 MB.
All images attached to resources will be assigned the following crop string urls:
thumbnail_url_16_9
,thumbnail_url_1_1
,thumbnail_url_2_3
,thumbnail_url_10_4
,thumbnail_url_10_3
,thumbnail_url_7_2
,thumbnail_url_952_498
. This represents the crop in width : height (w_h)
Manipulation parameters
VICE image service allows you manipulate an image dynamically base on query params. If a parameter is passed multiple times, only the last one will take effect. Order of parameters does not matter, they're always processed in the same order.
Crop Parameters
?crop=<w>:<h>;<x>,<y>;
All variables are integer values, and an x,y
value set of 0,0
represents the top left corner of the crop.
If x and y are set to *,*
then will be automatically centered. Both width and height can be integer values representing pixels, however they can also use decimal values, such as 0.5xw:h
, which yields 50% of the width at the original height. Some special string values are also valid: center
, top
, right
, left
, bottom
.
Resize Parameter
?resize=<w>:<h>
All variables are integer values. If width is left as w
, the image will maintain the original width. If height is left as h
, the image will maintain the original height.
Output Quality Parameter
?output-quality=<quality>
Output quality value can range 1-100, where 1 is very low quality and 100 is the highest. If output-quality
parameter is used together with crop
or resize
, the output format will be jpeg
, unleass overriden with output-format
paramter.
Gravity Parameter
?gravity=<gravity>
Gravity can be used to determine the origin for the crop parameters, similar to how ImageMagick handles gravity. Valid values are: 1
(North), 2
(East), 3
(South), 4
(West), 5
(Northeast), 6
(Southeast), 7
(Southwest), 8
(Northwest). Passing any other value, or not passing gravity at all, will result in the default setting of center. You may also use the following string keys (case insensitive): north
, northeast
, east
, southeast
, south
, southwest
, west
, northwest
, center
.
Output Format Parameter
?output-format=<format>
Format to use for output. Valid values are: jpeg
, png
, webp
. If none passed, will us the original format of the image.
Info parameters
?info-format=[json|scalar]
?info-fields=[width|height|format|filesize]
?info-source=[input|output|all] ; defaults to 'all'
Can be used to output information instead of image. Parameters are info-format
, info-fields
, info-source
. You need to pass a valid info-format
to switch output to info mode. Valid values are:
Info format scalar
will only output a single field. If multiple fields are passed, the first one will be output.
Info fields width
, height
use unitless integer values corresponding to pixels.
Info source specifies if the information should be read from the input
image, from the output
image, or from both images. If there are no additional image operations passed, or image manipulation is skipped for some reason, both values will result in the same output. If input
is passed, image operations are skipped, even if corresponding parameters are passed. 'input' and 'output' information will be accessible on the corresponding object property in object output formats (json). All fields may have a value of null. Format can be on of JPEG
, PNG
or WEBP
.
Examples:
Let's start with this original image:
https://vice-images.vice.com/images/features/crops/2016/01/20/general-1453327801-crop_desktop.jpg
Now, let's add some parameters to this new image. We'll set the
output-quality
to75
https://vice-images.vice.com/images/features/crops/2016/01/20/general-1453327801-crop_desktop.jpg?output-quality=75
Now, let's set the image to display at just 100px wide, while preserving the height, still at 75% quality
https://vice-images.vice.com/images/features/crops/2016/01/20/general-1453327801-crop_desktop.jpg?resize=100:h&output-quality=75
This URL will resize the image to be 50px tall but preserving the width, now set to only 25% quality:
https://vice-images.vice.com/images/features/crops/2016/01/20/general-1453327801-crop_desktop.jpg?resize=w:50&output-quality=25
Now let's crop the image to 25% of the width, cropped from the middle of the image with
*,*
:
https://vice-images.vice.com/images/features/crops/2016/01/20/general-1453327801-crop_desktop.jpg?crop=0.25xw:h;*,*
The following will run the same crop at 25% of the width, but will start from the top left of the image with
0,0
:
https://vice-images.vice.com/images/features/crops/2016/01/20/general-1453327801-crop_desktop.jpg?crop=0.25xw:h;0,0
Image object
Properties and details about image objects
{
"id": "59931ea5b4d6b4437e108e43",
"article_id": null,
"video_id": null,
"linkout_id": null,
"contributor_id": null,
"topic_id": null,
"page_id": null,
"show_id": null,
"channel_id": null,
"site_id": null,
"collection_id": null,
"feature_id": null,
"homepage_carousel_item_id": null,
"base_id": null,
"cover_json": null,
"thumbnail_url": "https://video-images.vice.com/topics/5886b75ce47a7e45874c0bd8/lede/1502813860687-1502394965304-1486143918785-HOTY-lead-image_2000x1125_only.jpeg",
"thumbnail_url_16_9": "https://video-images.vice.com/topics/5886b75ce47a7e45874c0bd8/lede/1502813860687-1502394965304-1486143918785-HOTY-lead-image_2000x1125_only.jpeg?crop=1xw%3A1xh%3Bcenter%2Ccenter",
"thumbnail_url_1_1": "https://video-images.vice.com/topics/5886b75ce47a7e45874c0bd8/lede/1502813860687-1502394965304-1486143918785-HOTY-lead-image_2000x1125_only.jpeg?crop=0.517xw%3A0.9191xh%3B0.2425xw%2C0xh",
"thumbnail_url_2_3": "https://video-images.vice.com/topics/5886b75ce47a7e45874c0bd8/lede/1502813860687-1502394965304-1486143918785-HOTY-lead-image_2000x1125_only.jpeg?crop=0.375xw%3A1xh%3Bcenter%2Ccenter",
"thumbnail_url_10_4": "https://video-images.vice.com/topics/5886b75ce47a7e45874c0bd8/lede/1502813860687-1502394965304-1486143918785-HOTY-lead-image_2000x1125_only.jpeg?crop=1xw%3A0.7111xh%3B0xw%2C0.1093xh",
"thumbnail_url_10_3": "https://video-images.vice.com/topics/5886b75ce47a7e45874c0bd8/lede/1502813860687-1502394965304-1486143918785-HOTY-lead-image_2000x1125_only.jpeg?crop=1xw%3A0.5387xh%3B0xw%2C0.1911xh",
"thumbnail_url_7_10": "https://video-images.vice.com/topics/5886b75ce47a7e45874c0bd8/lede/1502813860687-1502394965304-1486143918785-HOTY-lead-image_2000x1125_only.jpeg?crop=0.39375xw%3A1xh%3Bcenter%2Ccenter",
"thumbnail_url_952_498": "https://video-images.vice.com/topics/5886b75ce47a7e45874c0bd8/lede/1502813860687-1502394965304-1486143918785-HOTY-lead-image_2000x1125_only.jpeg?crop=1xw%3A0.9299719887955181xh%3Bcenter%2Ccenter",
"url": "https://video-images.vice.com/topics/5886b75ce47a7e45874c0bd8/lede/1502813860687-1502394965304-1486143918785-HOTY-lead-image_2000x1125_only.jpeg",
"image_type": "lede",
"default": true,
"host": "https://video-images.vice.com",
"filename": "1502813860687-1502394965304-1486143918785-HOTY-lead-image_2000x1125_only.jpeg",
"filesize": 0,
"path": "topics/5886b75ce47a7e45874c0bd8/lede/",
"width": 2000,
"height": 1125,
"hash": null,
"crop_16_9": "1xw:1xh;center,center",
"crop_10_4": "1xw:0.7111xh;0xw,0.1093xh",
"crop_10_3": "1xw:0.5387xh;0xw,0.1911xh",
"crop_1_1": "0.517xw:0.9191xh;0.2425xw,0xh",
"crop_1940_1080": "1xw:0.9896907216494846xh;center,center",
"crop_1844_530": "1xw:0.5109664979513137xh;center,center",
"crop_2_3": "0.375xw:1xh;center,center",
"crop_7_10": "0.39375xw:1xh;center,center",
"crop_952_498": "1xw:0.9299719887955181xh;center,center",
"credit": null,
"alt_text": null,
"caption": null,
"vms_lede": null,
"locale_scope": 1,
"created_at": 1502813861079,
"updated_at": 1502813861268
}
HTTP Request
GET https://api.vice.com/<API version>/<API resource>/<Resource ID>/<Image type>
Object Properties
Property and type | Nullable | Description | Example |
---|---|---|---|
id string |
false | ID of the object | 5ab00c17462f6d000c91455e |
article_id string |
true | ID of the article attached to | 5ab00c17462f6d000c91455a |
video_id string |
true | ID of the video attached to | 5ab00c17462f6d000c91455a |
contributor_id string |
true | ID of the contributor attached to | 5ab00c17462f6d000c91455a |
linkout_id string |
true | ID of the contributor attached to | 5ab00c17462f6d000c91455a |
topic_id string |
true | ID of the topic attached to | 5ab00c17462f6d000c91455a |
page_id string |
true | ID of the page attached to | 5ab00c17462f6d000c91455a |
show_id string |
true | ID of the show attached to | 5ab00c17462f6d000c91455a |
channel_id string |
true | ID of the channel attached to | 5ab00c17462f6d000c91455a |
collection_id string |
true | ID of the collection attached to | 5ab00c17462f6d000c91455a |
feature_id string |
true | ID of the feature attached to | 5ab00c17462f6d000c91455a |
module_id string |
true | ID of the module attached to | 5ab00c17462f6d000c91455a |
base_id string |
true | ID of the base attached to | 5ab00c17462f6d000c91455a |
caption string |
true | Lede image caption | The L Train |
credit string |
true | Lede image credit | Court Square G platform. Photo by Harrison Leong |
alt_text string |
true | The text to be used in the alt attribute for an img tag | The L Train |
filename string |
false | Image filename | 1520959111893-Court_Square_-_Crosstown_Platform.jpeg |
cover_json string |
true | Json representation of lede unit, for internal use only | {} |
host string |
false | Host where image is localed | https://video-images.vice.com |
filesize number |
false | Size in bytes of the image | 35432 |
width number |
false | Original image width | 2000 |
height number |
false | Original image height | 1125 |
hash string |
true | deprecated | null |
vms_lede string |
true | deprecated | null |
default boolean |
fakse | VICE keeps track of all images uploaded into the system, this flag represents which image is active attached to the resource | false |
image_type enum('tv_background','apple_tv_background','apple_tv_banner','card','card_landscape','lede','logo','badge','gallery-image','social_lede') |
false | image type | lede |
thumbnail_url thumbnail_url_<WIDTH_RATIO>_<HEIGHT_RATIO> string |
false | Lede image url and all the possible crops by ratio (width_height) | https://video-images.vice.com/articles/5aa6ad57113c9e0008d9c958/lede/1520959111893-Court_Square_-_Crosstown_Platform.jpeg?crop=1xw:0.7658740039840638xh;center,center |
crop_<WIDTH_RATIO>_<HEIGHT_RATIO> string |
false | crop string of the possible crops by ratio (width_height) | 1xw:0.7111xh;0xw,0.1093xh |
locale_scope string or number |
false | Bitwise scoping, for internal use only | 1 |
created_at number |
false | Date in ms when the object was created | 1521486871766 |
updated_at number |
false | Date in ms when the object was updated | 1521486871766 |
Create image
Creates and uploads image object
HTTP Request
POST https://api.vice.com/<API version>/<API resource>/<Resource ID>/<Image type>
// Write operations are only permitted in v1.1
POST
https://api.vice.com/<API version>/<API resource>/<Resource ID>/<Image type>
Accept-Encoding: gzip, deflate
Connection: keep-alive
Content-Type: multipart/form-data; boundary=---------------------------9051914041544843365972754266
Content-Length: 554
-----------------------------9051914041544843365972754266
Content-Disposition: form-data; name="caption"
text caption
-----------------------------9051914041544843365972754266
-----------------------------9051914041544843365972754266
Content-Disposition: form-data; name="file"; filename="a.jpeg"
Content-Type: image/jpeg
Content of a.jpeg.
-----------------------------9051914041544843365972754266
Supported Content-Types are:
image/png
image/jpeg
image/jpg
Optional encodings are also supported:
Content-Encoding: gzip
Content-Encoding: deflate
Content-Transfer-Encoding: base64
Parameter and Type | Description | Required |
---|---|---|
image_type enum('tv_background', 'apple_tv_background','apple_tv_banner','card','card_landscape','lede','logo','badge','gallery-image','social_lede') |
image type, send in the url | true |
crop_<WIDTH_RATIO>_<HEIGHT_RATIO> string |
crop string of the possible crops by ratio (width_height) | false |
caption string |
Lede image caption | false |
credit string |
Lede image credit | false |
cover_json string |
Json representation of lede unit, for internal use only | false |
file stream |
File to be uploaded, see above for supported content types and encodings | true |
Update image
Update image object metadata
HTTP Request
PATCH https://api.vice.com/<API version>/<API resource>/<Resource ID>/<Image type>
PATCH https://api.vice.com/<API version>/<API resource>/<Resource ID>
PATCH
https://api.vice.com/<API version>/<API resource>/<Resource ID>/<Image type>
// Write operations are only permitted in v1.1
{
credit: 'test credit'
}
image objects can also be updated when sending a resource create or request e.g.
PATCH
https://api.vice.com/<API version>/<API resource>/<Resource ID>
// Write operations are only permitted in v1.1
{
...article data
lede: {
credit: 'test credit'
}
}
Parameter and Type | Description | Required |
---|---|---|
crop_<WIDTH_RATIO>_<HEIGHT_RATIO> string |
crop string of the possible crops by ratio (width_height) | false |
caption string |
Lede image caption | false |
credit string |
Lede image credit | false |
alt_text string |
The text to be used in the alt attribute for an img tag | false |
cover_json string |
Json representation of lede unit, for internal use only | false |
Delete image
Removes image from resource
HTTP Request
DELETE https://api.vice.com/<API version>/<API resource>/<Resource ID>/<Image type>
Upload image
General upload image route, mainly used for body content
HTTP Request
POST https://api.vice.com/<API version>/upload
// Write operations are only permitted in v1.1
POST
https://api.vice.com/<API version>/<API resource>/upload
Accept-Encoding: gzip, deflate
Connection: keep-alive
Content-Type: multipart/form-data; boundary=---------------------------9051914041544843365972754266
Content-Length: 554
-----------------------------9051914041544843365972754266
Content-Disposition: form-data; name="file"; filename="a.jpeg"
Content-Type: image/jpeg
Content of a.jpeg.
-----------------------------9051914041544843365972754266
Supported Content-Types are:
image/png
image/jpeg
image/jpg
image/gif
Optional encodings are also supported:
Content-Encoding: gzip
Content-Encoding: deflate
Content-Transfer-Encoding: base64
Parameter and Type | Description | Required |
---|---|---|
file stream |
File to be uploaded, see above for supported content types and encodings | true |
Components
Components on VICE API allows editors and affiliates to create beautiful and feature full articles within the VICE network. Its heavily based and copied from Apple news components
The following properties apply to every component
Required properties
Property and type | Description |
---|---|
role string |
The role of a component (for example, title, body, or pullquote) conveys the semantic value of the content or its function within the article overall. |
id String |
A unique identifier for this component. If used, identifier must be unique across the entire document. An identifier is required if you want to anchor other components to this component. See Anchor. This property is self-assigned when creating a new component. |
Optional properties
Property and type | Description |
---|---|
anchor Anchor |
An anchor object that aligns this component with another component. |
animation Component Animation |
A component animation object that applies an animation effect, such as a Fade-In Animation, to this component. |
behavior Behavior |
A behavior object that applies a motion effect or other physics effect, such as Parallax or Springy. |
contentDisplay Collection Display |
Defines how child components are positioned within this aside component. For example, this property can allow for displaying child components side-by-side and can make sure they are sized equally. |
layout Component Layout |
An inline component layout object that contains layout information. |
style Component Style |
An inline component style object that defines the appearance of this component. |
Get Components
Returns the components for the specified resource.
GET /v1.1/[resource]/[resource_hex_id]/components
[
{
"id": 1,
"role": "body",
"text": "Another updated body",
},
{
"id": 2,
"role": "quote",
"text": "A quote from a source",
},
{
"id": 3,
"role": "image",
"URL": "https://exampleimage.com",
"caption": "A new caption",
}
]
Create Components
Creates and/or replaces the components for the given resource id.
POST /v1.1/[resource]/[resource_hex_id]/components
// Example Payload
[
{
"id": 1,
"role": "body",
"text": "*This* is the body\n\nof the article",
},
{
"id": 2,
"role": "quote",
"text": "A quote from a source",
},
{
"id": 3,
"role": "image",
"URL": "https://exampleimage.com",
"caption": "An article's image",
}
]
Update Component
Updates an existing item within the resource’s components, identified by the “id” field
PATCH /v1.1/[resource]/[resource_hex_id]/components/[component_hex_id]
// Example payload
{
"caption": "An updated caption",
}
Delete Component
Deletes a component from the resource's components array
DELETE /v1.1/[resource]/[resource_hex_id]/components/[component_hex_id]
{
Markdown
This appendix describes how VICE components uses a subset of Markdown syntax. To learn more about Markdown, visit this Markdown website.
- Emphasis (Italics): To add italics, surround the text with single asterisks
(*)
or single underscores(_)
. - Strong (Bold): To add bold, surround the text with double asterisks
(**)
or double underscores(__)
. - Combined Emphasis (Italics) and Strong (Bold): You can nest emphasis and strong emphasis to use bold-italic font faces by using underscores and double asterisks or by using double underscores and single asterisks.
- Links: To add a link to a website or another article, use brackets and parentheses. There must be at least one character inside the brackets. Empty brackets are invalid.
- Defining Paragraphs: To separate text into paragraphs, use two new lines between the end of one paragraph and the beginning of the next paragraph. In JSON, new lines are encoded as
\n
. Use two markdown tags(\n\n)
as shown below. - Lists: To create a bulleted list item, start a new line, then type either a hyphen (-), an asterisk (*), or a plus sign (+) followed by a space.
Embed Article
A component that displays a related vice article.
Required Properties
Property and type | Description |
---|---|
role string |
This component always has the role article . |
id String |
The id of the article to display. |
{
"role": "article",
"id": "59811011570463072f5115ee"
}
Audio
Add a song to your article. The music component plays an audio file. You can also display cover art or another image that represents the music.
Required Properties
Property and type | Description |
---|---|
role string |
This component always has the role audio . |
URL String |
The URL of an audio file (HTTPS only). Only MP3, AAC, ALAC, HE-AAC audio formats are supported. |
Optional properties
Property and type | Description |
---|---|
caption String |
A caption that describes the content of the audio file. |
explicitContent Boolean |
Indicates that the audio may contain explicit content. |
imageURL String |
The URL of an image file (HTTPS only) that represents the audio file, such as a cover image. See image guidelines for requirements |
caption String |
A caption that describes the content of the video. This text can be shown when the audio cannot be played. |
{
"role": "music",
"URL": "https://www.example.com/files/sample.mp3",
"imageURL": "https://www.example.com/files/sample.jpeg",
"caption": "Cosmic-Karmic by Retake Chorus"
}
Banner Advertisement
Banner advertisements always span the full width of the display. An advertisement can appear inside a Container only if the container is full-width.
Additionally:
- Do not apply animations, scenes, or behaviors to ad components.
- Short articles that are only one "screen"can render one ad. The dimensions of visible areas vary with screen size and text size.
- If two or more ad components are placed on the same screen, only the first will be rendered.
- Do not position ads right before or after images.
- For the bannerType property, you can choose only one value. The default value, any, should generally be used because it allows any standard, double height, or large banner ad to serve within a specific ad placement, based on availability.
Required Properties
Property and type | Description |
---|---|
role string |
This component always has the role banner_advertisement . |
Optional properties
Property and type | Description |
---|---|
bannerType String |
The type of banner to show. Valid values: any (Default), standard , double_height , large |
{
"role": "banner_advertisement",
"bannerType": "standard"
}
Body
This component contains body text. An article can have multiple body components.
Required Properties
Property and type | Description |
---|---|
role string |
This component always has the role body . |
text String |
The text, you can also use a subset of Markdown defined in the markdown section |
Optional properties
Property and type | Description |
---|---|
textStyle Inline Text Style |
Either an inline component text style object that contains styling information, or a string reference to a component text style object. See Text Style for more details. |
{
"role": "body",
"text": "[News](https://news.vice.com) collects all the stories you want to read, from top news sources, based on topics you’re most interested in — so you no longer need to move from app to app to stay informed. News also combines the **rich and immersive design** found in print with the interactivity of digital media, letting you enjoy stunningly *crafted articles* that reflect the style of the publications they come from."
}
Divider
Defines a horizontal line that can be used to visually divide parts of the article.
Required Properties
Property and type | Description |
---|---|
role string |
This component always has the role divider . |
Optional properties
Property and type | Description |
---|---|
stroke Stroke Style |
Stroke properties to apply to the horizontal line. |
{
"role": "divider",
"stroke": {
"color": "#FFC800",
"width": 2
}
}
Embed Web Video
A component that displays an embeddable web video from an external source like YouTube or Vimeo.
Required Properties
Property and type | Description |
---|---|
role string |
This component always has the role embedwebvideo . |
URL String |
The URL of the embeddable video to display (the YouTube or Vimeo embed link, HTTPS only). The embed URL is usually different from the standard video URL. |
aspectRatio Float |
The aspect ratio of the video: width divided by height. The aspect ratio determines the height of the video player. |
Optional properties
Property and type | Description |
---|---|
explicitContent Boolean |
Indicates that the video may contain explicit content. |
imageURL String |
The URL of an image file (HTTPS only) that represents the video file, such as a cover image. See image guidelines for requirements |
caption String |
A caption that describes the content of the video. This text can be shown when the video cannot be played. |
autoplay Boolean |
Determine if video should autoplay when in view |
{
"role": "embedwebvideo",
"aspectRatio": 1.777,
"URL": "https://www.youtube.com/embed/_p8AsQhaVKI",
"caption": "Apple - WWDC 2015"
}
Facebook Post
Embed a Facebook post into an article.
Required Properties
Property and type | Description |
---|---|
role string |
This component always has the role facebook_post . |
URL String |
The URL of the Facebook post you want to embed. URLs for Facebook posts must include the identifier for the post. Following is an example of a Facebook post URL: https://www.facebook.com/applemusic/posts/1372231696125877. |
Optional properties
Property and type | Description |
---|---|
caption String |
A caption that describes the content of the audio file. |
explicitContent Boolean |
Indicates that the audio may contain explicit content. |
imageURL String |
The URL of an image file (HTTPS only) that represents the audio file, such as a cover image. See image guidelines for requirements |
caption String |
A caption that describes the content of the video. This text can be shown when the audio cannot be played. |
{
"role": "facebook_post",
"URL": "https://www.facebook.com/applemusic/posts/1372231696125877"
}
Gallery
A gallery component displays a sequence of images. Use this component for sequences of images where the ordering of the items is important to the story.
- Do not use a strip gallery within child containers. Only use a strip gallery in a parent container.
Required Properties
Property and type | Description |
---|---|
role string |
This component always has the role gallery . |
items Array of Image |
An array of the images that will appear in the gallery. The order used in the array may affect layout and positioning in the gallery, depending on the gallery type. Gallery items may be JPEG (with .jpg or .jpeg extension) or PNG. |
Optional properties
Property and type | Description |
---|---|
caption String |
A caption that describes the content of the gallery. |
type String |
display type of gallery, horizontal or mosaic . |
imageURL String |
The URL of an image file (HTTPS only) that represents the gallery file, such as a cover image. See image guidelines for requirements. If none provided the first image on the gallery will be used. |
{
"role": "gallery",
"items": [
{
"role": "image",
"URL": "https://www.example.com/files/image1.jpeg",
"caption": "Thanks to the record drought, mountain lions have begun to descend from the peaks, sometimes into urban settings."
},
{
"role": "image",
"URL": "https://www.example.com/files/image2.jpeg",
"caption": "Coyotes are also seen in cities more often."
},
{
"role": "image",
"URL": "https://www.example.com/files/image3.jpeg",
"explicitContent": true
}
]
}
Iframe
Embed an iframe from an external source.
Required Properties
Property and type | Description |
---|---|
role string |
This component always has the role iframe . |
URL String |
The URL of the embeddable iframe to display (HTTPS only) |
aspectRatio Float |
The aspect ratio of the iframe: width divided by height. The aspect ratio determines the height of the iframe. |
Optional properties
Property and type | Description |
---|---|
explicitContent Boolean |
Indicates that the iframe may contain explicit content. |
caption String |
A caption that describes the content of the iframe. |
{
"role": "iframe",
"aspectRatio": 1.777,
"URL": "https://news.vice.com/embed/story",
"caption": "Apple - WWDC 2015"
}
Image
Image component for displaying JPEG or PNG images.
Required Properties
Property and type | Description |
---|---|
role string |
This component always has the role image . |
URL String |
The URL of an image file (HTTPS only). See image guidelines for requirements |
aspectRatio Float |
The aspect ratio of the image: width divided by height. The aspect ratio determines the height of the iframe. |
Optional properties
Property and type | Description |
---|---|
caption String |
A caption that describes the image. |
explicitContent Boolean |
Indicates that the image may contain explicit content. |
{
"role": "image",
"aspectRatio": 1.777,
"URL": "https://www.example.com/files/sample.jpeg",
"caption": "Thanks to the record drought, mountain lions have begun to descend from the peaks, sometimes into urban settings."
}
With the Instagram component, you can embed an Instagram post in an article.
Required Properties
Property and type | Description |
---|---|
role string |
This component always has the role instagram . |
URL String |
The URL of the Instagram post you want to embed. |
{
"role": "instagram",
"URL": "https://instagram.com/p/1yHWrys9M-/"
}
Oembed
Embed an oembed object.
Required Properties
Property and type | Description |
---|---|
role String |
This component always has the role oembed . |
oEmbedId String |
The ID of the oembed object |
oEmbed Oembed response Object |
Response provided from oembed api call |
html String |
html containing embed object |
Optional properties
Property and type | Description |
---|---|
explicitContent Boolean |
Indicates that the oembed may contain explicit content. |
caption String |
A caption that describes the content of the oembed. |
{
"role": "oembed",
"oEmbedId": "kz7c191",
"oEmbed": {
"id": "kz7c191",
"url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
"type": "video",
"version": "1.0",
"title": "Rick Astley - Never Gonna Give You Up",
"author": "RickAstleyVEVO",
"author_url": "https://www.youtube.com/channel/UC38IQsAvIsxxjztdMZQtwHA",
"provider_name": "YouTube",
"description": "Rick Astley - Never Gonna Give You Up (Official Music Video) - Listen On Spotify: http://smarturl.it/AstleySpotify\nDownload Rick's Number 1 album \"50\" - https://BMG.lnk.to/RickAstley50NG/itunes\n\nBuy On iTunes: http://smarturl.it/AstleyGHiTunes\nAmazon: http://smarturl.it/AstleyGHAmazon\n\nFollow Rick Astley\nWebsite: http://www.rickastley.co.uk/\nTwitter: https://twitter.com/rickastley\nFacebook: https://www.facebook.com/RickAstley/\nInstagram: https://www.instagram.com/officialrickastley/\n\n\nLyrics\n\nWe're no strangers to love\nYou know the rules and so do I\nA full commitment's what I'm thinking of\nYou wouldn't get this from any other guy\n\nI just wanna tell you how I'm feeling\nGotta make you understand\n\nNever gonna give you up\nNever gonna let you down\nNever gonna run around and desert you\nNever gonna make you cry\nNever gonna say goodbye\nNever gonna tell a lie and hurt you\n\nWe've known each other for so long\nYour heart's been aching, but\nYou're too shy to say it\nInside, we both know what's been going on\nWe know the game and we're gonna play it\n\nAnd if you ask me how I'm feeling\nDon't tell me you're too blind to see\n\nNever gonna give you up\nNever gonna let you down\nNever gonna run around and desert you\nNever gonna make you cry\nNever gonna say goodbye\nNever gonna tell a lie and hurt you\n\nNever gonna give you up\nNever gonna let you down\nNever gonna run around and desert you\nNever gonna make you cry\nNever gonna say goodbye\nNever gonna tell a lie and hurt you\n\n(Ooh, give you up)\n(Ooh, give you up)\nNever gonna give, never gonna give\n(Give you up)\nNever gonna give, never gonna give\n(Give you up)\n\nWe've known each other for so long\nYour heart's been aching, but\nYou're too shy to say it\nInside, we both know what's been going on\nWe know the game and we're gonna play it\n\nI just wanna tell you how I'm feeling\nGotta make you understand\n\nNever gonna give you up\nNever gonna let you down\nNever gonna run around and desert you\nNever gonna make you cry\nNever gonna say goodbye\nNever gonna tell a lie and hurt you\n\nNever gonna give you up\nNever gonna let you down\nNever gonna run around and desert you\nNever gonna make you cry\nNever gonna say goodbye\nNever gonna tell a lie and hurt you\n\nNever gonna give you up\nNever gonna let you down\nNever gonna run around and desert you\nNever gonna make you cry\nNever gonna say goodbye\nNever gonna tell a lie and hurt you\nBest of Rick Astley: https://goo.gl/5Gz2Wk\nSubscribe here: https://goo.gl/nznb8D",
"thumbnail_url": "https://i.ytimg.com/vi/dQw4w9WgXcQ/maxresdefault.jpg",
"thumbnail_width": 1280,
"thumbnail_height": 720,
"html": "<div><div style=\"left: 0; width: 100%; height: 0; position: relative; padding-bottom: 56.2493%;\"><iframe data-img data-iframely-url=\"//oembed.vice.com/kz7c191?playerjs=true\" style=\"border: 0; top: 0; left: 0; width: 100%; height: 100%; position: absolute;\" allowfullscreen scrolling=\"no\"></iframe></div></div>",
"cache_age": 86400
},
"html": "<div><div style=\"left: 0; width: 100%; height: 0; position: relative; padding-bottom: 56.2493%;\"><iframe data-img data-iframely-url=\"//oembed.vice.com/kz7c191?playerjs=true\" style=\"border: 0; top: 0; left: 0; width: 100%; height: 100%; position: absolute;\" allowfullscreen scrolling=\"no\"></iframe></div></div>",
"caption": "Apple - WWDC 2015"
}
Pull Quote
A pullquote is usually an excerpt from the body text. It generally duplicates that text in a format that increases its visibility. Pull quotes are often used to break up long portions of text or to draw attention to the body text near the pull quote.
Required Properties
Property and type | Description |
---|---|
role string |
This component always has the role pullquote . |
text String |
The text, you can also use a subset of Markdown defined in the markdown section |
Optional properties
Property and type | Description |
---|---|
textStyle Inline Text Style |
Either an inline component text style object that contains styling information, or a string reference to a component text style object. See Text Style for more details. |
{
"role": "pullquote",
"text": "It didn't feel like basketball; it felt like dancing."
}
Quote
The text of a quotation. Unlike a Pull Quote, a quote is usually not duplicated content.
Required Properties
Property and type | Description |
---|---|
role string |
This component always has the role quote . |
text String |
The text, you can also use a subset of Markdown defined in the markdown section |
Optional properties
Property and type | Description |
---|---|
textStyle Inline Text Style |
Either an inline component text style object that contains styling information, or a string reference to a component text style object. See Text Style for more details. |
{
"role": "quote",
"text": "*New York City's* finest are under increased scrutiny."
}
Tweet
Embeds a Twitter tweet in an article.
Required Properties
Property and type | Description |
---|---|
role string |
This component always has the role tweet . |
URL String |
The URL of the tweet you want to embed. |
{
"role": "tweet",
"URL": "https://twitter.com/AppStore/status/591656099792683008"
}
Embed Vice Video
A component that displays an embeddable vice video.
Required Properties
Property and type | Description |
---|---|
role string |
This component always has the role video . |
id String |
The id of the embeddable video to display. |
Optional properties
autoplay
Boolean | Determine if video should autoplay when in view
{
"role": "video",
"id": "59811011570463072f5115ee"
}
Component Styles
These are optional style fields common to all components that can be embedded in other components to modify how the it will be rendered.
Component animations
The componentAnimation object defines an animation for a specific component.
Required properties
Property and type | Description |
---|---|
animation String |
Identifier for pre-defined animation type which implementors can define animation strategies for |
Optional properties
Property and type | Description |
---|---|
jsonParams Object |
Object of params applications can read to modify the animation. |
{
"role": "body",
"text": "Hello, World",
"animation": {
"animation": "ease-from-left",
"jsonParams": {
"speed": 5
}
}
}
Component layout
The componentLayouts object defines a layout for a specific component.
Required properties
Property and type | Description |
---|---|
layout String |
Identifier name to layout, that applications can read to render component in a specific already pre-defined layout. |
Optional properties
Property and type | Description |
---|---|
horizontalContentAlignment String |
Sets the alignment of the content within the component. This property applies only when the width of the content is less than the width of the component. Valid values: center (default) , left , right |
Styles
For possible component styles please refer to https://developer.apple.com/library/content/documentation/General/Conceptual/Apple_News_Format_Ref/Border.html#//apple_ref/doc/uid/TP40015408-CH55-SW1
Anchor
An anchor object anchors one component (origin) to another component (target). An anchor can be used to align components vertically. It can also be used to position a child component within its parent container.
Required properties
Property and type | Description |
---|---|
position String |
Sets the anchor point in the target component, relative to the originPosition. Possible values are top (the top of the target component should be aligned with or near the originPosition), center (the middle of the target component should be aligned with or near the originPosition), |
bottom
(the bottom of the target component should be aligned with or near the originPosition).
target
String | The identifier of the component to anchor to.
Optional properties
Property and type | Description |
---|---|
originPosition String |
Sets which point in the origin component will get anchored to the target component. The originating anchor will be positioned as closely as possible to the intended. If this property is omitted, the value of targetAnchorPosition will be used. |
{
"targetComponentIdentifier": "58477f15b00378023674c967",
"targetAnchorPosition": "bottom",
"originAnchorPosition": "bottom"
}
Base
A base is a metada object attached to object containg basic information like content and title, metadata attached to base
can be scoped to different locales
Base Object
Fecth base details by id
HTTP Request
GET https://api.vice.com/<API version>/base/<ID>
{
"id": "5ab00c17462f6d000c91455e",
"article_id": "5ab00c17462f6d000c91455a",
"video_id": null,
"contributor_id": null,
"topic_id": null,
"page_id": null,
"show_id": null,
"channel_id": null,
"collection_id": null,
"module_id": null,
"vmp_url": null,
"title": "Jordan Clarkson Believes Giant Humans Kept Dinosaurs as Pets",
"slug": "jordan-clarkson-believes-giant-humans-kept-dinosaurs-as-pets",
"display_body": "<p>The Road Trippin' podcast with Richard Jefferson, Channing Frye, and Cleveland Cavaliers sideline reporter Allie Clifton is apparently the place to go if you're an NBA player looking to unload some seriously off-the-wall takes. Just over one year ago, <a href=\"https://sports.vice.com/en_us/article/kbddva/kyrie-irving-the-earth-is-flat\" target=\"_blank\">Kyrie Irving appeared</a> to tell everyone he thought the earth was flat. </p><p>He has since become sort of the poster boy for flat earthers across the, uh, globe, and even <a href=\"https://sports.vice.com/en_us/article/qvw7bw/i-spent-a-week-looking-at-kyrie-irvings-flat-earth-instagram-feed\" target=\"_blank\">shares some dank memes</a> about it on Instagram. Not wanting to be left out off the Guards Who Proffer Batshit Opinions About Science and the World While Playing for the Cavs list, Jordan Clarkson has a take: Humans were once giants who kept dinosaurs as pets.</p><p>It's true. That Clarkson thinks this, that is. It is certifiably not true that Earth was once lousy with a bunch of Fred Flintstones and Dino the Dinosaurs.</p><p>The relevant part of the interview begins with things that another co-host, D.J. Montage, does not believe in. One of them is Elvis (that's probably worth another blog). The other is dinosaurs, which sets Clarkson off. First he says he doesn't believe in dinosaurs at all. Then he \"corrects\" himself and says they were actually dogs for, like, 75-foot-tall humans. </p><p class=\"article__blockquote\">Clarkson: I don’t believe in dinosaurs either. Well, actually I do. I believe that, OK this is going to get a little bit crazy. I’m gonna take y’all a little left on this. Y’all know how we got dogs and stuff, right? So I think it was bigger people on the world before us, and like the dinosaurs was they pets.</p><p class=\"article__blockquote\">[lots of incredulous laughing and jokes about dinosaurs on leashes]</p> <p class=\"article__blockquote\">Montage: So how big were these people?</p> <p class=\"article__blockquote\">Clarkson: Well, you look at a dinosaur, they gotta be three times bigger than them.</p><p class=\"article__blockquote\">Montage: Where are their bones?</p><p class=\"article__blockquote\">Clarkson: Mmmhmmm.</p><p>I really recommend you listen to it to hear the satisfied \"mmhmm\" at the end. It all goes down at around the 40 minute mark.</p><p>But just to set the record straight, this theory presupposes a few things we know are not even in the same geographic period with correct. First, that humans and dinosaurs lived at the same time. Scientist estimate that dinosaurs went extinct <i>66 million years ago.</i> Homo sapiens—modern humans—<a href=\"http://humanorigins.si.edu/evidence/human-fossils/species/homo-sapiens\" target=\"_blank\">evolved roughly 200,000</a> years ago. Not quite a robust Missed Connections section going on here.</p><p>Second, that not only did humans roam primordial earth with dinosaurs, but that they towered over them. I really don't think this needs to be said but, to date, no one has ever found a fossilized human femur the size of an apartment building. And lastly, that dinosaurs would not absolutely rip that giant bone off your leg if you tried to put a leash on it.<br></p><p>Anyway, skip tonight's game and just wait until Wednesday, when Cleveland plays Toronto. </p>",
"display_title": "Jordan Clarkson Believes Giant Humans Kept Dinosaurs as Pets",
"locale_scope": 1,
"created_at": 1521486871766,
"updated_at": 1521489650366,
"embed_code": "<div data-video-url=\"https://video.vice.com/en_us/embed/5a99b9d4f1cdb32e5e76b5d1?autoplay=1&volume=0\"><div style=\"left: 0; width: 100%; height: 0; position: relative; padding-bottom: 56.2493%;\"><iframe data-img src=\"https://video.vice.com/en_us/embed/5a99b9d4f1cdb32e5e76b5d1?autoplay=1&volume=0\" style=\"border: 0; top: 0; left: 0; width: 100%; height: 100%; position: absolute;\" allowfullscreen scrolling=\"no\"></iframe></div></div>",
"autoplay": false,
"word_count": 470
}
Object Properties
Property and type | Nullable | Description | Example |
---|---|---|---|
id string |
false | ID of the object | 5ab00c17462f6d000c91455e |
article_id string |
true | ID of the article attached to | 5ab00c17462f6d000c91455a |
video_id string |
true | ID of the video attached to | 5ab00c17462f6d000c91455a |
contributor_id string |
true | ID of the contributor attached to | 5ab00c17462f6d000c91455a |
topic_id string |
true | ID of the topic attached to | 5ab00c17462f6d000c91455a |
page_id string |
true | ID of the page attached to | 5ab00c17462f6d000c91455a |
show_id string |
true | ID of the show attached to | 5ab00c17462f6d000c91455a |
channel_id string |
true | ID of the channel attached to | 5ab00c17462f6d000c91455a |
collection_id string |
true | ID of the collection attached to | 5ab00c17462f6d000c91455a |
module_id string |
true | ID of the module attached to | 5ab00c17462f6d000c91455a |
vmp_url string |
true | deprecated | null |
title string |
true | Title on import, deprecated will mirror display_title | Jordan Clarkson Believes Giant Humans Kept Dinosaurs as Pets |
slug string |
true | String to display in url to prettify | jordan-clarkson-believes-giant-humans-kept-dinosaurs-as-pets |
display_body string |
true | HTML content of the attached resource | <p>The Road Trippin' podcast with Richard Jefferson</p> |
display_title string |
true | Title of the attached resource | Jordan Clarkson Believes Giant Humans Kept Dinosaurs as Pets |
locale_scope string or number |
false | Bitwise scoping, for internal use only | 1 |
created_at number |
false | Date in ms when the object was created | 1521486871766 |
updated_at number |
false | Date in ms when the object was updated | 1521486871766 |
embed_code string |
true | Embed html code for the attached resource | <div data-video-url=\"https://video.vice.com/en_us/embed/5a99b9d4f1cdb32e5e76b5d1?autoplay=1&volume=0\"><div style=\"left: 0; width: 100%; height: 0; position: relative; padding-bottom: 56.2493%;\"><iframe data-img src=\"https://video.vice.com/en_us/embed/5a99b9d4f1cdb32e5e76b5d1?autoplay=1&volume=0\" style=\"border: 0; top: 0; left: 0; width: 100%; height: 100%; position: absolute;\" allowfullscreen scrolling=\"no\"></iframe></div></div> |
autoplay boolean |
false | Autoplay flag for embedded code | true |
word_count number |
true | Article's content word count | 470 |
Base list
Fetch a list of bases, by default this list is ordered by id
[
// Array of base objects
...
]
HTTP Request
GET https://api.vice.com/<API version>/base
Query Parameters
Parameter and Type | Description | Example |
---|---|---|
ids string |
A comma-separated list of specific ids to retrieve. | 59dcea52ae54a32d39706782,5aa7db2265cc6a00065bde62 |
Create or update base
Create or update a base object
base objects are created/updated when sending a resource create request e.g.
POST /v1.1/articles
orPATCH /v1.1/articles/<ID>
// Write operations are only permitted in v1.1
{
...article data
base: {
display_title: 'test title'
}
}
Parameter and Type | Required | Description |
---|---|---|
locale_scope string |
false | A string representing the current scope the base should apply to, for internal use only |
display_title string |
false | The attached objects title |
display_body string |
false | HTML content of the attached resource |
slug string |
false | String to display in url to prettify |
embed_code string |
false | Embed html code for the attached resource |
autoplay string |
false | Autoplay flag for embedded code |
word_count string |
false | Resource's content word count |
Meta
A meta is an object attached to object containg metada information like summary, metadata attached to meta
can be scoped to different locales
Meta Object
Properties and details about meta objects
{
"id": "5ab14c16adc0970006ae12d4",
"article_id": "5ab14c16adc0970006ae12cf",
"video_id": null,
"contributor_id": null,
"topic_id": null,
"page_id": null,
"show_id": null,
"channel_id": null,
"collection_id": null,
"module_id": null,
"social_lede_id": null,
"lede_id": "5ab167f1a4ad2b0008806b47",
"dek": "The \"professional shitposter\" who goes by the name Count Dankula could wind up behind bars for up to six months.",
"summary": null,
"display_summary": null,
"facebook_title": null,
"facebook_description": null,
"promotional_text": null,
"suggested_tweet": null,
"seo_title": null,
"short_url": null,
"locale_scope": 1,
"social_description": null,
"social_title": null,
"created_at": 1521568790217,
"updated_at": 1521575921120,
"lede": {
// Image object
...
}
}
Object Properties
Property and type | Nullable | Description | Example |
---|---|---|---|
id string |
false | ID of the object | 5ab00c17462f6d000c91455e |
article_id string |
true | ID of the article attached to | 5ab00c17462f6d000c91455a |
video_id string |
true | ID of the video attached to | 5ab00c17462f6d000c91455a |
contributor_id string |
true | ID of the contributor attached to | 5ab00c17462f6d000c91455a |
topic_id string |
true | ID of the topic attached to | 5ab00c17462f6d000c91455a |
page_id string |
true | ID of the page attached to | 5ab00c17462f6d000c91455a |
show_id string |
true | ID of the show attached to | 5ab00c17462f6d000c91455a |
channel_id string |
true | ID of the channel attached to | 5ab00c17462f6d000c91455a |
collection_id string |
true | ID of the collection attached to | 5ab00c17462f6d000c91455a |
module_id string |
true | ID of the module attached to | 5ab00c17462f6d000c91455a |
social_lede_id string |
true | ID of attached social lede image | 5ab00c17462f6d000c91455a |
lede_id string |
true | ID of attached lede image | 5ab167f1a4ad2b0008806b47 |
dek string |
true | Summary that appears below the headline | The \"professional shitposter\" who goes by the name Count Dankula could wind up behind bars for up to six months. |
summary string |
true | deprecated | null |
display_summary string |
true | Short description of the attached resource, deprecated | The \"professional shitposter\" who goes by the name Count Dankula could wind up behind bars for up to six months. |
facebook_title string |
true | deprecated | null |
facebook_description string |
true | deprecated | null |
short_url string |
true | deprecated | null |
suggested_tweet string |
true | Optional tweet message | The \"professional shitposter\" who goes by the name Count Dankula could wind up behind bars for up to six months. |
seo_title string |
true | Custom page title for SEO purposes | The \"professional shitposter\" who goes by the name Count Dankula could wind up behind bars for up to six months. |
social_description string |
true | Custom description when shared in social networks | The \"professional shitposter\" who goes by the name Count Dankula could wind up behind bars for up to six months. |
social_title string |
true | Custom title when shared in social networks | The \"professional shitposter\" who goes by the name Count Dankula could wind up behind bars for up to six months. |
social_lede image object |
true | Custom image used in social platforms | See image object for details |
lede image object |
true | Resource's lede image | See image object for details |
locale_scope string or number |
false | Bitwise scoping, for internal use only | 1 |
created_at number |
false | Date in ms when the object was created | 1521486871766 |
updated_at number |
false | Date in ms when the object was updated | 1521486871766 |
Meta list
Fetch a list of metas, by default this list is ordered by id
[
// Array of meta objects
...
]
HTTP Request
GET https://api.vice.com/<API version>/<API resource>/<Resource id>/meta
Query Parameters
Parameter and Type | Description | Example |
---|---|---|
ids string |
A comma-separated list of specific ids to retrieve. | 59dcea52ae54a32d39706782,5aa7db2265cc6a00065bde62 |
Create or update base
Create or update a base object
meta objects are created/updated when sending a resource create or request e.g.
POST /v1.1/articles
orPATCH /v1.1/articles/<ID>
// Write operations are only permitted in v1.1
{
...article data
meta: {
dek: 'test dek'
}
}
Parameter and Type | Description | Required |
---|---|---|
locale_scope string |
A string representing the current scope the base should apply to, for internal use only | false |
dek string |
Summary that appears below the headline | false |
display_summary string |
Short description of the attached resource | false |
social_title string |
Custom title when shared in social networks | false |
facebook_description string |
Custom description when shared in social networks | false |
suggested_tweet string |
Optional tweet message | false |
promotional_text string |
Custom promotional message, typically used in shows | false |
seo_title string |
Custom page title for SEO purposes | false |
Content Policies
VICE distributes content accross multiple brands and countries, content policy objects determine where the attached resource is displayed and published, they also manage video visibility rules
Content policies apply on api requests based on provided context there is no action needed on the clients to implement enforcement of policies
Content Policy Object
Object and properties details of content policies objects
Status Objects Mappings
Status ID | Description |
---|---|
1 | New |
2 | Draft |
3 | Published |
4 | Expired |
5 | Deleted |
Object Properties
{
"id": "5ab14c16adc0970006ae12d1",
"display_at": null,
"created_at": 1521568790218,
"updated_at": 1521576282279,
"published_at": 1521576268435,
"deleted_at": null,
"schedule_end_date": null,
"locale_display_scope": 0,
"locale_locked_scope": 0,
"locale_feed_visibility_scope": 0,
"nsfb": 0,
"nsfw": 0,
"locale_scope": 1,
"site_scope": 7,
"locked_scope": 0,
"platform_scope": 0,
"distribution_scope": 0,
"status_id": 3,
"geo_code": "US",
"language": "en",
"url_fragment": "en_us",
"slug": "this-guy-taught-a-pug-to-heil-hitler-and-was-convicted-of-a-hate-crime-vgtrn",
"display_title": "This Guy Taught a Pug to Heil Hitler and Was Convicted of a Hate Crime",
"legacy_id": 1534298,
"urls": Array[1][
"https://www.vice.com/en_us/article/8xka4p/this-guy-taught-a-pug-to-heil-hitler-and-was-convicted-of-a-hate-crime-vgtrn"
],
"url": "https://www.vice.com/en_us/article/8xka4p/this-guy-taught-a-pug-to-heil-hitler-and-was-convicted-of-a-hate-crime-vgtrn",
"apple_news_id": "1f251d18-23e4-4a03-845d-f365f940043c",
"apple_news_share_url": "https://apple.news/AHyUdGCPkSgOEXfNl-UAEPA"
}
Property and type | Nullable | Description | Example |
---|---|---|---|
id string |
false | ID of the object | 5ab00c17462f6d000c91455e |
display_title string |
true | Title of the attached resource | Jordan Clarkson Believes Giant Humans Kept Dinosaurs as Pets |
created_at number |
false | Date in ms when the object was created | 1521486871766 |
updated_at number |
false | Date in ms when the object was updated | 1521486871766 |
published_at number |
true | Date in ms when the object was published, date can be set in the future for scheduled posts | 1521486871766 |
deleted_at number |
true | Date in ms when the object was deleted | 1521486871766 |
schedule_end_date number |
true | Date in ms when embargo date is set for publication time | 1521486871766 |
locale_scope string or number |
false | Bitwise scoping for locales, for internal use only | 1 |
site_scope string or number |
false | Bitwise scoping for sites, for internal use only | 1 |
locale_display_scope string or number |
false | deprecated | 0 |
locale_locked_scope string or number |
false | Bitwise scoping that determines in which locale content is behind paywall, for internal use only | 0 |
locale_feed_visibility_scope string or number |
false | Bitwise scoping that determines where content should be listed publicly, for internal use only | 0 |
locked_scope string or number |
false | Bitwise scoping that determines in which site content is behind paywall, for internal use only | 0 |
platform_scope string or number |
false | Bitwise scoping that determines in which platform site should not be displayed, for internal use only | 0 |
distribution_scope string or number |
false | Bitwise scoping that determines in which distribution distro content should not be displayed, for internal use only | 0 |
locale_embed_scope string or number |
false | Bitwise scoping that determines in which locale a video should be embed only, for internal use only | 0 |
locale_do_not_promote_scope string or number |
false | Bitwise scoping that determines in which locales the associated asset should not be promoted in, for internal use only | 0 |
status_id enum(1,2,3,4,5) false |
Status code that represents publish state of content | 3 |
|
geo_code string |
false | GEO Location code where this policy applies | 3 |
language string |
false | Language code where this policy applies | en |
url_fragment string |
false | url_fragment where this policy applies |
en_us |
slug string |
false | String to display in url to prettify | jordan-clarkson-believes-giant-humans-kept-dinosaurs-as-pets |
legacy_id number |
false | ID for tracking purposes on legacy systems | |
urls array of string |
false | List of urls where content can be present, VICE publishes articles across multiple sites and regions | ["https://www.vice.com/en_us/article/9kzpxp/the-l-train-shutdown-is-bad-news-for-queens-too"] |
url string (deprecated) |
false | Url in the current context (site and locale) | https://www.vice.com/en_us/article/9kzpxp/the-l-train-shutdown-is-bad-news-for-queens-too |
apple_news_id string |
true | ID for content publised in apple news | 1f251d18-23e4-4a03-845d-f365f940043c |
apple_news_share_url string |
true | url for article publised in apple news | https://apple.news/AHyUdGCPkSgOEXfNl-UAEPA |
Content Policies list
Fetch a list of content policies, by default this list is ordered by id
[
// Array of content policies objects
...
]
Query Parameters
Parameter and Type | Description | Example |
---|---|---|
ids string |
A comma-separated list of specific ids to retrieve. | 59dcea52ae54a32d39706782,5aa7db2265cc6a00065bde62 |
Create or update content policy
Create or update a content policy object
content policy objects are created/updated when sending a resource create or request e.g.
POST /v1.1/articles
orPATCH /v1.1/articles/<ID>
// Write operations are only permitted in v1.1
{
...article data
content_policy: {
locale_scope: '2'
}
}
Parameter and Type | Description | Required |
---|---|---|
published_at number |
Date in ms when the object was published, date can be set in the future for scheduled posts | false |
schedule_end_date number |
Date in ms when embargo date is set for publication time | false |
locale_scope string or number |
Bitwise scoping for locales | false |
site_scope string or number |
Bitwise scoping for sites | false |
locale_locked_scope string or number |
Bitwise scoping that determines in which locale content is behind paywall | false |
locale_feed_visibility_scope string or number |
Bitwise scoping that determines where content should be listed publicly | false |
locked_scope string or number |
Bitwise scoping that determines in which site content is behind paywall | false |
platform_scope string or number |
Bitwise scoping that determines in which platform site should not be displayed | false |
distribution_scope string or number |
Bitwise scoping that determines in which distribution distro content should not be displayed | false |
locale_embed_scope string or number |
Bitwise scoping that determines in which locale a video should be embed only | false |
locale_do_not_promote_scope string or number |
Bitwise scoping that determines in which locales the associated asset should not be promoted in | false |
status_id enum(1,2,3,4,5) |
Status code that represents publish state of content | false |
Slugs
A slug is used to prettify the url the user access publicly they are unique per resource globally.
Slug Object
Properties and details about meta objects
{
"id": "5886b75ce47a7e45874c0bdd",
"article_id": null,
"video_id": null,
"contributor_id": null,
"topic_id": "5886b75ce47a7e45874c0bd8",
"page_id": null,
"show_id": null,
"channel_id": null,
"collection_id": null,
"module_id": null,
"slug": "humans-of-the-year",
"foreign_key": "topic_id",
"default": true,
"created_at": 1485223772435,
"updated_at": 1485223772435
}
Object Properties
Property and type | Nullable | Description | Example |
---|---|---|---|
id string |
false | ID of the object | 5ab00c17462f6d000c91455e |
article_id string |
true | deprecated | 5ab00c17462f6d000c91455a |
video_id string |
true | ID of the video attached to | 5ab00c17462f6d000c91455a |
contributor_id string |
true | ID of the contributor attached to | 5ab00c17462f6d000c91455a |
topic_id string |
true | ID of the topic attached to | 5ab00c17462f6d000c91455a |
page_id string |
true | ID of the page attached to | 5ab00c17462f6d000c91455a |
show_id string |
true | ID of the show attached to | 5ab00c17462f6d000c91455a |
channel_id string |
true | ID of the channel attached to | 5ab00c17462f6d000c91455a |
collection_id string |
true | ID of the collection attached to | 5ab00c17462f6d000c91455a |
module_id string |
true | ID of the module attached to | 5ab00c17462f6d000c91455a |
slug false |
true | String to display in url to prettify | jordan-clarkson |
foreign_key string |
false | String that represents what fk they are attached to, internal use only | topic_id |
default boolean |
false | For seo purposes we keep track of previous slugs attached to a resource, this flag determines which slug is currently active | true |
created_at number |
false | Date in ms when the object was created | 1521486871766 |
updated_at number |
false | Date in ms when the object was updated | 1521486871766 |
Slug list
Fetch a list of slugs for a given resource
HTTP Request
GET https://api.vice.com/<API version>/<API resource>/<Resource id>/slugs
[
// Array of slug objects
...
]
Create or update slug
Create or update a slug object
slug objects are created/updated when sending a resource create request e.g.
POST /v1.1/topics
orPATCH /v1.1/topics/<ID>
// Write operations are only permitted in v1.1
{
...topic data
slug: {
slug: 'new-slug'
}
}
Parameter and Type | Required | Description |
---|---|---|
slug string |
false | String to display in url to prettify |
Sites
A Site is a home for that channel on the web. Not all Channels have a Site. eg. https://broadly.vice.com
Site Object
Fecth site details by id
HTTP Request
GET https://api.vice.com/<API version>/sites/<ID>
{
"id": "57a204058cb727dec794c567",
"name": "vice",
"url": "www.vice.com",
"enabled": true,
"badge": null,
"favicon": {
// Deprecated
},
"display_name": "VICE",
"legacy_id": 3,
"socials": {
// Deprecated
},
"twitter_url": "https://twitter.com/vice",
"facebook_url": "https://www.facebook.com/vice",
"facebook_page_id": "261330507662232, 814185111976252, 115384328477363, 218982941873, 65088937560, 656832881044884, 139104349474671, 493861597337594, 1733383370215660, 167115176655082, 235852889908002, 1482820258618380, 130581413665173, 100575810307679, 1587973284768252, 283321618725390",
"instagram_url": "https://www.instagram.com/vice",
"youtube_url": "https://www.youtube.com/user/vice",
"tumblr_url": "https://vicemag.tumblr.com",
"pinterest_url": "https://www.pinterest.com/vicemag",
"reddit_url": "https://www.reddit.com/user/vice",
"reddit_handle": "vice",
"soundcloud_url": "",
"twitch_url": "",
"twitch_handle": null,
"site_promotional_message": null
}
{
"id": "57a204058cb727dec794c567",
"name": "vice",
"bitwise": 1,
"url": "www.vice.com",
"enabled": true,
"legacy_id": 3,
"created_at": null,
"updated_at": 1485795201,
"display_name": "VICE",
"badge": null,
"socials": {
// Socials object
...
},
"favicon": {
// Deprecated
}
}
Object Properties
Property and type | Nullable | Description | Example |
---|---|---|---|
id string |
false | ID of the site | 5aa6ad57113c9e0008d9c958 |
name string |
false | identifier name for the site | vice |
display_name string |
false | Name for the site | VICE |
url string |
false | Public url of the site | www.vice.com |
enabled boolean |
false | Flag to determine if site is live | true |
badge string |
true | deprecated | null |
socials string |
true | deprecated | null |
favicon string |
true | deprecated | null |
site_promotional_message string |
true | Promotional message to display for the site | VICE is great |
legacy_id number |
true | Legacy ID reference | 132 |
email_newsletter string |
true | Email subsciption url | https://www.vice.com/en_us/subscribe |
facebook_handle string |
true | Site's facebook handle | Google |
twitter_url string |
true | Site's twitter | https://twitter.com/Google |
twitter_handle string |
true | Site's twitter handle | Google |
instagram_url string |
true | Site's instagram | https://instagram.com/Google |
instagram_handle string |
true | Site's instagram handle | google |
instagram_url string |
true | Site's youtube | https://www.youtube.com/channel/UCNDUud96oGK5xQ9gyg913vw |
tumblr_url string |
true | Site's tumblr | http://viceland.tumblr.com/ |
pinterest_url string |
true | Site's pinterest | https://www.pinterest.com/lisathephyco/desus-and-mero/ |
reddit_url string |
true | Site's reddit | https://www.reddit.com/r/bodegaboys/ |
reddit_handle string |
true | Site's reddit handle | bodegaboys |
soundcloud_url string |
true | Site's soundcloud | https://soundcloud.com/bodega-sushi |
twitch_url string |
true | Site's twitch | https://www.twitch.tv/waypoint |
twitch_handle string |
true | Site's twitch handle | waypoint |
facebook_page_id string |
true | CSV of Facebook pages id for the site | 261330507662232, 814185111976252 |
Sites list
Fetch a list of sites
HTTP Request
GET https://api.vice.com/<API version>/sites
This request will return an array of site objects, for more details on pagination see https://api-docs.vice.com/#pagination
[
// Array of channel objects
...
]
Query Parameters
Parameter and Type | Description | Example |
---|---|---|
ids string |
A comma-separated list of specific sites ids to retrieve. | 59dcea52ae54a32d39706782,5aa7db2265cc6a00065bde62 |
url string |
Filter site by url | www.vice.com |
enabled string |
Filter site by status | false |
name string |
Filter site by identifier | vice |
filter_by_locale 'false' or 'true' or '0' or '1' |
If set, results will be filtered to only those sites which are available to your specified locale | false |
Create site
Update a site object
Updates a site object
HTTP Request
Update site PATCH https://api.vice.com/<API version>/sites/<ID>
PATCH /v1.1/sites/<ID>
// Write operations are only permitted in v1.1
{
"url": "www.vice.com",
"enabled": true,
"display_name": "VICE",
"socials": {
// Social object
...
}
}
Parameter and Type | Description | Required on create |
---|---|---|
display_name string |
false | Name for the site |
url string |
Public url of the site | true |
enabled boolean |
false | Flag to determine if site is live |
socials socials object |
See socials object for details | false |
Delete site
Locales
A Locale is a region-language into which VICE distributes content. Locales are expressed in urls as a string consisting of one or both of the ISO language and region codes, eg. en_us, sv, bg.
A Site + Locale defines an edition of a site, eg. "Motherboard Brazil"
Locale Object
Fecth locale details by id
HTTP Request
GET https://api.vice.com/<API version>/locales/<ID>
{
"id": "57a204068cb727dec794c580",
"label": "Colombia",
"abbreviation": "CO",
"url_fragment": "es_co",
"language": "es",
"country": "CO",
"geo_code": "CO",
"bitwise": 2048,
"legacy_id": 12,
"site_scope": 51,
"created_at": null,
"updated_at": 1490214941216
}
Object Properties
Property and type | Nullable | Description | Example |
---|---|---|---|
id string |
false | ID of the season | 5aa6ad57113c9e0008d9c958 |
label string |
false | Label for the locale | Colombia |
abbreviation string |
false | 2 letter code for the locale | CO |
url_fragment string |
false | locale code how it displays in public urls | es_co |
language string |
false | language code for the locale | es |
country string |
false | country code for the locale | CO |
geo_code string |
false | geo code for the locale | CO |
bitwise string or number |
false | Bitwise scoping, for internal use only | 1 |
legacy_id number |
false | ID for tracking purposes on legacy systems | 1 |
site_scope string or number |
false | Bitwise scoping for sites, for internal use only | 1 |
created_at number |
false | Date in ms when the object was created | 1521486871766 |
updated_at number |
false | Date in ms when the object was updated | 1521486871766 |
Locales list
Fetch a list of locales
HTTP Request
GET https://api.vice.com/<API version>/locales
This request will return an array of locales objects, for more details on pagination see https://api-docs.vice.com/#pagination
[
// Array of locales objects
...
]
Query Parameters
Parameter and Type | Description | Example |
---|---|---|
ids string |
A comma-separated list of specific locales ids to retrieve. | 59dcea52ae54a32d39706782,5aa7db2265cc6a00065bde62 |
abbreviation string |
Filter by abbreviation | CO |
language string |
Filter by language | es |
country string |
Filter by country code | CO |
geo_code string |
Filter by geo code | CO |
Create or update a locales object
Channels
A Channel is a brand under which content is produced and distributed eg. Broadly, Motherboard, Noisey.
Channel Object
Fecth channel details by id
HTTP Request
GET https://api.vice.com/<API version>/channels/<ID>
{
"id": "57a204088cb727dec794c67b",
"name": "vice",
"url": "www.vice.com",
"twitter_url": "https://twitter.com/VICE",
"facebook_url": "https://www.facebook.com/VICE",
"facebook_page_id": null,
"instagram_url": "https://www.instagram.com/VICE",
"youtube_url": "",
"tumblr_url": "",
"pinterest_url": "",
"reddit_url": "https://www.reddit.com/user/vice",
"reddit_handle": "vice",
"soundcloud_url": "",
"twitch_url": "",
"twitch_handle": null,
"site_promotional_message": null,
"color": "#000000",
"dek": "The definitive guide to enlightening information.",
"slug": "vice",
"original_id": 1,
"social_description": null,
"social_title": null,
"badge_url": "https://video-images.vice.com/channels/57a204088cb727dec794c67b/badge/1487174972413-vice-circle-badge3x.png",
"thumbnail_url": "https://video-images.vice.com/images/channel/1/lede/VICEBLACK_333x333.png",
"social_lede": null,
"light_logo_url": "https://video-images.vice.com/channels/57a204088cb727dec794c67b/logo/1487174972395-vice-thick-white3x.png",
"light_logo_url_1_1": "https://video-images.vice.com/channels/57a204088cb727dec794c67b/logo/1487174972395-vice-thick-white3x.png?crop=0.31446540880503143xw:1xh;center,center",
"light_logo_url_10_4": "https://video-images.vice.com/channels/57a204088cb727dec794c67b/logo/1487174972395-vice-thick-white3x.png?crop=0.7861635220125787xw:1xh;center,center",
"light_logo_url_16_9": "https://video-images.vice.com/channels/57a204088cb727dec794c67b/logo/1487174972395-vice-thick-white3x.png?crop=0.5590496156533893xw:1xh;center,center",
"dark_logo_url": null,
"dark_logo_url_1_1": null,
"dark_logo_url_10_4": null,
"dark_logo_url_16_9": null
}
{
"id": "57a204088cb727dec794c67b",
"name": "vice",
"color": "#000000",
"url": "www.vice.com",
"slug": "vice",
"keywords": null,
"legacy_id": 1,
"site_scope": 7,
"locale_scope": 541165879295,
"created_at": null,
"updated_at": null,
"favicon": null,
"logo": {
// Image object
...
},
"lede": {
// Image object
...
},
"badge": {
// Image object
...
},
"meta": {
// Meta object
...
},
"socials": {
// Socials object
...
},
"viewing_methods": [
],
"social_lede": {
// Image object
...
}
}
Object Properties
Property and type | Nullable | Description | Example |
---|---|---|---|
id string |
false | ID of the channel | 5aa6ad57113c9e0008d9c958 |
name string |
false | Display name for the channel | vice |
url string |
false | Public url where brand is present | www.vice.com |
site_promotional_message string |
true | Promotional message to display for the channel | VICE is great |
color string |
false | hex color that represents the brand | #000000 |
original_id number |
true | Legacy ID reference | 132 |
social_description string |
true | Custom channel description presented on social media platforms | Residents are concerned the upcoming closure will make commuting in Long Island |
social_title string |
true | Custom channel title presented on social media platforms | The L Train Shutdown Is Bad News for Queens, Too |
slug string |
false | Pretty custom url path | the-l-train-shutdown-is-bad-news-for-queens-too |
email_newsletter |
true | Email subsciption url | https://www.vice.com/en_us/subscribe |
facebook_handle |
true | Channel's facebook handle | Google |
twitter_url |
true | Channel's twitter | https://twitter.com/Google |
twitter_handle |
true | Channel's twitter handle | Google |
instagram_url |
true | Channel's instagram | https://instagram.com/Google |
instagram_handle |
true | Channel's instagram handle | google |
instagram_url |
true | Channel's youtube | https://www.youtube.com/channel/UCNDUud96oGK5xQ9gyg913vw |
tumblr_url |
true | Channel's tumblr | http://viceland.tumblr.com/ |
pinterest_url |
true | Channel's pinterest | https://www.pinterest.com/lisathephyco/desus-and-mero/ |
reddit_url |
true | Channel's reddit | https://www.reddit.com/r/bodegaboys/ |
reddit_handle |
true | Channel's reddit handle | bodegaboys |
soundcloud_url |
true | Channel's soundcloud | https://soundcloud.com/bodega-sushi |
twitch_url |
true | Channel's twitch | https://www.twitch.tv/waypoint |
twitch_handle |
true | Channel's twitch handle | waypoint |
dek string |
true | Summary that appears below the headline | Short videos by VICE News. |
badge_url string |
true | URL that contains badge image for channel | https://video-images.vice.com/channels/57a204088cb727dec794c67b/badge/1487174972413-vice-circle-badge3x.png |
thumbnail_url string |
true | Lede image url | https://video-images.vice.com/articles/5aa6ad57113c9e0008d9c958/lede/1520959111893-Court_Square_-_Crosstown_Platform.jpeg?crop=1xw:0.7658740039840638xh;center,center |
light_logo_url light_logo_url_<WIDTH_RATIO>_<HEIGHT_RATIO> string |
true | Channel logo and all the possible crops by ratio (width_height) | https://video-images.vice.com/articles/5aa6ad57113c9e0008d9c958/lede/1520959111893-Court_Square_-_Crosstown_Platform.jpeg?crop=1xw:0.7658740039840638xh;center,center |
dark_logo_url dark_logo_url_<WIDTH_RATIO>_<HEIGHT_RATIO> string |
true | deprecated | null |
social_lede image object |
true | Custom image used in social platforms | See image object for details |
Channels list
Fetch a list of channels
HTTP Request
GET https://api.vice.com/<API version>/channels
This request will return an array of channel objects, for more details on pagination see https://api-docs.vice.com/#pagination
[
// Array of channel objects
...
]
Query Parameters
Parameter and Type | Description | Example |
---|---|---|
ids string |
A comma-separated list of specific channels ids to retrieve. | 59dcea52ae54a32d39706782,5aa7db2265cc6a00065bde62 |
slug string |
Filter channels by slug | vice |
sort string |
Sort channels based on possible values, see bellow | -slug |
Sorting Query Parameters Values
Parameter Value | Description |
---|---|
slug |
Sort by slug |
Create channel
Update a channel object
Updates a channel object
HTTP Request
Update channel PATCH https://api.vice.com/<API version>/channels/<ID>
PATCH /v1.1/channels/<ID>
// Write operations are only permitted in v1.1
{
"name": "vice",
"color": "#000000",
"url": "www.vice.com",
"site_scope": 7,
"locale_scope": 541165879295,
"logo": {
// Image object
...
},
"lede": {
// Image object
...
},
"badge": {
// Image object
...
},
"meta": {
// Meta object
...
},
"socials": {
// Socials object
...
},
"viewing_methods": [
],
"social_lede": {
// Image object
...
}
}
Parameter and Type | Description | Required on create |
---|---|---|
locale_scope string |
false | A string representing the current scope the base should apply to, for internal use only |
site_scope string |
false | A string representing the current scope the base should apply to, for internal use only |
name string |
true | Display name for the channel |
url string |
true | Public url where brand is present |
color string |
true | hex color that represents the brand |
lede image object |
See image object for details | false |
badge image object |
See image object for details | false |
logo image object |
See image object for details | false |
meta meta object |
See meta object for details | false |
socials socials object |
See socials object for details | false |
social_lede image object |
See image object for details | false |
Delete channel
Add, Delete or update an image for a channel
Adds an image to the channel, see image object for details on how to create or update an image resource. Only possible image types for channels are lede
, social_lede
, logo
and badge
HTTP Request
Add an image
POST https://api.vice.com/<API version>/channels/<ID>/<IMAGE TYPE>
Update an image
PATCH https://api.vice.com/<API version>/channels/<ID>/<IMAGE TYPE>
Delete an image
DELETE https://api.vice.com/<API version>/channels/<ID>/<IMAGE TYPE>
Articles
An Article object contains information about the different properties of an written article, such as the title, dek, lede image, and the article body.
Article Object
Fetch article details by id
HTTP Request
GET https://api.vice.com/<API version>/articles/<ID>
{
"id": "5aa6ad57113c9e0008d9c958",
"body": "<p>Html content of the article</p>",
"suggested_tweet": "Residents are concerned the upcoming closure will make commuting in Long Island",
"dek": "Residents are concerned the upcoming closure will make commuting in Long Island City and its surrounding neighborhoods a living hell.",
"locale": "en_us",
"publish_date": 1520959512483,
"display_type": "short-form",
"full_page_iframe_url": null,
"vmp_id": null,
"embed_code": "<div data-video-url=\"https://video.vice.com/en_us/embed/5a99b9d4f1cdb32e5e76b5d1?autoplay=1&volume=0\"><div style=\"left: 0; width: 100%; height: 0; position: relative; padding-bottom: 56.2493%;\"><iframe data-img src=\"https://video.vice.com/en_us/embed/5a99b9d4f1cdb32e5e76b5d1?autoplay=1&volume=0\" style=\"border: 0; top: 0; left: 0; width: 100%; height: 100%; position: absolute;\" allowfullscreen scrolling=\"no\"></iframe></div></div>",
"word_count": 1137,
"social_description": null,
"social_title": null,
"age_required": null,
"birthday_required": null,
"nsfb": false,
"nsfw": false,
"web_id": "9kzpxp",
"original_id": "vice:1532319",
"title": "The L Train Shutdown Is Bad News for Queens, Too",
"slug": "the-l-train-shutdown-is-bad-news-for-queens-too",
"summary": "",
"urls": [
"https://www.vice.com/en_us/article/9kzpxp/the-l-train-shutdown-is-bad-news-for-queens-too"
],
"social_lede": {
// Image object
},
"channel": {
// Channel object
...
},
"contributions": [
// Array of Contributions object
...
],
"url": "https://www.vice.com/en_us/article/9kzpxp/the-l-train-shutdown-is-bad-news-for-queens-too",
"caption": null,
"credit": "Court Square G platform. Photo by Harrison Leong",
"filename": "1520959111893-Court_Square_-_Crosstown_Platform.jpeg",
"cover_json": null,
"alt_text": null,
"thumbnail_url": "https://video-images.vice.com/articles/5aa6ad57113c9e0008d9c958/lede/1520959111893-Court_Square_-_Crosstown_Platform.jpeg",
"thumbnail_url_16_9": "https://video-images.vice.com/articles/5aa6ad57113c9e0008d9c958/lede/1520959111893-Court_Square_-_Crosstown_Platform.jpeg?crop=1xw:0.7658740039840638xh;center,center",
"thumbnail_url_1_1": "https://video-images.vice.com/articles/5aa6ad57113c9e0008d9c958/lede/1520959111893-Court_Square_-_Crosstown_Platform.jpeg?crop=0.7344550109729334xw:1xh;center,center",
"thumbnail_url_2_3": "https://video-images.vice.com/articles/5aa6ad57113c9e0008d9c958/lede/1520959111893-Court_Square_-_Crosstown_Platform.jpeg?crop=0.48963667398195565xw:1xh;center,center",
"thumbnail_url_10_4": "https://video-images.vice.com/articles/5aa6ad57113c9e0008d9c958/lede/1520959111893-Court_Square_-_Crosstown_Platform.jpeg?crop=1xw:0.5446215139442231xh;center,center",
"thumbnail_url_10_3": "https://video-images.vice.com/articles/5aa6ad57113c9e0008d9c958/lede/1520959111893-Court_Square_-_Crosstown_Platform.jpeg?crop=1xw:0.40846613545816735xh;center,center",
"thumbnail_url_7_10": "https://video-images.vice.com/articles/5aa6ad57113c9e0008d9c958/lede/1520959111893-Court_Square_-_Crosstown_Platform.jpeg?crop=0.5141185076810534xw:1xh;center,center",
"thumbnail_url_952_498": "https://video-images.vice.com/articles/5aa6ad57113c9e0008d9c958/lede/1520959111893-Court_Square_-_Crosstown_Platform.jpeg?crop=1xw:0.7122413706518463xh;center,center",
"topics": [
// Array of embedded topic object
...
],
"primary_topic": {
// Embedded topic object
...
}
}
{
"id": "5aa6ad57113c9e0008d9c958",
"channel_id": "57a204088cb727dec794c67b",
"locale_id": "57a204068cb727dec794c573",
"created_by": null,
"article_type": "article",
"vmp_id": null,
"legacy_id": 1532319,
"global_site_scope": 7,
"global_locale_scope": 1,
"web_id": "9kzpxp",
"created_at": 1520872791347,
"updated_at": 1520872791751,
"is_embargoed": false,
"embargoed_until": null,
"content_policy": {
// Content policy object
...
},
"content_restriction": {
// Content restriction object
...
},
"display_settings": {
// Display settings object
...
},
"base": {
// Base object
...
},
"meta": {
// Meta object
...
},
// Deprecated
"slugs": [
],
"content_policies": [
{
// Array of Content policy objects
...
}
],
"locale": {
// Locale object
...
},
"legacy_lede": null,
"topics": [
// Array of embedded topic object
...
],
"contributors": [
// Array of Contributions object
...
],
"channel": {
// Channel object
...
},
"social_lede": null,
"lede": {
// Image object
...
},
"urls": [
"https://www.vice.com/en_us/article/9kzpxp/the-l-train-shutdown-is-bad-news-for-queens-too"
]
}
Object Properties
Property and type | Nullable | Description | Example |
---|---|---|---|
id string |
false | ID of the article | 5aa6ad57113c9e0008d9c958 |
article_type enum('article','video','gallery') |
false | content of the article in html | article |
suggested_tweet string |
true | Suggested default text for tweets | Residents are concerned the upcoming closure will make commuting in Long Island |
dek string |
true | Summary that appears below the headline | Residents are concerned the upcoming closure will make commuting in Long Island City and its surrounding neighborhoods a living hell. |
locale string |
false | Original url_fragment where article was created |
en_us |
publish_date number |
true | Date article was published in ms | 1520959512483 |
display_type enum('long-form','short-form','unsanitized-long-form','video-lede','full-page-iframe') |
false | Display type for article | short-form |
full_page_iframe_url string |
true | If article is set to 'full-page-iframe', this will contain the URL where the embedded article is located | https://www.vice.com/embed/article_embed |
vmp_id number |
true | Legacy ID reference | 132 |
embed_code string |
true | If article is set to 'video-lede', this will contain the embed html code | <div data-video-url=\"https://video.vice.com/en_us/embed/5a99b9d4f1cdb32e5e76b5d1?autoplay=1&volume=0\"><div style=\"left: 0; width: 100%; height: 0; position: relative; padding-bottom: 56.2493%;\"><iframe data-img src=\"https://video.vice.com/en_us/embed/5a99b9d4f1cdb32e5e76b5d1?autoplay=1&volume=0\" style=\"border: 0; top: 0; left: 0; width: 100%; height: 100%; position: absolute;\" allowfullscreen scrolling=\"no\"></iframe></div></div> |
word_count number |
true | Article's content word count | 1137 |
social_description string |
true | Custom article description presented on social media platforms | Residents are concerned the upcoming closure will make commuting in Long Island |
social_title string |
true | Custom article title presented on social media platforms | The L Train Shutdown Is Bad News for Queens, Too |
age_required string |
true | Required age for viewing a piece of content as derived from Content Policy | 18 |
birthday_required boolean |
true | Is a birthday verification required to view a piece of content as derived from Content Policy | true |
nsfb boolean |
false | Flag to determine if article is safe for advertising brands | true |
nsfw boolean |
false | Flag to determine if article is safe for work | true |
web_id string |
false | Hash id used in urls | 9kzpxp |
original_id string |
false | Generated id for tracking purposes with legacy systems | vice:1532319 |
title string |
true | Article's title | The L Train Shutdown Is Bad News for Queens, Too |
slug string |
false | Pretty custom url path | the-l-train-shutdown-is-bad-news-for-queens-too |
summary string |
true | Short description of article | Residents are concerned the upcoming closure will make commuting in Long Island |
urls array of string |
false | List of urls where article can be present, VICE publishes articles across multiple sites and regions | ["https://www.vice.com/en_us/article/9kzpxp/the-l-train-shutdown-is-bad-news-for-queens-too"] |
social_lede image object |
true | Custom image used in social platforms | See image object for details |
channel channel object |
true | VICE Brand that the article belongs to | See channel object for details |
contributions array of contributions object |
false | List of article's contributors | See contributions object for details |
topics array of embedded topics object |
false | List of Topics for article | See embedded topics object for details |
url string (deprecated) |
false | Article url in the current context (site and locale) | https://www.vice.com/en_us/article/9kzpxp/the-l-train-shutdown-is-bad-news-for-queens-too |
caption string |
true | Lede image caption | The L Train |
credit string |
true | Lede image credit | Court Square G platform. Photo by Harrison Leong |
filename string |
false | Image filename | 1520959111893-Court_Square_-_Crosstown_Platform.jpeg |
cover_json string |
true | Json representation of lede unit, for internal use only | {} |
thumbnail_url thumbnail_url_<WIDTH_RATIO>_<HEIGHT_RATIO> string |
false | Lede image url and all the possible crops by ratio (width_height) | https://video-images.vice.com/articles/5aa6ad57113c9e0008d9c958/lede/1520959111893-Court_Square_-_Crosstown_Platform.jpeg?crop=1xw:0.7658740039840638xh;center,center |
system_tags array |
false | deprecated | [] |
genres array |
false | deprecated | [] |
primary_topic embedded topics object |
true | Primary topic for the article | See embedded topics object for details |
Articles list
Fetch a list of articles, by default this list is ordered by published date
HTTP Request
GET https://api.vice.com/<API version>/articles
This request will return an array of article objects, for more details on pagination see https://api-docs.vice.com/#pagination
[
// Array of article objects
...
]
Query Parameters
Parameter and Type | Description | Example |
---|---|---|
ids string |
A comma-separated list of specific article ids to retrieve. | 59dcea52ae54a32d39706782,5aa7db2265cc6a00065bde62 |
article_type enum ('article','video','gallery') |
Filter articles by type | article |
vmp_id string |
Find article by a given legacy id | noisey:468 |
nsfw boolean |
Filter articles by not safe for work flag | true |
slug string |
Filter articles by a given slug | article-slug |
channel_id string |
Filter articles by channel based on channel id | 57a204088cb727dec794c67f |
topic_id string |
Filter articles containing a given topic by id | 57a204b18cb727dec7951e8f |
contributor_id string |
Filter articles contributed by a given contributor by id | 57a2057c8cb727dec795ba25 |
sort string |
Sort articles based on possible values, see bellow | -article_type |
status_id string |
Filter articles based on status_id | 3 |
published_at enum('future', 'this_week', 'last_week', 'last_month') |
Filter articles based on published date | future |
Sorting Query Parameters Values
Parameter Value | Description |
---|---|
article_type |
Sort articles by article type |
published_at |
Sort by published date |
created_at |
Sort by created date |
updated_at |
Sort by updated date |
deleted_at |
Sort by deleted date |
Get a list of content policies
Display where article is distributed, site and locales. You can use this endpoint to display proper meta tags or link content for SEO purposes. See content policy object for details
HTTP Request
GET https://api.vice.com/<API version>/articles/<ID>/content_policies
[
// Array of content policies objects
...
]
Create or update an article
Create or update an article object
HTTP Request
Create article POST https://api.vice.com/<API version>/articles
Update article PATCH https://api.vice.com/<API version>/articles/<ID>
POST /v1.1/articles
orPATCH /v1.1/articles/<ID>
// Write operations are only permitted in v1.1
{
"article_type": "article",
"channel_id": "57a204088cb727dec794c67b",
"locale_id": "57a204068cb727dec794c573",
"content_policy": {
// content policy object
...
},
"content_restriction": {
// content restriction object
...
},
"locale_restrictions": [
// array of locale restrictions objects
...
],
"meta": {
// meta object
...
},
"base": {
// base object
...
},
"contributions": [
// array of contributions object
...
],
"topics": [
// array of embedded topics object
...
]
}
Parameter and Type | Description | Required on create |
---|---|---|
article_type enum('article','video','gallery') |
content of the article in html | article |
channel_id string |
ID of vice's brand or channel that article belongs to | 57a204088cb727dec794c67b |
locale_id string |
ID of locale that article belongs to | 57a204068cb727dec794c573 |
content_policy content policy object |
See content policy object for details | false |
meta meta object |
See meta object for details | false |
base base object |
See base object for details | false |
contributions contributions object |
See base object for details | false |
locale_restrictions locale_restrictions object |
See locale_restrictions object for details | false |
topics topics object |
See base object for details | false |
slug slug object |
See slug object for details | false |
social_lede image object |
See image object for details | false |
lede image object |
See image object for details | false |
Delete article
Removes article from visibility
HTTP Request
DELETE https://api.vice.com/<API version>/articles/<ID>
Add, Delete or update an image for an article
Adds an image to the article, see image object for details on how to create or update an image resource. Only possible image types for article are lede
and social_lede
HTTP Request
Add an image
POST https://api.vice.com/<API version>/articles/<ID>/<IMAGE TYPE>
Update an image
PATCH https://api.vice.com/<API version>/articles/<ID>/<IMAGE TYPE>/<IMAGE ID>
Delete an image
DELETE https://api.vice.com/<API version>/articles/<ID>/<IMAGE TYPE>/<IMAGE ID>
Extractions
Upon being published articles will be processed to extract metadata about the subject matter of the content. This data can be retrieved by going to:
GET https://api.vice.com/<API version>/videos/<ID>/extractions
[
{
"base_id": "5c41fb324697a8000783dfde",
"source": "AP",
"class": "geography",
"title": "Russia",
"score": null,
"created_at": 1547841628404,
"updated_at": 1547841628404
},
{
"base_id": "5c41fb324697a8000783dfde",
"source": "AP",
"class": "geography",
"title": "Eastern Europe",
"score": null,
"created_at": 1547841628404,
"updated_at": 1547841628404
}
]
Article Locale Restrictions Object
Restricts article from being pubished in other locales than the ones that belong to the object locale_id
{
"article_id": "5aa6ad57113c9e0008d9c958",
"locale_id": "5aa6ad57113c9e0008d9c958",
"created_at": 1520959512483,
"updated_at": 1520959512483
}
Object Properties
Property and type | Nullable | Description | Example |
---|---|---|---|
atricle_id string |
false | ID of the article | 5aa6ad57113c9e0008d9c958 |
locale_id string |
false | ID of the locale | 5aa6ad57113c9e0008d9c958 |
created_at number |
false | Date in ms when the object was created | 1521486871766 |
updated_at number |
false | Date in ms when the object was updated | 1521486871766 |
Campaigns
Campaigns are advertising campaign slots used by our partners to promote their products or services using a series of related posts (campaign_items).
A campaign object contains information about the different properties of a partner's campaign, such as title, slug, lede image, links, and partner logo.
Campaign Object
Fetch campaign details by id
HTTP Request
GET https://api.vice.com/<API version>/campaigns/<ID>
{
"id": "hexid",
"site_id": "sitehexid",
"locale": "en_us",
"display_type": "grid"
"hide_title": true,
"text_color": "light",
"background_color": "#696971",
"published_at": 1518638177597,
"thumbnail_url": "https://video-images.vice.com/articles/59a524f4c8f4eb5ede604c85/lede/1504000655389-Artikel-Header-ED-Kopie.jpeg",
"thumbnail_url_16_9": "https://video-images.vice.com/articles/59a524f4c8f4eb5ede604c85/lede/1504000655389-Artikel-Header-ED-Kopie.jpeg?crop=1xw:1xh;center,center",
"thumbnail_url_1_1": "https://video-images.vice.com/articles/59a524f4c8f4eb5ede604c85/lede/1504000655389-Artikel-Header-ED-Kopie.jpeg?crop=0.5625xw:1xh;0.4215xw,0xh",
"thumbnail_url_2_3": "https://video-images.vice.com/articles/59a524f4c8f4eb5ede604c85/lede/1504000655389-Artikel-Header-ED-Kopie.jpeg?crop=0.375xw:1xh;center,center",
"thumbnail_url_10_4": "https://video-images.vice.com/articles/59a524f4c8f4eb5ede604c85/lede/1504000655389-Artikel-Header-ED-Kopie.jpeg?crop=1xw:0.7111111111111111xh;center,center",
"thumbnail_url_10_3": "https://video-images.vice.com/articles/59a524f4c8f4eb5ede604c85/lede/1504000655389-Artikel-Header-ED-Kopie.jpeg?crop=1xw:0.5383xh;0xw,0xh",
"thumbnail_url_7_10": "https://video-images.vice.com/articles/59a524f4c8f4eb5ede604c85/lede/1504000655389-Artikel-Header-ED-Kopie.jpeg?crop=0.39375xw:1xh;center,center",
"thumbnail_url_952_498": "https://video-images.vice.com/articles/59a524f4c8f4eb5ede604c85/lede/1504000655389-Artikel-Header-ED-Kopie.jpeg?crop=1xw:0.9299719887955182xh;center,center"
"dek": "dek contents",
"url": "https://www.vice.com/de_at/parnters/wir-spielen-spiele-genauso-waach-wie-ihr",
"name": "campaign name",
"social_title": "social title",
"social_description": "social description",
"logo_black_svg_url": "https://s3.com/svg.svg",
"logo_white_svg_url": "https://s3.com/svg.svg",
"logo_callout_url": "https://url.com",
"legal_claim": "Legal",
"sponsored_claim": "claim of campaign",
"copyright_message": "© vice",
"call_to_action_text": "click me",
"call_to_action_url": "https://url.com",
"slug": "wir-spielen-spiele-genauso-waach-wie-ihr",
"site": {
// Site Object
...
}
}
{
"id": "hexid",
"site_id": "hex site id",
"locale_id": "locale hex id",
"site": {
// Site Object
...
},
"locale": {
// Locale Object
...
}
"display_type": "grid"
"hide_title": true,
"text_color": "light",
"background_color": "#696971",
"published_at": 1518638177597,
"created_at": 1518638177597,
"updated_at": 1518638177597,
"status_id": 3,
lede: {
// Image Object
...
},
"dek": "dek contents",
"url": "https://www.vice.com/de_at/parnters/wir-spielen-spiele-genauso-waach-wie-ihr",
"name": "campaign name",
"social_title": "social title",
"social_description": "social description",
"logo_black_svg_url": "https://s3.com/svg.svg",
"logo_white_svg_url": "https://s3.com/svg.svg",
"logo_callout_url": "https://url.com",
"legal_claim": "Legal",
"sponsored_claim": "Partner Content",
"copyright_message": "© vice",
"call_to_action_text": "click me",
"call_to_action_url": "https://url.com",
"slug": "wir-spielen-spiele-genauso-waach-wie-ihr"
}
Object Properties
Property and Type | Nullable | Description | Example |
---|---|---|---|
id string |
false | ID of the campaign | 5aa6ad57113c9e0008d9c958 |
site_id string |
false | Site ID the campaign is associated with | 5aa6ad57113c9e0008d9c958 |
locale_id |
false | Locale ID the campaign is associated with | 5aa6ad57113c9e0008d9c958 |
site site object |
false | Site the campaign belongs to | See site object For Details |
locale locale object |
false | Locale the campaign belongs to | See locale object For Details |
display_type enum(grid ,themed ,series ,full-bleed ) |
false | Display Type for campaign | grid |
hide_title boolean |
false | Flag to hide the title on campaign pages | true |
text_color enum(light , dark ) |
false | The color of the text | light |
background_color string |
true | The displayed background color | #000000 |
published_at number |
true | The time at which this campaign was/will be published in ms | 1520959512483 |
created_at number |
false | The time when the campaign was created in ms | 1520959512483 |
updated_at number |
false | The time when the campaign was updated in ms | 1520959512483 |
status_id number |
false | The status of the campaign | 3 |
lede image object |
true | Lede image object used for campaign | See image object for details |
thumbnail_url thumbnail_url_<WIDTH_RATIO>_<HEIGHT_RATIO> string |
false | Lede image url and all the possible crops by ratio (width_height) | https://video-images.vice.com/articles/5aa6ad57113c9e0008d9c958/lede/1520959111893-Court_Square_-_Crosstown_Platform.jpeg?crop=1xw:0.7658740039840638xh;center,center |
dek string |
true | Summary that appears below the headline | Reason why this campaign is the best campaign |
name string |
true | The name of the campaign | Best Campaign Name |
social_title string |
true | Custom campaign title presented on social media platforms | Social Title of this Campaign |
social_description string |
true | Custom campaign description presented on social media platforms | Social Description of this Campaign |
logo_black_svg_url string |
true | Black version of partner's SVG logo | https://svg.com/black_logo |
logo_white_svg_url string |
true | White version of partner's SVG logo | https://svg.com/white_logo |
logo_callout_url string |
true | Logo callout url | https://logo_callout_url.com |
legal_claim string |
true | Legal claim of the campaign | This is sponsored content |
sponsored_claim string |
true | Sponsored Claim of campaign | Sponsored Claim |
copyright_message string |
true | Copyright message | Copyright 2018 Vice |
call_to_action_text string |
true | Call To Action Display Text | Use our product! |
call_to_action_url string |
true | Call To Action URL | https://partnerswebsite.com/promotion |
slug string |
false | Slug for the campaign - Unique in locale/site of campaign | campaign-slug-for-this-campaign |
Campaigns List
Fetch a list of campaigns
HTTP Request
GET https://api.vice.com/<API version>/campaigns
This request will return an array of campaign objects, for more details on pagination see https://api-docs.vice.com/#pagination
[
// Array of campaign objects
...
]
Query Parameters
Parameter and Type | Description | Example |
---|---|---|
ids string |
A comma-separated list of specific campaign ids to retrieve. | 5ac3c33b05d2a40006b3acaa,5abcfefacda0b40006ac220b |
slug string |
Filter campaigns by a given slug | campaign-slug |
status_id string |
Filter campaigns based on status_id | 3 |
published_at enum(future , this_week , last_week , last_month ) |
Filter campaigns based on published date | future |
List of Campaign Items for a Campaign
HTTP Request
GET https://api.vice.com/<API version>/campaigns/<ID | slug>/campaign_items
This request will return an array of campaign items, for more details on pagination see https://api-docs.vice.com/#pagination See campaign item object for more details on the response.
[
// Array of campaign item objects
...
]
Single Campaign Item for a Campaign
HTTP Request
GET https://api.vice.com/<API version>/campaigns/<ID | slug>/campaign_items/<CampaignItemID | CampaignItemSlug>
This request will return a single campaign item belonging to the selected campaign. See campaign item object for more details.
{
// Campaign Item Object
...
}
Create or Update campaign
Create or update a campaign object
HTTP Request
Create campaign POST https://api.vice.com/<API version>/campaigns
Update campaign PATCH https://api.vice.com/<API version>/campaigns/<ID>
POST /v1.1/campaigns
orPATCH /v1.1/campaigns/<ID>
// Write operations are only permitted in v1.1
{
"id": "57a204088cb727dec794c67b",
"site_id": "hexid",
"locale_id": "57a204068cb727dec794c573",
"site": {
// site object
...
},
"locale": {
// locale object
...
},
"display_type": "grid",
"hide_title": true,
"text_color": "light",
"background_color": "#000000",
"published_at": 1518638177597,
"created_at": 1518638177597,
"updated_at": 1518638177597,
"status_id": 3,
"lede": {
// lede object
...
},
"dek": "dekdekdek",
"url": "https://www.vice.com/partners/campaign-slug",
"name": "campaign name",
"social_title": "social title",
"social_description": "social description",
"logo_black_svg_url": "https://s3.com/svg.svg",
"logo_white_svg_url": "https://s3.com/svg.svg",
"logo_callout_url": "https://url.com",
"legal_claim": "legal claim",
"sponsored_claim": "sponsored content",
"copyright_message": "© vice",
"call_to_action_text": "buy our products",
"call_to_action_url": "https://url.com",
"slug": "campaign-slug"
}
Parameter and Type | Description | Required on create |
---|---|---|
site_id string |
ID of Vice's site that the campaign belongs to | true |
locale_id string |
ID of locale the campaign belongs to | true |
display_type enum('grid','themed','series','full-bleed') |
Display type of campaign | false |
hide_title boolean |
false | Flag to hide the title on campaign pages |
text_color enum(light , dark ) |
Theme for text color on campaign page | false |
background_color string |
Hex color that background should be displayed as in campaign page | false |
published_at number |
Date in ms when the object was published, date can be set in the future for scheduled posts | false |
status_id enum(1,2,3,4,5) |
Status code that represents published state of the campaign | false |
dek string |
Summary that appears under the headline of the campaign | false |
name string |
Name of the campaign | false |
social_title string |
Custom campaign title presented on social media platforms | false |
social_description string |
Custom campaign description presented on social media platforms | false |
logo_black_svg_url string |
Black version of the partner's SVG logo | false |
logo_white_svg_url string |
White version of the partner's SVG logo | false |
logo_callout_url string |
Logo Callout URL | false |
legal_claim string |
Legal claim of the campaign | false |
sponsored_claim string |
Sponsored Claim of the campaign | false |
copyright_message string |
Copyright message | false |
call_to_action_text string |
Call to Action Text | false |
call_to_action_url string |
Call To Action URL | false |
slug string |
Slug for the campaign - Unique in locale/site of campaign | true |
Add, Delete or Update an image for a campaign
Adds an image to the campaign, see image object for details on how to create or update an image resource. Only possible image type for campaign is lede
HTTP Request
Add an image
POST https://api.vice.com/<API version>/campaigns/<ID>/lede
Update an image
PATCH https://api.vice.com/<API version>/campaigns/<ID>/lede
Delete an image
DELETE https://api.vice.com/<API version>/campaigns/<ID>/lede
Add an SVG Logo For a campaign
Adds a logo (must be SVG format). There are two types of logo images, logo_black_svg
and logo_white_svg
.
HTTP Request
Add a Logo SVG
POST https://api.vice.com/<API version>/campaigns/<ID>/logo_black_svg
POST https://api.vice.com/<API version>/campaigns/<ID>/logo_white_svg
Create or update a campaign item for a campaign
Create or update a campaign item object for a campaign
HTTP Request
Create campaign item POST https://api.vice.com/<API version>/campaigns/<ID>/campaign_items
Update campaign item PATCH https://api.vice.com/<API version>/campaigns/<ID>/campaign_items/<CamapignItemID>
POST /v1.1/campaigns/<ID>/campaign_items
orPATCH /v1.1/campaigns/<ID>/campaign_items/<CampaignItemID>
// Write operations are only permitted in v1.1
{
// campaign_item object
...
}
Campaign Items
A campaign item contains information about the different properties of a post belonging to a partner campaign.
Campaign Item Object
Fetch campaign item details by id
HTTP Request
GET https://api.vice.com/<API version>/campaign_items/<ID | slug>
{
"id":"5a83c40abbfb4d706b070fc0",
"campaign_id":"5a83c40abbfb4d706b070fc1",
"body": "<p>In 2016, I walked into the back room of Cole’s</p>",
"suggested_tweet": "tweet",
"dek": "The Chicago native paid her dues back home and escaped an ex. Now she's pushing the industry to treat comedians like her the right way",
"locale": "en_us",
"published_date": 1518639060000,
"display_type": "short-form",
"full_page_iframe_url": "https://www.fullpageiframeurl.com",
"embed_code": "<iframe width='560'>",
"word_count": 1396,
"autoplay": false,
"clickthrough_url": "https://clickthrough.com",
"social_description": "Rebecca O'Neal paid her dues back home and escaped an ex. Now she's pushing the industry to treat comedians like her the right way.",
"social_title": "OVercoming a Stalker Helped This Comedian Find her Voice",
"nsfw": false,
"slug": "campaign-item-slug",
"title": "Overcoming Her Stalker Helped Rebecca O'Neal Thrive as a Comedian",
"summary": "summary of the article",
"url": "https://www.vice.com/en_us/partners/campaign-slug/campaign_item_slug",
"caption": "lede caption",
"credit": "REbecca O'Neal",
"thumbnail_url": "https://video-images.vice.com/articles/5a83c40abbfb4d706b070fc0/lede/1518585282811-oneal2.jpeg",
"thumbnail_url_16_9": "https://video-images.vice.com/articles/5a83c40abbfb4d706b070fc0/lede/1518585282811-oneal2.jpeg",
"thumbnail_url_1_1": "https://video-images.vice.com/articles/5a83c40abbfb4d706b070fc0/lede/1518585282811-oneal2.jpeg",
"thumbnail_url_2_3": "https://video-images.vice.com/articles/5a83c40abbfb4d706b070fc0/lede/1518585282811-oneal2.jpeg",
"thumbnail_url_10_4": "https://video-images.vice.com/articles/5a83c40abbfb4d706b070fc0/lede/1518585282811-oneal2.jpeg",
"thumbnail_url_10_3": "https://video-images.vice.com/articles/5a83c40abbfb4d706b070fc0/lede/1518585282811-oneal2.jpeg",
"thumbnail_url_7_10": "https://video-images.vice.com/articles/5a83c40abbfb4d706b070fc0/lede/1518585282811-oneal2.jpeg",
"thumbnail_url_952_498": "https://video-images.vice.com/articles/5a83c40abbfb4d706b070fc0/lede/1518585282811-oneal2.jpeg",
"social_lede": {
// Image object
...
},
"call_to_action_text": "some action",
"call_to_action_url": "https://www.vice.com",
"contributions": [
// Array of contribution objects
]
}
{
"id": "5abd09f752d29c14e0b468bb",
"campaign_id": "5abd09f752d29c14e0b468b7",
"position": 0,
"title": null,
"body": "<p>article body</p",
"word_count": 0,
"social_title": "Remembering the man Who Brought King Kong to Life",
"social_description": null,
"dek": "O’Brien’s groundbreaking animation laid the foundation for all fantasy and sci-fi movies to come.\r\n",
"summary": "O’Brien’s groundbreaking animation laid the foundation for all fantasy and sci-fi movies to come.\r\n",
"status_id": 3,
"full_page_iframe_url": null,
"display_type": "short-form",
"schedule_end_date": null,
"published_at": 1522338290065,
"first_published_at": null,
"updated_at": 1522877650867,
"created_at": 1522338295713,
"slug": "Remembering-the-man-Who-Brought-King-Kong-to-Life",
"embed_code": "<div data-video-url=\"https://www.youtube.com/watch?v=_4CjTD1s1Uk&t=8s\"><div style=\"left: 0; width: 100%; height: 0; position: relative; padding-bottom: 75.0019%;\"><iframe data-img data-iframely-url=\"//oembed.vice.com/dnogTj1?playerjs=true\" style=\"border: 0; top: 0; left: 0; width: 100%; height: 100%; position: absolute;\" allowfullscreen scrolling=\"no\"></iframe></div></div><script async src=\"//oembed.vice.com/embed.js\" charset=\"utf-8\"></script>",
"autoplay": false,
"clickthrough_url": null,
"nsfw": false,
"call_to_action_text": null,
"call_to_action_url": null,
"contributors": [
// Array of contributors objects
...
],
"lede": {
// Image Object
...
},
"social_lede": {
// Image Object
...
},
"url": "https://www.vice.com/en_us/partners/عشرة-محاولات-علمية-لتفسير-كلام-الأمها/Remembering-the-man-Who-Brought-King-Kong-to-Life"
}
Object Properties
Property and Type | Nullable | Description | Example |
---|---|---|---|
id string |
false | ID of the campaign item | `5aa6ad57113c9e0008d9c958' |
campaign_id string |
false | ID of the campaign this item belongs to | 5abd09f752d29c14e0b468b7 |
position number |
false | Position of this item within the campaign | 1 |
title string |
true | Title of the campaign item | Title of this great campaign article |
body string |
true | Content body of this campaign item | <p>Long article body here </p> |
word_count number |
false | Word count of the campaign item body | 3959 |
social_title string |
true | Custom title to be presented on social media | Social Media Title |
social_description string |
true | Custom description to be presented on social media | Social Media Description of this Article |
dek string |
true | Summary that appears below the headline | This is the dek |
summary string |
true | Summary of the campaign items' contents | This is the summary of this campaign item |
status_id number |
false | The status of the campaign item | 3 |
full_page_iframe_url string |
true | The URL of the optional full page iframe body | https://fullpage-url.com |
display_type enum(long-form , short-form , unsanitized-long-form , video-lede , full-page-iframe ) |
false | The display type of this item | long-form |
schedule_end_date number |
true | The date after which this item should no longer be displayed | 1520959512483 |
published_at number |
true | The date this item was/will be published. | 1520959512483 |
updated_at number |
false | The date this was last updated | 1520959512483 |
created_at number |
false | The date this record was created | 1520959512483 |
slug string |
false | The slug of this campaign item | campaign-items-slug |
embed_code string |
true | The embed code for this campaign item | <div data-video-url=\"https://www.youtube.com/watch?v=_4CjTD1s1Uk&t=8s\"><div style=\"left: 0; width: 100%; height: 0; position: relative; padding-bottom: 75.0019%;\"><iframe data-img data-iframely-url=\"//oembed.vice.com/dnogTj1?playerjs=true\" style=\"border: 0; top: 0; left: 0; width: 100%; height: 100%; position: absolute;\" allowfullscreen scrolling=\"no\"></iframe></div></div><script async src=\"//oembed.vice.com/embed.js\" charset=\"utf-8\"></script> |
autoplay boolean |
true | Determine if video should autoplay when in view | true |
clickthrough_url string |
true | Clickthrough URL for this campaign item | http://clickthroughlink.com |
nsfw boolean |
false | Determine if content is nsfw | false |
call_to_action_text string |
true | Call To Action Text for campaign item | this is the call to action |
call_to_action_url string |
true | Call To Action Link for campaign item | https://partner.com/call-to-action |
contributions array of contributions object |
true | List of campaign item's contributors | See contributions object for details |
lede image object |
true | Lede image object used for campaign_item | See image object for details |
social_lede image object |
true | Social Lede image object used for campaign_item | See image object for details |
url string |
false | URL to access this campaign_item on the site it belongs to | https://www.vice.com/partners/campaign-slug/campaign-item-slug |
contributors array of contributors object |
true | List of campaign items contributors | See contributors object for details |
thumbnail_url thumbnail_url_<WIDTH_RATIO>_<HEIGHT_RATIO> string |
true | Lede image url and all the possibile crops by ratio (width_height) | https://video-images.vice.com/articles/5aa6ad57113c9e0008d9c958/lede/1520959111893-Court_Square_-_Crosstown_Platform.jpeg?crop=1xw:0.7658740039840638xh;center,center |
Campaign Items List
Fetch a list of campaign items
HTTP Request
GET https://api.vice.com/<API version>/campaign_items
This request will return an array of campaign item object, for more details on pagination see https://api-docs.vice.com/#pagination
[
// Array of campaign item objects
...
]
Query Parameters
Parameter and Type | Description | Example |
---|---|---|
ids string |
A comma-separated list of specific campaign item ids to retrieve | 5ac3c33b05d2a40006b3acaa,5abcfefacda0b40006ac220b |
slug string |
Filter campaign items by a given slug | campaign-item-slug |
status_id number |
Filter campaign items based on status_id | 3 |
published_at enum(future , this_week , last_week , last_month ) |
Filter campaign items based on a published date | future |
campaign_id string |
Filter campaign items by a given campaign_id | 5ac3c33b05d2a40006b3acaa |
Create or Update Campaign Item
Create or update a campaign item object
HTTP Request
Create campaign item POST https://api.vice.com/<API version>/campaign_items
Update campaign item PATCH https://api.vice.com/<API version>/campaign_items/<ID>
POST v1.1/campaign_items
orPATCH v1.1/campaign_items/<ID>
// Write operations are only permitted in v1.1
{
"campaign_id": "5abd09f752d29c14e0b468b7",
"position": 1,
"title": "campaign item title",
"body": "campaign item body",
"word_count": 3456,
"social_title": "Social title for campaign item",
"social_description": "Social description for campaign item",
"dek": "Dek for campaign item",
"summary": "This is the summary",
"status_id": 3,
"display_type": "short-form",
"published_at": 1522338290065,
"slug": "slug-for-campaign-item",
"nsfw": false,
"call_to_action_text": "call to action text for this item",
"call_to_action_url": "https://partner.com/call-to-action",
"contributions": [
// Array of contribution objects
...
]
}
Object Properties
Property and Type | Description | Required On Create |
---|---|---|
campaign_id string |
ID of campaign this item belongs to | true |
position number |
Position of this item within it's campaign | true |
title string |
The title of the campaign item | false |
body string |
The campaign item body | false |
word_count number |
The word count for the contents of the campaign item | false |
social_title string |
Optional custom title to be presented on social media | false |
social_description string |
Optional custom description to be presented on social media | false |
dek string |
Summary that appears below the headline | false |
summary string |
Summary of the item's contents | false |
status_id number |
Published status of the campaign item | false |
full_page_iframe_url string |
URL of the full page iframe, if there is one | false |
display_type enum(long-form , short-form , unsanitized-long-form , video-lede , full-page-iframe ) |
Display mode of this campaign item | false |
schedule_end_date number |
The date after which this item should no longer be displayed | false |
published_at number |
The date that this item was/will be published at | false |
slug string |
The slug to identify this campaign item | true |
embed_code string |
Embed code for this item | false |
autoplay boolean |
Determine if video should autoplay when in view | false |
clickthrough_url string |
Clickthrough URL for this item | false |
nsfw boolean |
NSFW flag | false |
call_to_action_text string |
Call to action text for this item | false |
call_to_action_url string |
Call to action link for this item | false |
contributions contributions object |
See contributions object for details | false |
Add, Delete or Update an image for a campaign item
Adds an image to the campaign item, see image object for details on how to create or update an image resource. Only possible image types for campaign items is lede
and social_lede
.
HTTP Request
Add an image
POST https://api-vice.com/<API version>/campaign_items/<ID>/<IMAGE TYPE>
Update an image
PATCH https://api-vice.com/<API version>/campaign_items/<ID>/<IMAGE TYPE>
Delete an image
DELETE https://api.vice.com/<API version>/campaign_items/<ID>/<IMAGE TYPE>
Contributors
Persons that collaborate to create VICE content. A contributor can play different roles depending on the content.
Contributor Object
Properties and details about contributors objects
HTTP Request
GET https://api.vice.com/<API version>/contributors/<ID>
{
"id": "57a2057c8cb727dec795ba25",
"first_name": "Thomas",
"last_name": "Morton",
"public_url": null,
"twitter_url": null,
"twitter_handle": null,
"instagram_handle": null,
"slug": "thomas-morton",
"email": "",
"position": null,
"bio": "",
"article_count": 0,
"video_count": 0,
"show_count": 0,
"social_description": null,
"social_title": null,
"home_locale_id": null,
"full_name": "Thomas Morton",
"urls": Array[2][
"https://www.vice.com/en_us/contributor/thomas-morton",
"https://www.vice.com/en_ca/contributor/thomas-morton"
],
"social_lede": null,
"url": "https://www.vice.com/en_us/contributor/thomas-morton",
"caption": null,
"credit": "",
"filename": "ThomasMorton_1.jpg",
"filesize": 0,
"cover_json": null,
"thumbnail_url": "https://video-images.vice.com/images/contributors/1/lede/ThomasMorton_1.jpg",
"thumbnail_url_16_9": "https://video-images.vice.com/images/contributors/1/lede/ThomasMorton_1.jpg?crop=0.9975xw:0.56xh;0.0025xw,0.3xh",
"thumbnail_url_1_1": "https://video-images.vice.com/images/contributors/1/lede/ThomasMorton_1.jpg?crop=1xw:1xh;center,top",
"thumbnail_url_2_3": "https://video-images.vice.com/images/contributors/1/lede/ThomasMorton_1.jpg?crop=0.66666666666667xw:1xh;center,top",
"thumbnail_url_10_4": "https://video-images.vice.com/images/contributors/1/lede/ThomasMorton_1.jpg?crop=1xw:0.4xh;center,top",
"thumbnail_url_10_3": "https://video-images.vice.com/images/contributors/1/lede/ThomasMorton_1.jpg?crop=1xw:0.3xh;center,top",
"thumbnail_url_7_10": "https://video-images.vice.com/images/contributors/1/lede/ThomasMorton_1.jpg?crop=0.7xw:1xh;center,center",
"thumbnail_url_952_498": "https://video-images.vice.com/images/contributors/1/lede/ThomasMorton_1.jpg?crop=1xw:0.523109243697479xh;center,center"
}
{
"id": "57a2057c8cb727dec795ba25",
"home_locale_id": null,
"full_name": "Thomas Morton",
"email": "",
"first_name": "Thomas",
"last_name": "Morton",
"twitter_url": null,
"twitter_handle": null,
"instagram_handle": null,
"public_url": null,
"legacy_id": 1,
"article_count": 0,
"video_count": 0,
"show_count": 0,
"created_at": null,
"updated_at": null,
"slugs": Array[1][
// Array of slug objects
...
],
"slug": {
// Slug object
...
},
"meta": {
// Meta object
...
},
"lede": {
// Image object
...
},
"base": {
// Base object
...
},
"social_lede": {
// Image object
...
},
"urls": Array[2][
"https://www.vice.com/en_us/contributor/thomas-morton",
"https://www.vice.com/en_ca/contributor/thomas-morton"
]
}
Object Properties
Property and type | Nullable | Description | Example |
---|---|---|---|
id string |
false | ID of the object | 5ab00c17462f6d000c91455e |
first_name string |
false | First name of the contributor | Thomas |
last_name string |
true | Last name of the contributor | Morton |
full_name string |
false | Contributor's full name | Thomas Morton |
public_url string |
true | Contributor's external public URL | https://github.com/VICEMedia/ |
twitter_url |
true | Contributor's twitter | https://twitter.com/Google |
twitter_handle |
true | Contributor's twitter handle | Google |
instagram_handle |
true | Contributor's instagram handle | google |
slug string |
false | Contributor path url, this can be used to generate a contributor url e.g https://www.vice.com/en_us/contributor/thomas-morton | thomas-morton |
email string |
true | Contributors email address | email@vice.com |
position string |
true | Details in contributor's position at VICE. | Editor in chief |
article_count number |
false | deprecated | 0 |
video_count number |
false | deprecated | 0 |
show_count number |
false | deprecated | 0 |
social_description string |
true | Custom description when shared in social networks | Thomas Morton contributor page description |
social_title string |
true | Custom title when shared in social networks | Posts by Thomas Morton |
home_locale_id string |
true | Locale object ID where contributor collaborates | 57a2057c8cb727dec795ba25 |
urls array of string |
false | List of urls where a contributor can be present, VICE publishes articles across multiple sites and regions | ["https://www.vice.com/en_us/contributor/thomas-morton"] |
social_lede image object |
true | Custom image used in social platforms | See image object for details |
url string (deprecated) |
false | Contributor url in the current context (site and locale) | https://www.vice.com/en_us/topic/genre-lifestyle |
caption string |
true | Lede image caption | The L Train |
credit string |
true | Lede image credit | Court Square G platform. Photo by Harrison Leong |
filename string |
false | Image filename | 1520959111893-Court_Square_-_Crosstown_Platform.jpeg |
cover_json string |
true | Json representation of lede unit, for internal use only | {} |
thumbnail_url thumbnail_url_<WIDTH_RATIO>_<HEIGHT_RATIO> string |
false | Lede image url and all the possible crops by ratio (width_height) | https://video-images.vice.com/articles/5aa6ad57113c9e0008d9c958/lede/1520959111893-Court_Square_-_Crosstown_Platform.jpeg?crop=1xw:0.7658740039840638xh;center,center |
Contributors list
Fetch a list of contributors, by default this list is ordered by id
HTTP Request
GET https://api.vice.com/<API version>/contributors
This request will return an array of contributors objects, for more details on pagination see https://api-docs.vice.com/#pagination
[
// Array of contributors objects
...
]
Query Parameters
Parameter and Type | Description | Example |
---|---|---|
ids string |
A comma-separated list of specific ids to retrieve. | 59dcea52ae54a32d39706782,5aa7db2265cc6a00065bde62 |
slug string |
Filter topics by a given slug | contributor-slug |
first_name string |
Filter topics by contributor first name, case sensitive | Thomas |
last_name string |
Filter topics by contributor last name, case sensitive | Morton |
email string |
Filter topics by contributor email | email@vice.com |
sort string |
Sort based on possible values, see bellow | -first_name |
Sorting Query Parameters Values
Parameter Value | Description |
---|---|
first_name |
Sort by first name |
last_name |
Sort by last name |
Create or update a contributor
Create or update a contributor object
HTTP Request
Create contributor POST https://api.vice.com/<API version>/contributors
Update contributor PATCH https://api.vice.com/<API version>/contributors/<ID>
POST /v1.1/contributors
orPATCH /v1.1/contributors/<ID>
// Write operations are only permitted in v1.1
{
"home_locale_id": "57a2057c8cb727dec795ba25",
"email": "email@vice.com",
"first_name": "Thomas",
"last_name": "Morton",
"twitter_url": "https://twitter.com/Google",
"twitter_handle": "Google",
"instagram_handle": "google",
"public_url": "https://github.com/VICEMedia/",
"slug": {
// Slug object
...
},
"meta": {
// Meta object
...
},
"lede": {
// Image object
...
},
"base": {
// Base object
...
},
"social_lede": {
// Image object
...
}
}
Parameter and Type | Description | Required on create |
---|---|---|
email |
Contributors email address | false |
first_name |
First name of the contributor | true |
last_name |
Last name of the contributor | false |
twitter_url |
Contributor's twitter | false |
twitter_handle |
Contributor's twitter handle | false |
instagram_handle |
Contributor's instagram handle | false |
public_url |
Contributor's external public URL | false |
home_locale_id |
Locale object ID where contributor collaborates | false |
meta meta object |
See meta object for details | false |
base base object |
See base object for details | false |
slug slug object |
See slug object for details | true |
lede image object |
See image object for details | false |
social_lede image object |
See image object for details | false |
Delete contributor
Deletes contributor from permanent store
HTTP Request
DELETE https://api.vice.com/<API version>/contributors/<ID>
Add, Delete or update an image for a contributor
Adds an image to the contributor, see image object for details on how to create or update an image resource. Only possible image types for contributors are lede
and social_lede
HTTP Request
Add an image
POST https://api.vice.com/<API version>/contributors/<ID>/<IMAGE TYPE>
Update an image
PATCH https://api.vice.com/<API version>/contributors/<ID>/<IMAGE TYPE>
Delete an image
DELETE https://api.vice.com/<API version>/contributors/<ID>/<IMAGE TYPE>
Contribution object
Contribution objects contains the role and contributor that help create the specific type of of content
{
"contribution_id": "5806427dd124317cb20c4d8f",
"role_id": "57a204058cb727dec794c566",
"role": "Editor",
"contributor": {
// Contributor Object
...
}
}
Property and type | Nullable | Description | Example |
---|---|---|---|
contribution_id string |
false | ID of the object | 5ab00c17462f6d000c91455e |
role_id string |
false | ID of the role of the contribution | 57a204058cb727dec794c566 |
role string |
false | Description of the role of the contribution | Editor |
contributions contributor object |
false | Contributor Object | See contributor object for details |
Create or update contribution
Create or update a contribution object. The contributions will be overriding by the array sent, e.g. to remove a contributor simply ommit it from the array sent.
contribution objects are created/updated when sending a resource create request e.g.
POST /v1.1/articles
orPATCH /v1.1/articles/<ID>
// Write operations are only permitted in v1.1
{
...article data,
"contributions": [
{
"contribution_id": "5806427dd124317cb20c4d8f",
"role_id": "57a204058cb727dec794c566"
}
]
}
Parameter and Type | Required | Description |
---|---|---|
contribution_id string |
true | ID of the contributor |
role_id string |
false | ID of the role of the contribution, if none given will default to whatever role is set to default. See role object for more details |
Role Object
Roles describe the contribution part of a contributor in a piece of content
HTTP Request
GET https://api.vice.com/<API version>/roles/<ID>
{
"id": "57a204058cb727dec794c563",
"name": "director",
"label": "Director",
"legacy_id": 1,
"default": false,
"created_at": null,
"updated_at": null
}
Property and type | Nullable | Description | Example |
---|---|---|---|
id string |
false | ID of the object | 5ab00c17462f6d000c91455e |
name string |
false | Identifier for role, used mostly for translations | editor |
label string |
false | Description of the role of the contribution | Editor |
default boolean |
false | Determines if role should be applied to contribution by default if none provided | true |
created_at string |
true | deprecated | null |
updated_at string |
true | deprecated | null |
legacy_id number |
true | deprecated, used for legacy systems | 1 |
Roles list
Fetch a list of roles, by default this list is ordered by id
HTTP Request
GET https://api.vice.com/<API version>/roles
This request will return an array of roles objects, for more details on pagination see https://api-docs.vice.com/#pagination
[
// Array of roles objects
...
]
Query Parameters
Parameter and Type | Description | Example |
---|---|---|
ids string |
A comma-separated list of specific ids to retrieve. | 59dcea52ae54a32d39706782,5aa7db2265cc6a00065bde62 |
name string |
Identifier for role, used mostly for translations | editor |
Create or update a role
Create or update a role object
HTTP Request
Create role POST https://api.vice.com/<API version>/roles
Update role PATCH https://api.vice.com/<API version>/roles/<ID>
POST /v1.1/roles
orPATCH /v1.1/roles/<ID>
// Write operations are only permitted in v1.1
{
"name": "director",
"label": "Director",
"default": false
}
Parameter and Type | Description | Required on create |
---|---|---|
name string |
Identifier for role, used mostly for translations | true |
label string |
Description of the role of the contribution | true |
default boolean |
Determines if role should be applied to contribution by default if none provided | false |
Delete role
Deletes a role from permanent store
HTTP Request
DELETE https://api.vice.com/<API version>/roles/<ID>
Linkouts
A linkout object is a way to link content across vice sites. It contains basic meta information and a link to follow to the url
Linkout Object
Fecth linkout details by id
HTTP Request
GET https://api.vice.com/<API version>/linkouts/<ID>
{
"id": "5abbc0c2d31c07000cf0e610",
"url": "https://noisey.vice.com/de/article/zmg49w/wegen-auschwitz-line-farid-bang-und-kollegah-konnten-vom-echo-ausgeschlossen-werden",
"dek": "Und Farid Bang reagiert überraschend sachlich.",
"title": "Wegen Auschwitz-Line: Farid Bang und Kollegah könnten vom ECHO ausgeschlossen werden",
"type": "linkouts",
"data": null,
"site": {
// Site object
...
},
"caption": null,
"credit": null,
"filename": "1522239919615-kollegah_farid_bang_echo.jpeg",
"filesize": 0,
"cover_json": null,
"thumbnail_url": "https://video-images.vice.com/articles/5abb74766f4a3100076c73ce/lede/1522239919615-kollegah_farid_bang_echo.jpeg",
"thumbnail_url_16_9": "https://video-images.vice.com/articles/5abb74766f4a3100076c73ce/lede/1522239919615-kollegah_farid_bang_echo.jpeg?crop=1xw:0.9050683829444891xh;center,center",
"thumbnail_url_1_1": "https://video-images.vice.com/articles/5abb74766f4a3100076c73ce/lede/1522239919615-kollegah_farid_bang_echo.jpeg?crop=0.6215xw:1xh;center,center",
"thumbnail_url_2_3": "https://video-images.vice.com/articles/5abb74766f4a3100076c73ce/lede/1522239919615-kollegah_farid_bang_echo.jpeg?crop=0.41433333333333333xw:1xh;center,center",
"thumbnail_url_10_4": "https://video-images.vice.com/articles/5abb74766f4a3100076c73ce/lede/1522239919615-kollegah_farid_bang_echo.jpeg?crop=1xw:0.6436041834271923xh;center,center",
"thumbnail_url_10_3": "https://video-images.vice.com/articles/5abb74766f4a3100076c73ce/lede/1522239919615-kollegah_farid_bang_echo.jpeg?crop=1xw:0.4827031375703942xh;center,center",
"thumbnail_url_7_10": "https://video-images.vice.com/articles/5abb74766f4a3100076c73ce/lede/1522239919615-kollegah_farid_bang_echo.jpeg?crop=0.43505xw:1xh;center,center",
"thumbnail_url_952_498": "https://video-images.vice.com/articles/5abb74766f4a3100076c73ce/lede/1522239919615-kollegah_farid_bang_echo.jpeg?crop=1xw:0.8416882440828302xh;center,center"
}
{
"id": "5abbc0c2d31c07000cf0e610",
"site_id": "57a204058cb727dec794c56b",
"article_id": null,
"video_id": null,
"created_by": null,
"title": "Wegen Auschwitz-Line: Farid Bang und Kollegah könnten vom ECHO ausgeschlossen werden",
"dek": "Und Farid Bang reagiert überraschend sachlich.",
"url": "https://noisey.vice.com/de/article/zmg49w/wegen-auschwitz-line-farid-bang-und-kollegah-konnten-vom-echo-ausgeschlossen-werden",
"created_at": 1522254018816,
"updated_at": 1522254018816,
"site": {
// Site object
...
},
"lede": {
// Image object
...
}
}
Object Properties
Property and type | Nullable | Description | Example |
---|---|---|---|
id string |
false | ID of the object | 5aa6ad57113c9e0008d9c958 |
dek string |
true | Summary that appears below the headline | Residents are concerned the upcoming closure will make commuting in Long Island City and its surrounding neighborhoods a living hell. |
url string |
false | URL where object is located | https://www.vice.com/en_us/article/9kzpxp/the-l-train-shutdown-is-bad-news-for-queens-too |
type enum('linkouts') |
false | type of linkout | linkouts |
site site object |
true | VICE site that original belongs to | See site object for details |
caption string |
true | Lede image caption | The L Train |
credit string |
true | Lede image credit | Court Square G platform. Photo by Harrison Leong |
filename string |
false | Image filename | 1520959111893-Court_Square_-_Crosstown_Platform.jpeg |
cover_json string |
true | Json representation of lede unit, for internal use only | {} |
thumbnail_url thumbnail_url_<WIDTH_RATIO>_<HEIGHT_RATIO> string |
false | Lede image url and all the possible crops by ratio (width_height) | https://video-images.vice.com/articles/5aa6ad57113c9e0008d9c958/lede/1520959111893-Court_Square_-_Crosstown_Platform.jpeg?crop=1xw:0.7658740039840638xh;center,center |
Linkouts list
Fetch a list of linkoouts, by default this list is ordered by id
HTTP Request
GET https://api.vice.com/<API version>/linkouts
This request will return an array of linkout objects, for more details on pagination see https://api-docs.vice.com/#pagination
[
// Array of linkout objects
...
]
Query Parameters
Parameter and Type | Description | Example |
---|---|---|
ids string |
A comma-separated list of specific object ids to retrieve. | 59dcea52ae54a32d39706782,5aa7db2265cc6a00065bde62 |
url string |
A url to filter records by, VICE's API will fetch the cannonical URL from the given URL prior to filering the record | https://www.vice.com/en_us/article/9kzpxp/the-l-train-shutdown-is-bad-news-for-queens-too |
site_id string |
Filter linkout by its original site ID where linkout was generated from | 59dcea52ae54a32d39706782 |
Sorting Query Parameters Values
Parameter Value | Description |
---|---|
created_at |
Sort by created date |
updated_at |
Sort by updated date |
Create or update an linkouts
Create or update an linkout object
HTTP Request
Create linkout POST https://api.vice.com/<API version>/linkouts
Update linkout PATCH https://api.vice.com/<API version>/linkouts/<ID>
POST /v1.1/linkouts
orPATCH /v1.1/linkouts/<ID>
// Write operations are only permitted in v1.1
{
"title": "Wegen Auschwitz-Line: Farid Bang und Kollegah könnten vom ECHO ausgeschlossen werden",
"dek": "Und Farid Bang reagiert überraschend sachlich.",
"lede": {
// Image object
...
}
}
Parameter and Type | Description | Required on create |
---|---|---|
title string |
false | The attached objects title |
dek string |
Summary that appears below the headline | false |
lede image object |
See image object for details | false |
Delete linkout
Deletes linkout from permanent store
HTTP Request
DELETE https://api.vice.com/<API version>/linkouts/<ID>
Add, Delete or update an image for a linkout
Adds an image to the article, see image object for details on how to create or update an image resource. Only possible image types for article are lede
HTTP Request
Add an image
POST https://api.vice.com/<API version>/linkouts/<ID>/lede
Update an image
PATCH https://api.vice.com/<API version>/linkouts/<ID>/lede
Delete an image
DELETE https://api.vice.com/<API version>/linkouts/<ID>/lede
Populars
The popular route offers a view into the most popular articles and videos for each locale/site pair. This list is generated on a schedule every few hours, the data polling from google analytics.
Popular Item list
Fetch a list of popular, by default this list is ordered by position ascending
HTTP Request
GET https://api.vice.com/<API version>/popular
This request will return an array of popular, for more details on pagination see https://api-docs.vice.com/#pagination
[
// Array of popular objects
...
]
Query Parameters
Parameter and Type | Description | Example |
---|---|---|
type enum('articles', 'videos') |
Filter by the resource type of the resource | articles |
for_sites string |
Filter by one or more sites | vice,vice-videos |
Sorting Query Parameters Values
Populars are always sorted in descending popularity
Popular Object
Fetch a Popular item by id
HTTP Request
GET https://api.vice.com/<API version>/popular/<ID>
{
"id": "5b087695f1cdb37607452231",
"type": "videos",
"data": {
// Article or Video object
}
}
{
"id": "5b163512ecdf422f35f3ed56",
"article_id": null,
"show_id": null,
"video_id": "5b087695f1cdb37607452231",
"content_policy_id": "5b0d7d4b12b0561a74c4ff5a",
"site_id": "57a204058cb727dec794c569",
"locale_id": "57a204068cb727dec794c573",
"created_at": null,
"updated_at": null,
"content_policy": {
// Content Policy Object
},
"video": {
// Video Object
},
"article": {
// Article Object
}
}
Object Properties
Property and type | Nullable | Description | Example |
---|---|---|---|
id string |
false | ID of the object | 58f4cd7473e7c17a75526deb |
type enum('articles', 'videos') |
false | The type of asset this popular entry is describing | article |
data object |
false | The serialized object dependent on the popular type | article |
content_policy content policy object |
true | The content policy associated with this entry | See content policy object for details |
video video object |
true | The video entry if it the popular is of type "video" | See video object for details |
article article object |
true | The article entry if the popular is of type "article" | See article object for details |
Topics
Subjects that characterize a piece of content. VICE uses topics to organize and at times distribute content.
Topic Object
Properties and details about topic objects
HTTP Request
GET https://api.vice.com/<API version>/topics/<ID>
{
"id": "5886b75ce47a7e45874c0bd8",
"article_count": 0,
"video_count": 0,
"show_count": 0,
"slug": "humans-of-the-year",
"vmp_id": 1421162,
"dek": null,
"hide_title": true,
"display_type": "themed",
"text_color": "light",
"background_color": "#08090D",
"name": "humans of the year",
"nsfw": null,
"age_required": null,
"birthday_required": null,
"urls": [
"https://motherboard.vice.com/en_us/topic/humans-of-the-year"
],
"url": "https://motherboard.vice.com/en_us/topic/humans-of-the-year",
"caption": null,
"credit": null,
"filename": "1502813860687-1502394965304-1486143918785-HOTY-lead-image_2000x1125_only.jpeg",
"filesize": 0,
"cover_json": null,
"thumbnail_url": "https://video-images.vice.com/topics/5886b75ce47a7e45874c0bd8/lede/1502813860687-1502394965304-1486143918785-HOTY-lead-image_2000x1125_only.jpeg",
"thumbnail_url_16_9": "https://video-images.vice.com/topics/5886b75ce47a7e45874c0bd8/lede/1502813860687-1502394965304-1486143918785-HOTY-lead-image_2000x1125_only.jpeg?crop=1xw:1xh;center,center",
"thumbnail_url_1_1": "https://video-images.vice.com/topics/5886b75ce47a7e45874c0bd8/lede/1502813860687-1502394965304-1486143918785-HOTY-lead-image_2000x1125_only.jpeg?crop=0.517xw:0.9191xh;0.2425xw,0xh",
"thumbnail_url_2_3": "https://video-images.vice.com/topics/5886b75ce47a7e45874c0bd8/lede/1502813860687-1502394965304-1486143918785-HOTY-lead-image_2000x1125_only.jpeg?crop=0.375xw:1xh;center,center",
"thumbnail_url_10_4": "https://video-images.vice.com/topics/5886b75ce47a7e45874c0bd8/lede/1502813860687-1502394965304-1486143918785-HOTY-lead-image_2000x1125_only.jpeg?crop=1xw:0.7111xh;0xw,0.1093xh",
"thumbnail_url_10_3": "https://video-images.vice.com/topics/5886b75ce47a7e45874c0bd8/lede/1502813860687-1502394965304-1486143918785-HOTY-lead-image_2000x1125_only.jpeg?crop=1xw:0.5387xh;0xw,0.1911xh",
"thumbnail_url_7_10": "https://video-images.vice.com/topics/5886b75ce47a7e45874c0bd8/lede/1502813860687-1502394965304-1486143918785-HOTY-lead-image_2000x1125_only.jpeg?crop=0.39375xw:1xh;center,center",
"thumbnail_url_952_498": "https://video-images.vice.com/topics/5886b75ce47a7e45874c0bd8/lede/1502813860687-1502394965304-1486143918785-HOTY-lead-image_2000x1125_only.jpeg?crop=1xw:0.9299719887955181xh;center,center"
}
{
"id": "5886b75ce47a7e45874c0bd8",
"topic_type": "standard",
"is_vms_record": false,
"topic": "humans of the year",
"legacy_id": 1421162,
"article_count": 0,
"video_count": 0,
"show_count": 0,
"created_at": 1485223772425,
"updated_at": 1485223772425,
"slug": {
// Slug object
...
},
"slugs": [
// Array of slug objects
],
"meta": {
"id": "59931ea5b4d6b4437e108e41",
"topic_id": "5886b75ce47a7e45874c0bd8",
"site_id": "57a204058cb727dec794c570",
"locale_id": "57a204068cb727dec794c573",
"lede_id": "59931ea5b4d6b4437e108e43",
"background_color": "#08090D",
"text_color": "light",
"display_type": "themed",
"dek": null,
"hide_title": true,
"is_featured": false
},
"lede": {
// Image object
},
"urls": [
"https://motherboard.vice.com/en_us/topic/humans-of-the-year"
],
"content_restriction": {
// content restriction object
...
},
}
Object Properties
Property and type | Nullable | Description | Example |
---|---|---|---|
id string |
false | ID of the object | 5ab00c17462f6d000c91455e |
article_count number |
false | deprecated | 0 |
video_count number |
false | deprecated | 0 |
show_count number |
false | deprecated | 0 |
name string |
false | Topic name | count dankula |
slug string |
false | Topic path url, this can be used to generate a topic url e.g https://www.vice.com/en_us/topic/nyc | count-dankula |
vmp_id number |
true | Legacy ID reference | 132 |
dek string |
true | Summary that appears below the headline | Residents are concerned the upcoming closure will make commuting in Long Island City and its surrounding neighborhoods a living hell. |
hide_title boolean |
false | Flag to hide the title on topic pages | true |
display_type enum('grid','themed','series','full-bleed') |
false | Display preference for topic page items, implementation is left to the consumer | themed |
text_color enum(light , dark ) |
false | theme for text color in topic pages | light |
background_color string |
true | hex color that background should be displayed as in topic pages | #f1f1f1 |
urls array of string |
false | List of urls where a topic can be present, VICE publishes articles across multiple sites and regions | ["https://www.vice.com/en_us/topic/genre-lifestyle"] |
is_featured boolean |
true | Determines if topic is featured in a request contenxt | false |
url string (deprecated) |
false | Topic url in the current context (site and locale) | https://www.vice.com/en_us/topic/genre-lifestyle |
caption string |
true | Lede image caption | The L Train |
credit string |
true | Lede image credit | Court Square G platform. Photo by Harrison Leong |
filename string |
false | Image filename | 1520959111893-Court_Square_-_Crosstown_Platform.jpeg |
cover_json string |
true | Json representation of lede unit, for internal use only | {} |
thumbnail_url thumbnail_url_<WIDTH_RATIO>_<HEIGHT_RATIO> string |
false | Lede image url and all the possible crops by ratio (width_height) | https://video-images.vice.com/articles/5aa6ad57113c9e0008d9c958/lede/1520959111893-Court_Square_-_Crosstown_Platform.jpeg?crop=1xw:0.7658740039840638xh;center,center |
Topics list
Fetch a list of topics, by default this list is ordered by id
HTTP Request
GET https://api.vice.com/<API version>/topics
This request will return an array of topic objects, for more details on pagination see https://api-docs.vice.com/#pagination
[
// Array of topic objects
...
]
Query Parameters
Parameter and Type | Description | Example |
---|---|---|
ids string |
A comma-separated list of specific ids to retrieve. | 59dcea52ae54a32d39706782,5aa7db2265cc6a00065bde62 |
slug string |
Filter topics by a given slug | topic-slug |
topic string |
Filter topics by a given topic name | topic-slug |
sort string |
Sort based on possible values, see bellow | -topic |
Sorting Query Parameters Values
Parameter Value | Description |
---|---|
topic |
Sort by name |
updated_at |
Sort by updated date |
slug |
Sort by slug |
Create or update a topic
Create or update a topic object
HTTP Request
Create topic POST https://api.vice.com/<API version>/topics
Update topic PATCH https://api.vice.com/<API version>/topics/<ID>
POST /v1.1/topics
orPATCH /v1.1/topics/<ID>
// Write operations are only permitted in v1.1
{
"topic": "new topic",
"slug": {
// slug object
...
},
"meta": {
"background_color": "#08090D",
"text_color": "light",
"display_type": "themed",
"dek": null,
"hide_title": true,
"is_featured": false
}
"content_restriction": {
// content restriction object
...
},
}
Parameter and Type | Description | Required on create |
---|---|---|
topic_type enum('standard') |
deprecated | false |
topic string |
Topic name | true |
slug slug object |
See slug object for details | false |
dek string |
Summary that appears below the headline | false |
meta.hide_title boolean |
Flag to hide the title on topic pages | false |
meta.display_type enum('grid','themed','series','full-bleed') |
Display preference for topic page items, implementation is left to the consumer | false |
meta.text_color enum(light , dark ) |
theme for text color in topic pages | false |
meta.background_color string |
hex color that background should be displayed as in topic pages | false |
meta.is_featured boolean |
Determines if topic is featured in a request contenxt | false |
Delete topic
Deletes topic from permanent store
HTTP Request
DELETE https://api.vice.com/<API version>/topics/<ID>
Add, Delete or update an image for a topic
Adds an image to the article, see image object for details on how to create or update an image resource. Only possible image types for article are lede
.
HTTP Request
Add an image
POST https://api.vice.com/<API version>/topics/<ID>/lede
Update an image
PATCH https://api.vice.com/<API version>/topics/<ID>/lede
Delete an image
DELETE https://api.vice.com/<API version>/topics/<ID>/lede
Embedded Topics Object
Embedded topics objects are simplified serialized version of topics objects that are attached to a piece of content. They also have a property that determines if the specific topic should be the main (primary
) topic.
{
"id": "5ab157381511ce000876992b",
"is_primary_topic": false,
"topic_type": "standard",
"name": "count dankula",
"slug": "count-dankula"
}
{
"topic_id": "57a204e58cb727dec79546f8",
"article_id": "5ab14c16adc0970006ae12cf",
"video_id": null,
"show_id": null,
"page_id": null,
"collection_id": null,
"is_primary_topic": false,
"vms_id": null,
"locale_scope": 536871203,
"created_at": null,
"updated_at": 1521658986245,
"topic": {
// Topic object
...
}
}
Property and type | Nullable | Description | Example |
---|---|---|---|
id string |
false | ID of the object | 5ab00c17462f6d000c91455e |
is_primary_topic boolean |
false | Flag to determine if the specific topic should be the main | false |
topic_type enum('standard') |
false | deprecated | standard |
name string |
false | Topic name | count dankula |
slug string |
false | Topic path url, this can be used to generate a topic url e.g https://www.vice.com/en_us/topic/nyc | count-dankula |
Create or update embedded topic
Create or update a embedded topic object. The topics will be overriding by the array sent, e.g. to remove a topic simply ommit it from the array sent.
embedded topic objects are created/updated when sending a resource create request e.g.
POST /v1.1/articles
orPATCH /v1.1/articles/<ID>
// Write operations are only permitted in v1.1
{
...article data,
"topics": [
{
"topic_id": "5806427dd124317cb20c4d8f",
"is_primary_topic": true
}
]
}
Parameter and Type | Required | Description |
---|---|---|
topic_id string |
true | ID of the topic |
is_primary_topic boolean |
false | Flag to determine if the specific topic should be the main |
Shows
A show is a resource that contains contextual data about a number of seasons. The hierarchy of the data can mimic the real world relationships. Ie- A show has a bunch of seasons, each season has a number of episodes, each episode has a specific video.
Show Object
Fecth show details by id
HTTP Request
GET https://api.vice.com/<API version>/shows/<ID>
{
"id": "57e37c86356a92489f2a0a19",
"vmp_id": 333,
"original_id": 687,
"slug": "vice-news-shorts",
"title": "VICE News Shorts",
"email_newsletter": null,
"facebook_url": null,
"facebook_handle": null,
"twitter_url": null,
"twitter_handle": null,
"instagram_url": null,
"instagram_handle": null,
"youtube_url": null,
"tumblr_url": null,
"pinterest_url": null,
"reddit_url": null,
"reddit_handle": null,
"soundcloud_url": null,
"twitch_url": null,
"twitch_handle": null,
"summary": null,
"suggested_tweet": null,
"dek": "Short videos by VICE News. ",
"promotional_text": null,
"season_count": 1,
"episode_count": 0,
"video_count": 186,
"tv_background": null,
"apple_tv_background": null,
"apple_tv_banner": null,
"latest_video_publish_date": null,
"social_description": null,
"social_title": null,
"episode_display_mode": "stack",
"nsfb": false,
"nsfw": false,
"urls": [
"https://video.vice.com/en_us/show/vice-news-shorts"
],
"social_lede": null,
"contributions": [
],
"channel": {
// Channel object
...
},
"url": "https://video.vice.com/en_us/show/vice-news-shorts",
"topics": [
// Array of embedded topic object
...
],
"primary_topic": null,
"card": {
// Image object
...
},
"card_landscape": {
// Image object
...
},
"lede": {
// Image object
...
},
"social_lede": {
// Image object
...
},
"logo": {
// Image object
...
}
}
{
"id": "57e37c86356a92489f2a0a19",
"channel_id": "57a204088cb727dec794c67f",
"insider_show_id": 687,
"legacy_id": 333,
"episode_display_mode": "stack",
"sort_order": 1,
"video_count": 186,
"global_site_scope": 11,
"global_locale_scope": 541165879295,
"created_at": 1474526342692,
"updated_at": 1522956770254,
"content_policy": {
// Content policy object
...
},
"slugs": [
// Array of slug objects
...
],
"slug": {
// Slug object
...
},
"content_policies": [
// Array of content policies objects
...
],
"base": {
// Base object
...
},
"meta": {
// Meta object
...
},
"tv_background": {
// Image object
...
},
"apple_tv_background": {
// Image object
...
},
"apple_tv_banner": {
// Image object
...
},
"card": {
// Image object
...
},
"card_landscape": {
// Image object
...
},
"lede": {
// Image object
...
},
"social_lede": {
// Image object
...
},
"logo": {
// Image object
...
},
"contributors": [
],
"social": {
// Social object
...
},
"topics": [
// Array of embedded topic object
...
],
"season_count": 1,
"episode_count": 0,
"channel": {
// Channel object
...
},
"position": 1,
"urls": [
"https://video.vice.com/en_us/show/vice-news-shorts"
]
}
Object Properties
Property and type | Nullable | Description | Example |
---|---|---|---|
id string |
false | ID of the show | 5aa6ad57113c9e0008d9c958 |
title string |
true | Show's title | The Artist with Multiple Personalities |
sort_order number |
false | Forced sorting order by editors | 1 |
vmp_id number |
true | Legacy ID reference | 132 |
original_id string |
false | Generated id for tracking purposes with legacy systems | vice:1532319 |
slug string |
false | Pretty custom url path | the-l-train-shutdown-is-bad-news-for-queens-too |
email_newsletter |
true | Email subsciption url | https://www.vice.com/en_us/subscribe |
facebook_handle |
true | Show's facebook handle | Google |
twitter_url |
true | Show's twitter | https://twitter.com/Google |
twitter_handle |
true | Show's twitter handle | Google |
instagram_url |
true | Show's instagram | https://instagram.com/Google |
instagram_handle |
true | Show's instagram handle | google |
instagram_url |
true | Show's youtube | https://www.youtube.com/channel/UCNDUud96oGK5xQ9gyg913vw |
tumblr_url |
true | Show's tumblr | http://viceland.tumblr.com/ |
pinterest_url |
true | Show's pinterest | https://www.pinterest.com/lisathephyco/desus-and-mero/ |
reddit_url |
true | Show's reddit | https://www.reddit.com/r/bodegaboys/ |
reddit_handle |
true | Show's reddit handle | bodegaboys |
soundcloud_url |
true | Show's soundcloud | https://soundcloud.com/bodega-sushi |
twitch_url |
true | Show's twitch | https://www.twitch.tv/waypoint |
twitch_handle |
true | Show's twitch handle | waypoint |
dek string |
true | Summary that appears below the headline | Short videos by VICE News. |
promotional_text string |
true | Shows promotional text displayed in shows page | Short videos by VICE News. |
suggested_tweet string |
true | Suggested default text for tweets | Residents are concerned the upcoming closure will make commuting in Long Island |
summary string |
true | Short description of the show | Residents are concerned the upcoming closure will make commuting in Long Island |
season_count number |
false | Number of available seasons for the show | 1 |
episode_count number |
false | Number of available episodes for the show, this number can be different from videos since one episode can have multiple videos | 1 |
video_count number |
false | Number of available videos for the show | 13 |
tv_background image object |
true | Image displayed in the background of roku/etc. TV | See image object for details |
apple_tv_background image object |
true | Image displayed in the background of apple TV | See image object for details |
apple_tv_banner image object |
true | Image displayed as lede on the tv show's page in apple TV | See image object for details |
card image object |
true | Image displayed in carousels or show selectors | See image object for details |
card_landscape image object |
true | Image displayed in carousels or show selectors | See image object for details |
logo image object |
true | Logo image used in a variety of places | See image object for details |
lede image object |
true | Lede image used in a variety of places | See image object for details |
social_lede image object |
true | Custom image used in social platforms | See image object for details |
social_description string |
true | Custom show description presented on social media platforms | Residents are concerned the upcoming closure will make commuting in Long Island |
social_title string |
true | Custom show title presented on social media platforms | The L Train Shutdown Is Bad News for Queens, Too |
episode_display_mode enum('stack', queue) |
false | Episode default sort order, LIFO or FIFO | stack |
nsfb boolean |
false | Flag to determine if show is safe for advertising brands | true |
nsfw boolean |
false | Flag to determine if show is safe for work | true |
urls array of string |
false | List of urls where show can be present, VICE publishes shows across multiple sites and regions | ["https://video.vice.com/en_us/show/vice-news-shorts"] |
url string (deprecated) |
false | Show url in the current context (site and locale) | https://video.vice.com/en_us/show/vice-news-shorts |
contributions array of contributions object |
false | List of Show's contributors | See contributions object for details |
channel channel object |
true | VICE Brand that the show belongs to | See channel object for details |
topics array of embedded topics object |
false | List of Topics for a show | See embedded topics object for details |
caption string |
true | Lede image caption | The L Train |
credit string |
true | Lede image credit | Court Square G platform. Photo by Harrison Leong |
filename string |
false | Image filename | 1520959111893-Court_Square_-_Crosstown_Platform.jpeg |
cover_json string |
true | Json representation of lede unit, for internal use only | {} |
thumbnail_url thumbnail_url_<WIDTH_RATIO>_<HEIGHT_RATIO> string |
false | Lede image url and all the possible crops by ratio (width_height) | https://video-images.vice.com/articles/5aa6ad57113c9e0008d9c958/lede/1520959111893-Court_Square_-_Crosstown_Platform.jpeg?crop=1xw:0.7658740039840638xh;center,center |
system_tags array |
false | deprecated | [] |
genres array |
false | deprecated | [] |
Shows list
Fetch a list of shows, by default this list is ordered by published date
HTTP Request
GET https://api.vice.com/<API version>/shows
This request will return an array of show objects, for more details on pagination see https://api-docs.vice.com/#pagination
[
// Array of show objects
...
]
Query Parameters
Parameter and Type | Description | Example |
---|---|---|
ids string |
A comma-separated list of specific shows ids to retrieve. | 59dcea52ae54a32d39706782,5aa7db2265cc6a00065bde62 |
nsfw boolean |
Filter shows by not safe for work flag | true |
channel_id string |
Filter by channel id | 59dcea52ae54a32d39706782 |
contributor_id string |
Filter by contributor id | 59dcea52ae54a32d39706782 |
topic_id string |
Filter by topic id | 59dcea52ae54a32d39706782 |
slug string |
Filter shows by a given slug | show-slug |
status_id string |
Filter shows based on status_id | 3 |
published_at enum('future', 'this_week', 'last_week', 'last_month') |
Filter shows based on published date | future |
sort string |
Sort shows based on possible values, see bellow | -updated_at |
Sorting Query Parameters Values
Parameter Value | Description |
---|---|
sort_order |
Sort by forced rank |
display_title |
Sort by the show's title |
published_at |
Sort by published date |
created_at |
Sort by created date |
updated_at |
Sort by updated date |
deleted_at |
Sort by deleted date |
Get a list of featured shows
Fetch a list of featured shows
HTTP Request
GET https://api.vice.com/<API version>/shows_featured
This request will return an array of show objects, for more details on pagination see https://api-docs.vice.com/#pagination
[
// Array of show objects
...
]
Update featured shows
Update shows featured order
HTTP Request
PUT https://api.vice.com/<API version>/shows_featured/order
// Write operations are only permitted in v1.1
[
{
"show_id": "hexid",
"position": 0
},
{
"show_id": "hexid",
"position": 1
}
]
Parameter and Type | Description | Required |
---|---|---|
show_id string |
id of the show | |
position number |
Order of the itme | true |
Get a list of content policies
Display where a show is distributed, site and locales and what visibility rules it has for each. You can use this endpoint to display proper meta tags or link content for SEO purposes. See content policy object for details
HTTP Request
GET https://api.vice.com/<API version>/shows/<ID>/content_policies
[
// Array of content policies objects
...
]
Create show
Update a show object
Updates a show object
HTTP Request
Update show PATCH https://api.vice.com/<API version>/shows/<ID>
PATCH /v1.1/shows/<ID>
// Write operations are only permitted in v1.1
{
"episode_display_mode": "stack",
"sort_order": 1,
"content_policy": {
// Content policy object
...
},
"slug": {
// Slug object
...
},
"base": {
// Base object
...
},
"meta": {
// Meta object
...
},
"tv_background": {
// Image object
...
},
"apple_tv_background": {
// Image object
...
},
"apple_tv_banner": {
// Image object
...
},
"card": {
// Image object
...
},
"card_landscape": {
// Image object
...
},
"logo": {
// Image object
...
},
"lede": {
// Image object
...
},
"social_lede": {
// Image object
...
},
"contributors": [
],
"social": {
// Social object
...
},
"topics": [
// Array of embedded topic object
...
]
}
Parameter and Type | Description | Required on create |
---|---|---|
episode_display_mode enum('stack', queue) |
Episode default sort order, LIFO or FIFO | stack |
sort_order number |
Forced sorting order by editors | 1 |
content_policy content policy object |
See content policy object for details | false |
meta meta object |
See meta object for details | false |
base base object |
See base object for details | false |
contributions contributions object |
See base object for details | false |
topics topics object |
See base object for details | false |
slug slug object |
See slug object for details | false |
tv_background image object |
See image object for details | false |
apple_tv_background image object |
See image object for details | false |
apple_tv_banner image object |
See image object for details | false |
card image object |
See image object for details | false |
card_landscape image object |
See image object for details | false |
logo image object |
See image object for details | false |
lede image object |
See image object for details | false |
social_lede image object |
See image object for details | false |
Delete show
Removes show from visibility
HTTP Request
DELETE https://api.vice.com/<API version>/shows/<ID>
Add, Delete or update an image for a show
Adds an image to the show, see image object for details on how to create or update an image resource. Only possible image types for shows are lede
, social_lede
, card
, card_landscape
, apple_tv_banner
, apple_tv_background
, tv_background
, and logo
HTTP Request
Add an image
POST https://api.vice.com/<API version>/shows/<ID>/<IMAGE TYPE>
Update an image
PATCH https://api.vice.com/<API version>/shows/<ID>/<IMAGE TYPE>
Delete an image
DELETE https://api.vice.com/<API version>/shows/<ID>/<IMAGE TYPE>
Main Video
Return the next main video to be displayed for the show, taking into account the videos themselves and the show's episode_display_mode.
HTTP Request
GET https://api.vice.com/<API version>/shows/main_video?id=[show_id],[show_id],...
This request will return an array of Video objects, the index of which corresponding with the index of the passed in show_id
[
// Array of Video objects
...
]
Parameter and Type | Description | Required on create |
---|---|---|
ids string |
A comma-separated list of specific show ids to retrieve for. | 59dcea52ae54a32d39706782,5aa7db2265cc6a00065bde62 |
HTTP Request
GET https://api.vice.com/<API version>/shows/<ID>/main_video
This request will return a Video objects
{
// A Video object
...
}
Seasons
A season is a resource that can contain contextual data about a number of episodes.
Season Object
Fecth season details by id
HTTP Request
GET https://api.vice.com/<API version>/season/<ID>
{
"id": "57a204118cb727dec794cc88",
"season_number": 1
}
{
"id": "57a204118cb727dec794cc88",
"show_id": "57a204098cb727dec794c6a7",
"season_number": 1,
"legacy_id": 1,
"created_at": null,
"updated_at": null,
"show": {
// Show object
...
},
"episodes": [
// Array of episode objects
]
}
Object Properties
Property and type | Nullable | Description | Example |
---|---|---|---|
id string |
false | ID of the season | 5aa6ad57113c9e0008d9c958 |
season_number number |
false | Season number | 1 |
Seasons list
Fetch a list of seasons, by default this list is ordered by published date
HTTP Request
GET https://api.vice.com/<API version>/seasons
This request will return an array of season objects, for more details on pagination see https://api-docs.vice.com/#pagination
[
// Array of seasons objects
...
]
Query Parameters
Parameter and Type | Description | Example |
---|---|---|
ids string |
A comma-separated list of specific seasons ids to retrieve. | 59dcea52ae54a32d39706782,5aa7db2265cc6a00065bde62 |
show_id string |
Filter by show id | 59dcea52ae54a32d39706782 |
season_number string |
Filter by season number | 1 |
sort string |
Sort seasons based on possible values, see bellow | -updated_at |
Sorting Query Parameters Values
Parameter Value | Description |
---|---|
season_number |
Sort by season number |
Create or update a season object
Sections
A section is a resource that allows you to curate collections of articles, videos, topics, and series.
Section Object
Fecth season details by id
HTTP Request
GET /<API version>/sections/<Slug or ID>
{
"id": "5c0a9c89bacf361386c50a22",
"title": "Culture",
"slug": "culture",
"social_title": null,
"social_description": null,
"socials": {
// Socials object
},
"brand_logo_svg_url": "https://foo.com/foo.svg",
"brand_attribution_svg_url": "https://foo.com/foo.svg",
"brand_background": {
// Image object
}
}
{
"id": "5c0a9c89bacf361386c50a22",
"parent_id": null,
"socials": {
// Socials object
},
"brand_background": {
// Image object
},
"social_lede": {
// Image object
},
"meta": {
"status_id": 2,
"published_at": null,
"title": "Culture",
"slug": "culture",
"social_title": null,
"social_description": null,
"site_id": "57a204058cb727dec794c567",
"locale_id": "57a204068cb727dec794c573",
"brand_logo_svg_url": "https://foo.com/foo.svg",
"brand_attribution_svg_url": "https://foo.com/foo.svg",
},
"updated_at": 1544199305927,
"created_at": 1544199305927
}
Object Properties
Property and type | Nullable | Description | Example |
---|---|---|---|
id string |
false | ID of the section | 5aa6ad57113c9e0008d9c958 |
title string |
false | The title of the section | Culture |
slug string |
false | The lookup slug of the section (must be unique for the section's site/locale scope) | culture |
social_title string |
true | Title to appear for social media parsers | Vice Culture |
social_description string |
true | Description to appear for social parsers | Vice explores culture |
brand_logo_svg_url string |
true | Url for branding logo SVG | https://foo.com/foo.svg |
brand_attribution_svg_url string |
true | Url for branding attribution logo SVG | https://foo.com/foo.svg |
Create or Update Section
Create or update a section object
HTTP Request
Create section POST https://api.vice.com/<API version>/sections
Update section PATCH https://api.vice.com/<API version>/sections/<ID>
POST /v1.1/sections
orPATCH /v1.1/sections/<ID>
// Write operations are only permitted in v1.1
{
// Global
"parent_id": "59dcea52ae54a32d39706782",
// These are all localizable
"meta": {
"status_id": 2,
"published_at": null,
"title": "Culture",
"slug": "culture",
"social_title": null,
"social_description": null,
"brand_logo_svg_url": "https://foo.com/foo.svg",
"brand_attribution_svg_url": "https://foo.com/foo.svg",
},
// These are automatically localized as well
"socials": {
// Socials object
},
"pinned": [
{ "article_id: "59dcea52ae54a32d39706782" }
{ "video_id: "59dcea52ae54a32d39706782" }
{ "linkout_id: "59dcea52ae54a32d39706782" }
],
"links": [
{ "title": "test", "topic_id": "57a204a98cb727dec795188b" },
{ "title": "something", "set_id": "5bc78b4ae46858000600a89f" },
{ "title": "somehting else", "section_id": "5bc78b4ae46858000600a89f" },
{ "title": "another thing", "external_url": "https://www.google.com" }
]
}
Property and type | Nullable | Description | Example |
---|---|---|---|
id string |
false | ID of the section | 5aa6ad57113c9e0008d9c958 |
title string |
false | The title of the section | Culture |
slug string |
false | The lookup slug of the section (must be unique for the section's site/locale scope) | culture |
social_title string |
true | Title to appear for social media parsers | Vice Culture |
social_description string |
true | Description to appear for social parsers | Vice explores culture |
parent_id string |
true | Another section which this section is a child of. Section's inherit their children's feeds. | 5aa6ad57113c9e0008d9c958 |
Pinned
A section can contain an array of curated articles/videos/linkouts that will appear pinned on the top of the page. The format for each of these takes the form:
{ "article_id": "", "video_id": "", "linkout_id": "" }
Where only one of article_id/video_id/linkout_id should be set.
Links
A section's links appear in the navigation of the section page and help produce a programatic feed of content. Each consists of a title
and one of topic_id
, set_id
, section_id
(pointing to another section), or external_url
.
Add a Images to a section
Adds images associated with the section. These will be automatically localized.
HTTP Request
POST https://api.vice.com/<API version>/sections/<ID>/brand_background
POST https://api.vice.com/<API version>/sections/<ID>/social_lede
Add a branded SVG to a section
Adds a branded image (must be SVG format). There are two possible types of SVGs, brand_logo_svg_url
and brand_attribution_svg_url
.
HTTP Request
Add a branded SVG
POST https://api.vice.com/<API version>/sections/<ID>/brand_logo_svg_url
POST https://api.vice.com/<API version>/sections/<ID>/brand_attribution_svg_url
Add section to article or video
Articles and videos can belong to a section. This associated can be made by PATCHing the individual article/video as follows:
PATCH /v1.1/<articles|videos>/<ID>
// Write operations are only permitted in v1.1
{
"meta": {
"section_id": "<SectionID>"
}
}
Sections are added to the article/video payloads as:
GET /<API version>/<articles|videos>/<ID>
{
"id": "57a204068cb727dec794c573"
// ...Rest of article/video...
"section": {
// Section Object
}
}
{
"id": "57a204068cb727dec794c573"
// ...Rest of article/video...
"meta": {
"section_id": "<SectionID>",
"section": {
// Section Object
}
}
}
Get full section serialization
Because the full lookup of sections can be fairly large and slow (and they appear inlined in articles and videos) we instead default to a slimmed down version and instead provide other urls for getting the "full" content of a section.
/full Route
GET /v1/sections/<Slug or ID>/full
{
"id": "5c0a9c89bacf361386c50a22",
"title": "hello",
"slug": "world",
"social_title": null,
"social_description": null,
"socials": {
// Social Object
},
"brand_logo_svg_url": "https://foo.com/foo.svg",
"brand_attribution_svg_url": "https://foo.com/foo.svg",
"brand_background": {
// Image object
},
"links": [
{
"title": "test",
"external_url": null,
"type": "topic",
"data": {
// Topic Object
},
"latest": [
// Follows the format of "/latest"
{
"id": "59e8e65b6be2fc4875f1b822",
"type": "articles",
"data": {
// Article Object
}
}
]
},
{
"title": "something",
"external_url": null,
"type": "series",
"data": {
// Set Object
},
"latest": [
{
"id": "5bdc77f6595ea8000613421f",
"type": "articles",
"data": {
// Article Object
}
},
{
"id": "5bc75e3b5c1f590006d8ce0a",
"type": "linkout",
"data": {
// Linkout Object
}
}
]
},
{
"title": "somehting else",
"external_url": null,
"type": "section",
"data": {
// Section Object
},
"latest": [
{
"id": "59e8e65b6be2fc4875f1b822",
"type": "articles",
"data": {
// Article Object
}
}
]
}
{
"title": "another thing",
"external_url": "https://www.google.com",
"type": "external",
"data": null,
"latest": []
}
],
"pinned": [
{
"id": "59e8e65b6be2fc4875f1b822",
"type": "articles",
"data": {
// Article Object
}
},
{
"id": "5be53b71be40771cad7e9e01",
"type": "videos",
"data": {
// Video Object
}
}
],
"latest": [
{
// For now this will be articles only
"id": "59e8e65b6be2fc4875f1b822",
"type": "articles",
"data": {
// Article Object
}
}
],
"videos": [
{
"id": "5be53b71be40771cad7e9e01",
"type": "videos",
"data": {
// Video Object
}
}
]
}
// Currently the "full" route is only serialized using the v1 serializer. For v1.1 it is recommended to use the /links and /pinned urls.
Query Parameters
Parameter and Type | Description | Example |
---|---|---|
latest_limit number |
The number of latest articles for the section to return. | 4 |
video_limit number |
2 |
|
link_latest_limit number |
Filter by season number | 4 |
Get Pinned
GET /v1.1/sections/<Slug or ID>/pinned
// Not currently supported in v1
[
{
"section_id": "5c0a9c89bacf361386c50a22",
"article_id": "59e8e65b6be2fc4875f1b822",
"video_id": null,
"linkout_id": null,
"position": 0,
"updated_at": 1544451209171,
"created_at": 1544451209171,
"video": null,
"article": {
// Article Object
}
},
{
"section_id": "5c0a9c89bacf361386c50a22",
"article_id": null,
"video_id": "5be53b71be40771cad7e9e01",
"linkout_id": null,
"position": 1,
"updated_at": 1544451209171,
"created_at": 1544451209171,
"article": null,
"video": {
// Video Object
}
}
]
Get links
GET /v1.1/sections/<Slug or ID>/links
// Not currently supported in v1
[
{
"main_section_id": "5c0a9c89bacf361386c50a22",
"topic_id": "57a204a98cb727dec795188b",
"set_id": null,
"section_id": null,
"external_url": null,
"title": "test",
"position": 0,
"updated_at": 1544451209154,
"created_at": 1544451209154,
"set": null,
"section": null,
"topic": {
// Topic Object
}
},
{
"main_section_id": "5c0a9c89bacf361386c50a22",
"topic_id": null,
"set_id": "5bc78b4ae46858000600a89f",
"section_id": null,
"external_url": null,
"title": "something",
"position": 1,
"updated_at": 1544451209155,
"created_at": 1544451209155,
"topic": null,
"section": null,
"set": {
// Set Object
}
},
{
"main_section_id": "5c0a9c89bacf361386c50a22",
"topic_id": null,
"set_id": null,
"section_id": "5bc78b4ae46858000600a89f",
"external_url": null,
"title": "something",
"position": 1,
"updated_at": 1544451209155,
"created_at": 1544451209155,
"topic": null,
"section": {
// Section Object
},
"set": null
},
{
"main_section_id": "5c0a9c89bacf361386c50a22",
"topic_id": null,
"set_id": null,
"section_id": null,
"external_url": "https://www.google.com",
"title": "another thing",
"position": 2,
"updated_at": 1544451209155,
"created_at": 1544451209155,
"topic": null,
"set": null,
"section": null
}
]
Episodes
An episode is a resource that contains contextual data about a specific video resource.
Episode Object
Fecth episode details by id
HTTP Request
GET https://api.vice.com/<API version>/episodes/<ID>
{
"id": "57a204148cb727dec794cd93",
"episode_number": 2,
"season": {
// Season object
...
"show": {
// Show object
...
}
}
}
{
"id": "57a204148cb727dec794cd93",
"show_id": "57a2040a8cb727dec794c733",
"season_id": "57a204118cb727dec794cc9d",
"episode_number": 2,
"legacy_id": 107,
"created_at": null,
"updated_at": null,
"season": {
// Season object
...
},
"show": {
// Show object
...
}
}
Object Properties
Property and type | Nullable | Description | Example |
---|---|---|---|
id string |
false | ID of the episode | 5aa6ad57113c9e0008d9c958 |
episode_number number |
false | Episode number | 1 |
season season object |
true | Season the episode belongs to | See season object for details |
show show object |
true | Show the episode belongs to | See show object for details |
Episodes list
Fetch a list of episodes
HTTP Request
GET https://api.vice.com/<API version>/episodes
This request will return an array of episode objects, for more details on pagination see https://api-docs.vice.com/#pagination
[
// Array of episodes objects
...
]
Query Parameters
Parameter and Type | Description | Example |
---|---|---|
ids string |
A comma-separated list of specific episodes ids to retrieve. | 59dcea52ae54a32d39706782,5aa7db2265cc6a00065bde62 |
show_id string |
Filter by show id | 59dcea52ae54a32d39706782 |
season_id string |
Filter by season id | 59dcea52ae54a32d39706782 |
episode_number string |
Filter by episode number | 1 |
sort string |
Sort episodes based on possible values, see bellow | -updated_at |
Sorting Query Parameters Values
Parameter Value | Description |
---|---|
episode_number |
Sort by episode number |
Create or update a episode object
Videos
A video object contains data about the properties of a video. Some of these properties are the same, like title, or lede image. And some are specific to video, like data about the resolution, or format. A video can be part of the same episode, e.g. full video vs part 1 and part 2, the same episode might contain multiple video versions.
Video Object
Fecth video details by id
HTTP Request
GET https://api.vice.com/<API version>/videos/<ID>
{
"id": "5a14137b177dd46fc1240663",
"vms_id": "5a14137b177dd46fc1240663",
"video_type": "full_length",
"title": "The Artist with Multiple Personalities",
"body": "Kim Noble is an artist with a difference – over 100 of them, in fact. After suffering childhood abuse, Kim's mind split into over a hundred distinct personalities to cope with the trauma. Over a dozen personalities are painters, including Judy the bulimic teenager, a gay man named Ken, and a mother called Patricia. \n\nWhile Kim was diagnosed with dissociative identity disorder (DID) and raising her daughter Aimee, she and her various personalities began painting as a way of understanding their own complex mind. \n\nNow Aimee is at university studying law, and Kim is a world-renowned artist who exhibits her work internationally. VICE meets her on the eve of her group show in London aimed at raising awareness of mental health in art.",
"dek": "Kim Noble is a painter with dissociative identity disorder – and she uses art to understand her multiple personalities.",
"summary": "Kim Noble is a painter with dissociative identity disorder – and she uses art to understand her multiple personalities.",
"suggested_tweet": null,
"slug": "vice-kim-noble-the-artist-with-multiple-personalities",
"rating": "TV-PG",
"duration": 614,
"locked_scope": 0,
"schedule_end_date": null,
"vmp_id": 21961,
"locale": "en_us",
"publish_date": 1522775662485,
"updated_at": 1522813712046,
"global_site_scope": 3,
"global_locale_scope": 420636262395,
"locale_locked_scope": 0,
"social_description": null,
"social_title": null,
"nsfb": false,
"nsfw": false,
"locked": false,
"embed_only": false,
"urls": [
"https://video.vice.com/en_us/video/vice-kim-noble-the-artist-with-multiple-personalities/5a14137b177dd46fc1240663"
],
"embed_urls": [
"https://video.vice.com/en_us/embed/5a14137b177dd46fc1240663"
],
"episode": {
// Episode object
...
"season": {
// Season object
...
"show": {
// Show object
...
}
}
},
"social_lede": {
// Image Object
...
},
"channel": {
// Channel Object
...
},
"contributions": [
// Array of Contributions object
...
],
"embed_url": "https://video.vice.com/en_us/embed/5a14137b177dd46fc1240663",
"url": "https://video.vice.com/en_us/video/vice-kim-noble-the-artist-with-multiple-personalities/5a14137b177dd46fc1240663",
"caption": null,
"credit": null,
"filename": "5a14137b177dd46fc1240663-1522750225086.jpg",
"filesize": 0,
"cover_json": null,
"thumbnail_url": "https://video-images.vice.com/videos/5a/14/5a14137b177dd46fc1240663/5a14137b177dd46fc1240663-1522750225086.jpg",
"thumbnail_url_16_9": "https://video-images.vice.com/videos/5a/14/5a14137b177dd46fc1240663/5a14137b177dd46fc1240663-1522750225086.jpg?crop=1xw:1xh;center,center",
"thumbnail_url_1_1": "https://video-images.vice.com/videos/5a/14/5a14137b177dd46fc1240663/5a14137b177dd46fc1240663-1522750225086.jpg?crop=0.5625xw:1xh;center,center",
"thumbnail_url_2_3": "https://video-images.vice.com/videos/5a/14/5a14137b177dd46fc1240663/5a14137b177dd46fc1240663-1522750225086.jpg?crop=0.375xw:1xh;center,center",
"thumbnail_url_10_4": "https://video-images.vice.com/videos/5a/14/5a14137b177dd46fc1240663/5a14137b177dd46fc1240663-1522750225086.jpg?crop=1xw:0.7111111111111111xh;center,center",
"thumbnail_url_10_3": "https://video-images.vice.com/videos/5a/14/5a14137b177dd46fc1240663/5a14137b177dd46fc1240663-1522750225086.jpg?crop=1xw:0.5333333333333333xh;center,center",
"thumbnail_url_7_10": "https://video-images.vice.com/videos/5a/14/5a14137b177dd46fc1240663/5a14137b177dd46fc1240663-1522750225086.jpg?crop=0.39375xw:1xh;center,center",
"thumbnail_url_952_498": "https://video-images.vice.com/videos/5a/14/5a14137b177dd46fc1240663/5a14137b177dd46fc1240663-1522750225086.jpg?crop=1xw:0.9299719887955181xh;center,center",
"topics": [
// Array of embedded topic object
...
],
"primary_topic": null
}
{
"id": "5a14137b177dd46fc1240663",
"show_id": "57a204098cb727dec794c6f4",
"episode_id": "5ac3b40fad083b3ca89fb612",
"channel_id": "57a204088cb727dec794c67b",
"season_id": "57a204118cb727dec794cc93",
"locale_id": "57a204068cb727dec794c573",
"vms_id": "5a14137b177dd46fc1240663",
"vms_project_id": "274330",
"insider_video_id": "34310",
"uplynk_channel_id": "2d6a9b6e170942c59b8fde66875f0d38",
"video_type": "full_length",
"video_part": null,
"video_duration": 614,
"video_rating": "TV-PG",
"legacy_id": 21961,
"global_site_scope": 3,
"global_locale_scope": 420636262395,
"locale_playback_scope": 420636262395,
"created_at": 1522775055411,
"updated_at": 1522813712046,
"restrict_unknown_locales": false,
"content_policy": {
// Content policy object
...
},
"episode": {
// Episode object
...
"season": {
// Season object
...
},
"show": {
// Show object
...
}
},
"season": {
// Season object
...
},
"base": {
// Base object
...
},
"meta": {
// Meta object
...
},
"slugs": [
// Array of slug objects
...
],
"slug": {
// Slug object
...
},
"lede": {
// Image object
...
},
"topics": [
// Array of embedded topic object
...
],
"content_policies": [
// Array of content policies objects
...
],
"locale": {
// Locale object
...
},
"contributors": [
// Array of Contributions object
...
],
"channel": {
// Channel object
...
},
"social_lede": {
// Image object
...
},
"urls": [
"https://video.vice.com/en_us/video/vice-kim-noble-the-artist-with-multiple-personalities/5a14137b177dd46fc1240663"
],
"embed_urls": [
"https://video.vice.com/en_us/embed/5a14137b177dd46fc1240663"
]
}
Object Properties
Property and type | Nullable | Description | Example |
---|---|---|---|
id string |
false | ID of the video | 5aa6ad57113c9e0008d9c958 |
vms_id string |
false | Internal ID used for ingesting | `5aa6ad57113c9e0008d9c958 |
video_type enum('trailer','full_length','excerpt','extra_scene','part','variant','web_only') |
false | Type of video | full_length |
video_part number |
true | if its not a full video this will represent the video part number | 1 |
title string |
true | Video's title | The Artist with Multiple Personalities |
body string |
true | Video's html body content, usually a description of the video or relevant to it | Kim Noble is an artist with a difference – over 100 of them, in fact. After suffering childhood abuse, Kim's mind split into over a hundred distinct personalities to cope with the trauma. Over a dozen personalities are painters, including Judy the bulimic teenager, a gay man named Ken, and a mother called Patricia. \n\nWhile Kim was diagnosed with dissociative identity disorder (DID) and raising her daughter Aimee, she and her various personalities began painting as a way of understanding their own complex mind. \n\nNow Aimee is at university studying law, and Kim is a world-renowned artist who exhibits her work internationally. VICE meets her on the eve of her group show in London aimed at raising awareness of mental health in art. |
dek string |
true | Summary that appears below the headline | Residents are concerned the upcoming closure will make commuting in Long Island City and its surrounding neighborhoods a living hell. |
summary string |
true | Short description of the video | Residents are concerned the upcoming closure will make commuting in Long Island |
suggested_tweet string |
true | Suggested default text for tweets | Residents are concerned the upcoming closure will make commuting in Long Island |
slug string |
false | Pretty custom url path | the-l-train-shutdown-is-bad-news-for-queens-too |
rating string |
false | Video content rating | TV-PG |
duration number |
false | Video duration length in seconds | 614 |
locale_scope string or number |
false | Bitwise scoping for locales, for internal use only | 1 |
site_scope string or number |
false | Bitwise scoping for sites, for internal use only | 1 |
locale_display_scope string or number |
false | deprecated | 0 |
locale_locked_scope string or number |
false | Bitwise scoping that determines in which locale content is behind paywall, for internal use only | 0 |
locked_scope string or number |
false | Bitwise scoping that determines in which site content is behind paywall, for internal use only | 0 |
locked boolean |
false | Flag that determines if video requires TV provider login | false |
embed_only boolean |
false | Flag that determines if video can only be present as an embed, see feed visiblity for more information | false |
schedule_end_date number |
true | Date in ms when embargo date is set for publication time | 1521486871766 |
social_description string |
true | Custom video description presented on social media platforms | Residents are concerned the upcoming closure will make commuting in Long Island |
social_title string |
true | Custom video title presented on social media platforms | The L Train Shutdown Is Bad News for Queens, Too |
nsfb boolean |
false | Flag to determine if video is safe for advertising brands | true |
nsfw boolean |
false | Flag to determine if video is safe for work | true |
locale string |
false | Original url_fragment where the video was created |
en_us |
publish_date number |
true | Date video was published in ms | 1520959512483 |
vmp_id number |
true | Legacy ID reference | 132 |
urls array of string |
false | List of urls where video can be present, VICE publishes videos across multiple sites and regions | ["https://video.vice.com/en_us/video/vice-kim-noble-the-artist-with-multiple-personalities/5a14137b177dd46fc1240663"] |
embed_urls array of string |
false | List of urls of avaiable embeddable urls | ["https://video.vice.com/en_us/embed/5a14137b177dd46fc1240663"] |
url string (deprecated) |
false | Video url in the current context (site and locale) | https://video.vice.com/en_us/video/vice-kim-noble-the-artist-with-multiple-personalities/5a14137b177dd46fc1240663 |
embed_url string (deprecated) |
false | Embed video url in the current context (site and locale) | https://video.vice.com/en_us/embed/5a14137b177dd46fc1240663 |
social_lede image object |
true | Custom image used in social platforms | See image object for details |
channel channel object |
true | VICE Brand that the video belongs to | See channel object for details |
contributions array of contributions object |
false | List of video's contributors | See contributions object for details |
topics array of embedded topics object |
false | List of Topics for video | See embedded topics object for details |
caption string |
true | Lede image caption | The L Train |
credit string |
true | Lede image credit | Court Square G platform. Photo by Harrison Leong |
filename string |
false | Image filename | 1520959111893-Court_Square_-_Crosstown_Platform.jpeg |
cover_json string |
true | Json representation of lede unit, for internal use only | {} |
thumbnail_url thumbnail_url_<WIDTH_RATIO>_<HEIGHT_RATIO> string |
false | Lede image url and all the possible crops by ratio (width_height) | https://video-images.vice.com/articles/5aa6ad57113c9e0008d9c958/lede/1520959111893-Court_Square_-_Crosstown_Platform.jpeg?crop=1xw:0.7658740039840638xh;center,center |
system_tags array |
false | deprecated | [] |
genres array |
false | deprecated | [] |
primary_topic string |
true | Not in use for videos | null |
episode episode object |
true | Video's episode information | See episode object for details |
episode.season season object |
true | Video's season information | See season object for details |
episode.season.show show object |
true | Video's show information | See show object for details |
Videos list
Fetch a list of videos, by default this list is ordered by published date
HTTP Request
GET https://api.vice.com/<API version>/videos
This request will return an array of video objects, for more details on pagination see https://api-docs.vice.com/#pagination
[
// Array of video objects
...
]
Query Parameters
Parameter and Type | Description | Example |
---|---|---|
ids string |
A comma-separated list of specific video ids to retrieve. | 59dcea52ae54a32d39706782,5aa7db2265cc6a00065bde62 |
video_type enum('trailer','full_length','excerpt','extra_scene','part','variant','web_only') |
Filter videos by type | full_length |
rating string |
Filter by video content rating | TV-MA |
video_part number |
Filter by video part number | 1 |
restrict_unknown_locales boolean |
Filter videos by availiability in unknown locales | true |
season_id string |
Filter by season id | 59dcea52ae54a32d39706782 |
episode_id string |
Filter by episode id | 59dcea52ae54a32d39706782 |
channel_id string |
Filter by channel id | 59dcea52ae54a32d39706782 |
show_id string |
Filter by show id | 59dcea52ae54a32d39706782 |
contributor_id string |
Filter by contributor id | 59dcea52ae54a32d39706782 |
topic_id string |
Filter by topic id | 59dcea52ae54a32d39706782 |
slug string |
Filter videos by a given slug | video-slug |
nsfw boolean |
Filter videos by not safe for work flag | true |
status_id string |
Filter videos based on status_id | 3 |
published_at enum('future', 'this_week', 'last_week', 'last_month') |
Filter videos based on published date | future |
sort string |
Sort videos based on possible values, see bellow | -video_type |
Sorting Query Parameters Values
Parameter Value | Description |
---|---|
video_type |
Sort articles by video type |
published_at |
Sort by published date |
created_at |
Sort by created date |
updated_at |
Sort by updated date |
deleted_at |
Sort by deleted date |
episode_display_mode |
Sort by selected episode display mode |
Get a list of content policies
Display where a video is distributed, site and locales and what visibility rules it has for each. You can use this endpoint to display proper meta tags or link content for SEO purposes. See content policy object for details
HTTP Request
GET https://api.vice.com/<API version>/videos/<ID>/content_policies
[
// Array of content policies objects
...
]
Create video
Update a video object
Updates a video object
HTTP Request
Update video PATCH https://api.vice.com/<API version>/videos/<ID>
PATCH /v1.1/videos/<ID>
// Write operations are only permitted in v1.1
{
"locale_playback_scope": 1,
"restrict_unknown_locales": false,
"content_policy": {
// Content policy object
...
},
"base": {
// Base object
...
},
"meta": {
// Meta object
...
},
"slug": {
// Slug object
...
},
"lede": {
// Image object
...
},
"topics": [
// Array of embedded topic object
...
],
"contributors": [
// Array of Contributions object
...
],
"social_lede": {
// Image object
...
}
}
Parameter and Type | Description | Required on create |
---|---|---|
restrict_unknown_locales boolean |
Flag to allow playback on locales unkown to the api | false |
locale_playback_scope number |
Bitwise operator representing all locales video is allowed for playback | false |
content_policy content policy object |
See content policy object for details | false |
meta meta object |
See meta object for details | false |
base base object |
See base object for details | false |
contributions contributions object |
See base object for details | false |
topics topics object |
See base object for details | false |
slug slug object |
See slug object for details | false |
social_lede image object |
See image object for details | false |
lede image object |
See image object for details | false |
Delete video
Removes video from visibility
HTTP Request
DELETE https://api.vice.com/<API version>/videos/<ID>
Add, Delete or update an image for a video
Adds an image to the video, see image object for details on how to create or update an image resource. Only possible image types for video are lede
and social_lede
HTTP Request
Add an image
POST https://api.vice.com/<API version>/videos/<ID>/<IMAGE TYPE>
Update an image
PATCH https://api.vice.com/<API version>/videos/<ID>/<IMAGE TYPE>
Delete an image
DELETE https://api.vice.com/<API version>/videos/<ID>/<IMAGE TYPE>
Extractions
Upon being published videos will be processed to extract metadata about the subject matter of the content. This data can be retrieved by going to:
GET https://api.vice.com/<API version>/videos/<ID>/extractions
[
{
"base_id": "5c4217e5e9d0266702a03976",
"source": "Grapeshot",
"class": "gs_politics",
"title": "Brexit",
"score": 0.92,
"created_at": 1547836215747,
"updated_at": 1547836215747
},
{
"base_id": "5c4217e5e9d0266702a03976",
"source": "Grapeshot",
"class": "gs_politics",
"title": "EU",
"score": 0.92,
"created_at": 1547836215747,
"updated_at": 1547836215747
}
]
Homepage Carousel Items
Homepage Carousel Items provide an ordered list for displaying short videos on the video frontend's homepage.
Homepage Carousel Item Object
Fetch a homepage carousel item by id
HTTP Request
GET https://api.vice.com/<API version>/homepage_carousel_items/<ID>
{
"id": "59fc4e37b9a1d50fae470d4f",
"legacy_id": 773,
"url": "https://video.vice.com/cs/video/walk-through-walls-with-marina-abramovic/5822556e2245ccd53e0ff465?popular=1",
"label": "VICE MEETS",
"display_title": "Marina Abramović: Nejznámější performerka naší doby",
"title": "Marina Abramović: Nejznámější performerka naší doby",
"position": 0,
"updated_at": 1509707335442,
"video_lede": "https://vice-videos-assets-cdn.vice.com/videos/homepagecarouselitem/59fc4e37b9a1d50fae470d4f/output/VICE_MARINAABRAMOVIC_LOOP_X264-master.m3u8",
"lede": {
// Image object
...
},
"video": {
// Video object
...
},
"collection": null,
"caption": null,
"credit": null,
"filename": "1509708005385-marina-abramovic-still-doesnt-give-a-fuck-1479148146.jpeg",
"filesize": 0,
"cover_json": null,
"thumbnail_url": "https://video-images.vice.com/homepage_carousel_items/59fc4e37b9a1d50fae470d4f/lede/1509708005385-marina-abramovic-still-doesnt-give-a-fuck-1479148146.jpeg",
"thumbnail_url_16_9": "https://video-images.vice.com/homepage_carousel_items/59fc4e37b9a1d50fae470d4f/lede/1509708005385-marina-abramovic-still-doesnt-give-a-fuck-1479148146.jpeg?crop=0.999074074074074xw:1xh;center,center",
"thumbnail_url_1_1": "https://video-images.vice.com/homepage_carousel_items/59fc4e37b9a1d50fae470d4f/lede/1509708005385-marina-abramovic-still-doesnt-give-a-fuck-1479148146.jpeg?crop=0.5619791666666667xw:1xh;center,center",
"thumbnail_url_2_3": "https://video-images.vice.com/homepage_carousel_items/59fc4e37b9a1d50fae470d4f/lede/1509708005385-marina-abramovic-still-doesnt-give-a-fuck-1479148146.jpeg?crop=0.3746527777777778xw:1xh;center,center",
"thumbnail_url_10_4": "https://video-images.vice.com/homepage_carousel_items/59fc4e37b9a1d50fae470d4f/lede/1509708005385-marina-abramovic-still-doesnt-give-a-fuck-1479148146.jpeg?crop=1xw:0.7117701575532901xh;center,center",
"thumbnail_url_10_3": "https://video-images.vice.com/homepage_carousel_items/59fc4e37b9a1d50fae470d4f/lede/1509708005385-marina-abramovic-still-doesnt-give-a-fuck-1479148146.jpeg?crop=1xw:0.5338276181649676xh;center,center",
"thumbnail_url_7_10": "https://video-images.vice.com/homepage_carousel_items/59fc4e37b9a1d50fae470d4f/lede/1509708005385-marina-abramovic-still-doesnt-give-a-fuck-1479148146.jpeg?crop=0.39338541666666665xw:1xh;center,center",
"thumbnail_url_952_498": "https://video-images.vice.com/homepage_carousel_items/59fc4e37b9a1d50fae470d4f/lede/1509708005385-marina-abramovic-still-doesnt-give-a-fuck-1479148146.jpeg?crop=1xw:0.9308338720103425xh;center,center",
"show": {
// Show Object
},
"mobile_hero": {
// Image Object
}
}
{
"id": "59fc4e37b9a1d50fae470d4f",
"position": 0,
"legacy_id": 773,
"url": "https://video.vice.com/cs/video/walk-through-walls-with-marina-abramovic/5822556e2245ccd53e0ff465?popular=1",
"display_title": "Marina Abramović: Nejznámější performerka naší doby",
"label": "VICE MEETS",
"filename": "VICE_MARINAABRAMOVIC_LOOP_X264-master.m3u8",
"path": "videos/homepagecarouselitem/59fc4e37b9a1d50fae470d4f/output",
"created_at": 1509707319327,
"updated_at": 1509707765907,
"content_policy": {
// Content Policy Object
...
},
"lede": {
// Image Object
...
},
"video": {
// Video Object
...
},
"show": {
// Show object
},
"mobile_hero": {
// Image Object
}
}
Object Properties
Property and type | Nullable | Description | Example |
---|---|---|---|
id string |
false | ID of the object | 58f4cd7473e7c17a75526deb |
legacy_id number |
false | Legacy ID reference | 123 |
url string |
true | The url that the homepage item should link to | http://www.viceland.com/en_us/collection/viceland-free |
label string |
true | A small descriptive label that will be rendered on the FE | Inside the Crisis Actor Conspiracy Movement |
display_title string |
true | A descriptive title to be displayed on the FE | False Flag Hoaxers |
title string |
true | An alias for display_title | False Flag Hoaxers |
position number |
false | What order this item should appear in | 0 |
video_lede string |
false | A url for the lede video | https://vice-videos-assets-cdn.vice.com/videos/homepagecarouselitem/5ad12ce054eb3a000847467e/output/VCESTORY18E004_VCE_HYSTERIA_FALSE_FLAG_HOAXERS_HZ_FULL_SPLITS LOOP-X264-master.m3u8 |
lede image object |
true | Lede image for the item (these fields will also be copied to the root of the object for the v1 serialization) | See image object for details |
video video object |
true | The video entry if the url is pointing to a vice video |
See video object for details |
content_policy content policy object |
true | The content policy associated with this entry | See content policy object for details |
Homepage Carousel Item list
Fetch a list of homepage carousel items, by default this list is ordered by position ascending
HTTP Request
GET https://api.vice.com/<API version>/homepage_carousel_items
This request will return an array of homepage carousel item objects, for more details on pagination see https://api-docs.vice.com/#pagination
[
// Array of homepage carousel item objects
...
]
Query Parameters
Parameter and Type | Description | Example |
---|---|---|
display_title string |
Filter by the display title of items | False%20Flag%20Hoaxers |
position number |
Filter by the position of an item | 0 |
id string |
Find by the id of an item | 57a204088cb727dec794c67f |
status number |
Filter by the status_id of an item | 3 |
Sorting Query Parameters Values
Parameter Value | Description |
---|---|
id |
Sort by the id |
position |
Sort by position |
display_title |
Sort by display_title |
Create or update a homepage carousel item
Create or update a homepage carousel item
HTTP Request
Create article POST https://api.vice.com/v1.1/homepage_carousel_items
Update article PATCH https://api.vice.com/v1.1/homepage_carousel_items/<ID>
POST /v1.1/homepage_carousel_item
orPATCH /v1.1/homepage_carousel_items/<ID>
// Write operations are only permitted in v1.1
{
"display_title": "False Flag Hoaxers",
"label": "Inside the Crisis Actor Conspiracy Movement",
"url": "http://www.viceland.com/en_us/collection/viceland-free"
"filename": ""small-master.m3u8"",
"path": "videos/homepagecarouselitem/5adf2cb2f1d12e00078739e2/output",
"position": 0
}
Parameter and Type | Description | Required on create |
---|---|---|
display_title string(255) |
A descriptive title to be displayed on the FE | false |
label string(45) |
A small descriptive label that will be rendered on the FE | false |
url string(255) |
The url that the homepage item should link to | false |
position number |
The position the item should be at | false |
filename string(255) |
The filename of the video file. This should be set to the returned value from the video upload | false |
path string(255) |
The relative path to the video file. This should be set to the returned value from the video upload | false |
show_id string |
ID of a show associated with this homepage_carousel_item | false |
Delete homepage carousel item
Removes homepage carousel item from visibility
HTTP Request
DELETE https://api.vice.com/v1.1/homepage_carousel_items/<ID>
Add, Delete or Update a lede for a homepage carousel item
Adds an associated lede to the homepage carousel item, see image object for details on how to create or update an image resource.
HTTP Request
Add an image
POST https://api.vice.com/v1.1/homepage_carousel_items/<ID>/lede
Update an image
PATCH https://api.vice.com/v1.1/homepage_carousel_items/<ID>/lede/<LEDE ID>
Delete an image
DELETE https://api.vice.com/v1.1/homepage_carousel_items/<ID>/lede/<LEDE ID>
Add, Delete or Update a mobile hero image for a homepage carousel item
Adds an associated mobile hero image to the homepage carousel item, see image object for details on how to create or update an image resource.
HTTP Request
Add an image
POST https://api.vice.com/v1.1/homepage_carousel_items/<ID>/mobile_hero
Update an image
PATCH https://api.vice.com/v1.1/homepage_carousel_items/<ID>/mobile_hero/<IMAGE ID>
Delete an image
DELETE https://api.vice.com/v1.1/homepage_carousel_items/<ID>/mobile_hero/<IMAGE ID>
Add a video for a homepage carousel item
Uploads and associated a video to a homepage carousel item.
HTTP Request
POST https://api.vice.com/v1.1/homepage_carousel_items/<ID>/video
Accept-Encoding: gzip, deflate
Connection: keep-alive
Content-Type: multipart/form-data; boundary=---------------------------9051914041544843365972754266
Content-Length: 554
-----------------------------9051914041544843365972754266
Content-Disposition: form-data; name="file"; filename="file.mp4"
Content-Type: video/mp4
Content of file.mp4
-----------------------------9051914041544843365972754266
// Write operations are only permitted in v1.1
{
"filename": "small-master.m3u8",
"path": "videos/homepagecarouselitem/5adf2cb2f1d12e00078739e2/output"
}
Supported Content-Types are:
video/mp4
video/quicktime
Parameter and Type | Description | Required |
---|---|---|
file stream |
File to be uploaded, see above for supported content types and encodings | true |
Get status of video encoding
Get the encoding progress of a video.
GET https://api.vice.com/<API version>/homepage_carousel_items/<ID>
{
"status": "processing",
"description": ""
}
Object Properties
Property and Type | Nullable | Description |
---|---|---|
status enum(submitted, progressing, complete, canceled, error) |
true | The status of the job |
description string |
true | Information that further explains the status |
Horoscopes
Horoscopes are VICE's editorial interpretation of the current astrology. They can be monthly, weekly and daily, they can also be based on sun, lunar or ascendant signs
Horoscope Object
Fetch horoscope details by id
HTTP Request
GET https://api.vice.com/<API version>/horoscopes/<ID>
{
"id": "hexid",
"locale_id": "hexid",
"locale": "en_us",
"horoscope_type": "sun",
"type": "monthly",
"slug": "minima-laudantium-veritatis-quis-nihil-quod-sequi",
"dek": "voluptates",
"cosmic_events": "Numquam placeat atque unde sed.",
"title": "iusto",
"summary": "Placeat tempora vitae ducimus at a quia voluptatum.",
"body": "Sequi fugit magni quidem nihil illo corporis dolor eos.",
"word_count": 530,
"social_title": "hic",
"social_description": "Quam asperiores eos repellendus.",
"html_page_title": "ea",
"horoscope_date": "2018-11-18T00:00:00.000Z",
"social_lede": {
// Image Object
...
},
"topics": [
// Array of embedded topic object
...
],
"contributors": [
// Array of Contributions object
...
],
"alt_text": null,
"caption": "voluptate",
"credit": "eos",
"filename": "quod.lnk",
"filesize": 0,
"cover_json": null,
"thumbnail_url": "https://video-images.vice.com/horoscopes/59a524f4c8f4eb5ede604c85/lede/1504000655389-Artikel-Header-ED-Kopie.jpeg",
"thumbnail_url_16_9": "https://video-images.vice.com/horoscopes/59a524f4c8f4eb5ede604c85/lede/1504000655389-Artikel-Header-ED-Kopie.jpeg?crop=1xw:1xh;center,center",
"thumbnail_url_1_1": "https://video-images.vice.com/horoscopes/59a524f4c8f4eb5ede604c85/lede/1504000655389-Artikel-Header-ED-Kopie.jpeg?crop=0.5625xw:1xh;0.4215xw,0xh",
"thumbnail_url_2_3": "https://video-images.vice.com/horoscopes/59a524f4c8f4eb5ede604c85/lede/1504000655389-Artikel-Header-ED-Kopie.jpeg?crop=0.375xw:1xh;center,center",
"thumbnail_url_10_4": "https://video-images.vice.com/horoscopes/59a524f4c8f4eb5ede604c85/lede/1504000655389-Artikel-Header-ED-Kopie.jpeg?crop=1xw:0.7111111111111111xh;center,center",
"thumbnail_url_10_3": "https://video-images.vice.com/horoscopes/59a524f4c8f4eb5ede604c85/lede/1504000655389-Artikel-Header-ED-Kopie.jpeg?crop=1xw:0.5383xh;0xw,0xh",
"thumbnail_url_7_10": "https://video-images.vice.com/horoscopes/59a524f4c8f4eb5ede604c85/lede/1504000655389-Artikel-Header-ED-Kopie.jpeg?crop=0.39375xw:1xh;center,center",
"thumbnail_url_952_498": "https://video-images.vice.com/horoscopes/59a524f4c8f4eb5ede604c85/lede/1504000655389-Artikel-Header-ED-Kopie.jpeg?crop=1xw:0.9299719887955182xh;center,center"
}
{
"id": "hexid",
"locale": {
// Locale Object
...
},
"horoscope_type": "sun",
"type": "monthly",
"slug": "minima-laudantium-veritatis-quis-nihil-quod-sequi",
"dek": "voluptates",
"cosmic_events": "Numquam placeat atque unde sed.",
"title": "iusto",
"summary": "Placeat tempora vitae ducimus at a quia voluptatum.",
"body": "Sequi fugit magni quidem nihil illo corporis dolor eos.",
"word_count": 530,
"social_title": "hic",
"social_description": "Quam asperiores eos repellendus.",
"html_page_title": "ea",
"horoscope_date": "2018-11-18T00:00:00.000Z",
"published_at": 1518638177597,
"created_at": 1518638177597,
"updated_at": 1518638177597,
"status_id": 3,
"social_lede": {
// Image Object
...
},
lede: {
// Image Object
...
},
"topics": [
// Array of embedded topic object
...
],
"contributors": [
// Array of Contributions object
...
]
}
Object Properties
Property and Type | Nullable | Description | Example |
---|---|---|---|
id string |
false | ID of the horoscope | 5aa6ad57113c9e0008d9c958 |
locale_id string |
false | Locale ID the horoscope is associated with | 5aa6ad57113c9e0008d9c958 |
locale string |
false | Original url_fragment where the horoscope was created |
en_us |
dek string |
true | Summary that appears below the headline | Residents are concerned the upcoming closure will make commuting in Long Island City and its surrounding neighborhoods a living hell. |
type enum('monthly', 'weekly', 'daily') |
false | Type for the horoscope | daily |
title string |
true | Horocope's title | The L Train Shutdown Is Bad News for Queens, Too |
slug string |
false | Pretty custom url path | the-l-train-shutdown-is-bad-news-for-queens-too |
summary string |
true | Short description of horoscope | Residents are concerned the upcoming closure will make commuting in Long Island |
body string |
true | HTML Body of the horoscope | <p>Residents are concerned the upcoming closure will make commuting in Long Island</p> |
cosmic_events string |
true | Cosmic events for the current horoscope | Residents are concerned the upcoming closure will make commuting in Long Island |
word_count number |
true | Horoscope's content word count | 1137 |
social_description string |
true | Custom horoscope description presented on social media platforms | Residents are concerned the upcoming closure will make commuting in Long Island |
social_title string |
true | Custom horoscope title presented on social media platforms | The L Train Shutdown Is Bad News for Queens, Too |
horoscope_date DateTime |
false | Horoscope valid start date | 2018-11-18T00:00:00.000Z |
social_lede image object |
true | Custom image used in social platforms | See image object for details |
caption string |
true | Lede image caption | The L Train |
credit string |
true | Lede image credit | Court Square G platform. Photo by Harrison Leong |
filename string |
false | Image filename | 1520959111893-Court_Square_-_Crosstown_Platform.jpeg |
cover_json string |
true | Json representation of lede unit, for internal use only | {} |
thumbnail_url thumbnail_url_<WIDTH_RATIO>_<HEIGHT_RATIO> string |
false | Lede image url and all the possible crops by ratio (width_height) | https://video-images.vice.com/horoscopes/5aa6ad57113c9e0008d9c958/lede/1520959111893-Court_Square_-_Crosstown_Platform.jpeg?crop=1xw:0.7658740039840638xh;center,center |
contributions array of contributions object |
false | List of horoscope's contributors | See contributions object for details |
topics array of embedded topics object |
false | List of Topics for the horoscope | See embedded topics object for details |
Horoscopes List
Fetch a list of horoscopes
HTTP Request
GET https://api.vice.com/<API version>/horoscopes
This request will return an array of horoscope objects, for more details on pagination see https://api-docs.vice.com/#pagination
[
// Array of horoscope objects
...
]
Query Parameters
Parameter and Type | Description | Example |
---|---|---|
ids string |
A comma-separated list of specific horoscopes ids to retrieve. | 5ac3c33b05d2a40006b3acaa,5abcfefacda0b40006ac220b |
slug string |
Filter horoscopes by a given slug | horoscope-slug |
status_id string |
Filter horoscopes based on status_id | 3 |
published_at enum(future , this_week , last_week , last_month ) |
Filter horoscopes based on published date | future |
List of Horoscope Items for a Horoscope
HTTP Request
GET https://api.vice.com/<API version>/horoscopes/<ID | slug>/horoscope_items
This request will return an array of horoscope items, for more details on pagination see https://api-docs.vice.com/#pagination See horoscope item object for more details on the response.
[
// Array of horoscope item objects
...
]
Single Horoscope Item for a Horoscope
HTTP Request
GET https://api.vice.com/<API version>/horoscopes/<ID | slug>/horoscope_items/<HoroscopeItemID | HoroscopeZodiacSlug>
This request will return a single horoscope item belonging to the selected horoscope. See horoscope item object for more details.
{
// Horoscope Item Object
...
}
Create or Update horoscopes
Create or update a horoscpe object
HTTP Request
Create horoscope POST https://api.vice.com/<API version>/horoscopes
Update horoscope PATCH https://api.vice.com/<API version>/horoscopes/<ID>
POST /v1.1/horoscopes
orPATCH /v1.1/horoscopes/<ID>
// Write operations are only permitted in v1.1
{
"locale_id": "57a204068cb727dec794c573",
"type": "weekly",
"published_at": 1518638177597,
"status_id": 3,
"slug": "horoscope-unique-slug",
"dek": "dekdekdek",
"cosmic_events": "cosmic events for horoscope",
"title": "Daily Horoscopes: November 17, 2018",
"summary": "horoscope summary",
"body": "<p>The moon in dreamy Pisces squares off with Mercury retrograde at 2:41 AM, finding us deep in thought. We have the urge to say what's on our minds, but with both Mercury retrograde and the moon meeting Neptune, the planet of delusion, at 3:08 AM, it's better to dive within yourself than make any public statements. The time for that will come later, when the moon connects with power planet Pluto at 2:10 PM, encouraging us to take a stand!</p>",
"word_count": 120,
"social_title": "Daily Horoscopes: November 17, 2018",
"social_descrition": "The moon in Pisces lights up the home and family sector of your chart today, and you’re in a nostalgic mood, especially this morning. The vibe shifts as the moon connects with Pluto this afternoon, finding you focused on security.",
"html_page_title": "Title: Daily Horoscopes: November 17, 2018",
"horoscope_date": "1988-08-13T01:00:00.000Z",
"lede": {
// lede object
...
},
"social_lede": {
// lede object
...
}
}
Parameter and Type | Description | Required on create |
---|---|---|
locale_id string |
ID of locale the horoscope belongs to | true |
type enum('monthly', 'weekly', 'daily') |
Horoscope type | daily |
published_at number |
Date in ms when the object was published, date can be set in the future for scheduled posts | false |
status_id enum(1,2,3,4,5) |
Status code that represents published state of the horoscope | false |
slug string |
Slug for the horoscope - Unique in locale of horoscopes | true |
dek string |
Summary that appears under the headline of the horoscope | false |
cosmic_events string |
Cosmic events for the horoscope | false |
title string |
Title of the horoscope | false |
summary string |
Short description of the horoscope | false |
body string |
HTML content of the attached resource | false |
word_count number |
Horoscope's content word count | false |
social_title string |
Custom horoscope title presented on social media platforms | false |
social_description string |
Custom horoscope description presented on social media platforms | false |
html_page_title string |
Custom title of the horoscope SEO | false |
horoscope_date string |
Date the horoscope is set to start | true |
Add, Delete or Update an image for a horoscope
Adds an image to the horoscope, see image object for details on how to create or update an image resource. Only possible image types for horoscope is lede
and social_lede
HTTP Request
Add an image
POST https://api.vice.com/<API version>/campaigns/<ID>/lede
Update an image
PATCH https://api.vice.com/<API version>/campaigns/<ID>/lede
Delete an image
DELETE https://api.vice.com/<API version>/campaigns/<ID>/lede
Create or update a horoscope item for a horoscope
Create or update a horoscope item object for a horoscope
HTTP Request
Create horoscope item POST https://api.vice.com/<API version>/horoscopes/<ID>/horoscope_items
Update horoscope item PATCH https://api.vice.com/<API version>/horoscopes/<ID>/horoscope_items/<HoroscopeItemID>
POST /v1.1/horoscopes/<ID>/horoscope_items
orPATCH /v1.1/horoscopes/<ID>/horoscope_items/<HoroscopeItemID>
// Write operations are only permitted in v1.1
{
// horoscope_item object
...
}
Horoscope Items
A horoscope item contains detail information about each zodiac horoscope.
Horoscope Item Object
Fetch horoscope item details by id
HTTP Request
GET https://api.vice.com/<API version>/horoscope_items/<ID | zodiac_slug>
{
"id":"5bf4432d689fd5015ba073e0",
"horoscope":{
// Horoscope object
...
},
"zodiac":{
// Zodiac base object
...
},
"meme_url":"http://Rudolph.biz/",
"sun_sign_body":"Repudiandae nam accusamus aliquid.",
"friend_family_body":"Impedit ut perferendis harum nihil.",
"crush_body":"Dignissimos quidem eveniet asperiores est sapiente sequi delectus.",
"rising_sign_body":"Dignissimos quidem Repudiandae nam accusamus aliquid.",
"sun_sign_extended_body":"Repudiandae nam accusamus aliquid. Repudiandae nam accusamus aliquid.",
"dek":"Et ipsum totam asperiores tempora et omnis voluptatem quos.",
"social_title":"Facilis voluptatem minus ratione.",
"social_description":"Blanditiis ut quia nisi.",
"html_page_title":"enim",
"social_lede": {
// Image object
...
},
"topics": [
// Array of embedded topic object
...
],
"contributors": [
// Array of Contributions object
...
],
"alt_text":null,
"caption":"quas",
"credit":"ipsa",
"filename":"vel.css",
"filesize":0,
"cover_json":null,
"thumbnail_url": "https://video-images.vice.com/articles/5a83c40abbfb4d706b070fc0/lede/1518585282811-oneal2.jpeg",
"thumbnail_url_16_9": "https://video-images.vice.com/articles/5a83c40abbfb4d706b070fc0/lede/1518585282811-oneal2.jpeg",
"thumbnail_url_1_1": "https://video-images.vice.com/articles/5a83c40abbfb4d706b070fc0/lede/1518585282811-oneal2.jpeg",
"thumbnail_url_2_3": "https://video-images.vice.com/articles/5a83c40abbfb4d706b070fc0/lede/1518585282811-oneal2.jpeg",
"thumbnail_url_10_4": "https://video-images.vice.com/articles/5a83c40abbfb4d706b070fc0/lede/1518585282811-oneal2.jpeg",
"thumbnail_url_10_3": "https://video-images.vice.com/articles/5a83c40abbfb4d706b070fc0/lede/1518585282811-oneal2.jpeg",
"thumbnail_url_7_10": "https://video-images.vice.com/articles/5a83c40abbfb4d706b070fc0/lede/1518585282811-oneal2.jpeg",
"thumbnail_url_952_498": "https://video-images.vice.com/articles/5a83c40abbfb4d706b070fc0/lede/1518585282811-oneal2.jpeg"
}
{
"id":"5bf4432d689fd5015ba073e0",
"horoscope":{
// Horoscope object
...
},
"zodiac":{
// Zodiac base object
...
},
"meme_url":"http://Rudolph.biz/",
"horoscope_first_body":"Repudiandae nam accusamus aliquid.",
"sun_sign_body":"Repudiandae nam accusamus aliquid.",
"friend_family_body":"Impedit ut perferendis harum nihil.",
"crush_body":"Dignissimos quidem eveniet asperiores est sapiente sequi delectus.",
"rising_sign_body":"Dignissimos quidem Repudiandae nam accusamus aliquid.",
"sun_sign_extended_body":"Repudiandae nam accusamus aliquid. Repudiandae nam accusamus aliquid.",
"dek":"Et ipsum totam asperiores tempora et omnis voluptatem quos.",
"social_title":"Facilis voluptatem minus ratione.",
"social_description":"Blanditiis ut quia nisi.",
"html_page_title":"enim",
"published_at": 1518638177597,
"created_at": 1518638177597,
"updated_at": 1518638177597,
"status_id": 3,
"social_lede": {
// Image object
...
},
"lede": {
// Image object
...
},
"topics": [
// Array of embedded topic object
...
],
"contributors": [
// Array of Contributions object
...
]
}
Object Properties
Property and Type | Nullable | Description | Example |
---|---|---|---|
id string |
false | ID of the horoscope item | `5aa6ad57113c9e0008d9c958' |
horoscope_id string |
false | ID of the horoscope this item belongs to | 5abd09f752d29c14e0b468b7 |
zodiac zodiac base object |
true | Zodiac base object used for horoscope item | See zodiac base object for details |
dek string |
true | Summary that appears below the headline | Residents are concerned the upcoming closure will make commuting in Long Island City and its surrounding neighborhoods a living hell. |
meme_url string |
false | Meme image for the current horsocope item, should not be resized | https://video-images.vice.com/articles/5a83c40abbfb4d706b070fc0/lede/1518585282811-oneal2.jpeg |
sun_sign_body string |
true | HTML Body of the horoscope | <p>Residents are concerned the upcoming closure will make commuting in Long Island</p> |
friend_family_body string |
true | HTML Body of the horoscope in 3rd person (friends/family) | <p>Residents are concerned the upcoming closure will make commuting in Long Island</p> |
crush_body string |
true | HTML Body of the horoscope in 3rd person (crush) | <p>Residents are concerned the upcoming closure will make commuting in Long Island</p> |
rising_sign_body string |
true | HTML Body of the horoscope for the rising sun | <p>Residents are concerned the upcoming closure will make commuting in Long Island</p> |
sun_sign_extended_body string |
true | HTML Extended Body of the horoscope | <p>Residents are concerned the upcoming closure will make commuting in Long Island</p> |
social_description string |
true | Custom horoscope description presented on social media platforms | Residents are concerned the upcoming closure will make commuting in Long Island |
social_title string |
true | Custom horoscope title presented on social media platforms | The L Train Shutdown Is Bad News for Queens, Too |
social_lede image object |
true | Custom image used in social platforms | See image object for details |
caption string |
true | Lede image caption | The L Train |
credit string |
true | Lede image credit | Court Square G platform. Photo by Harrison Leong |
filename string |
false | Image filename | 1520959111893-Court_Square_-_Crosstown_Platform.jpeg |
cover_json string |
true | Json representation of lede unit, for internal use only | {} |
thumbnail_url thumbnail_url_<WIDTH_RATIO>_<HEIGHT_RATIO> string |
false | Lede image url and all the possible crops by ratio (width_height) | https://video-images.vice.com/horoscopes/5aa6ad57113c9e0008d9c958/lede/1520959111893-Court_Square_-_Crosstown_Platform.jpeg?crop=1xw:0.7658740039840638xh;center,center |
contributions array of contributions object |
false | List of horoscope's contributors | See contributions object for details |
topics array of embedded topics object |
false | List of Topics for the horoscope | See embedded topics object for details |
Horoscope Items List
Fetch a list of horoscope items
HTTP Request
GET https://api.vice.com/<API version>/horoscope_items
This request will return an array of horoscope item object, for more details on pagination see https://api-docs.vice.com/#pagination
[
// Array of horoscope item objects
...
]
Query Parameters
Parameter and Type | Description | Example |
---|---|---|
ids string |
A comma-separated list of specific horoscope item ids to retrieve | 5ac3c33b05d2a40006b3acaa,5abcfefacda0b40006ac220b |
zodiac string |
Filter horoscope items by a given zodiac slug | leo |
status_id number |
Filter horoscope items based on status_id | 3 |
published_at enum(future , this_week , last_week , last_month ) |
Filter horoscope items based on a published date | future |
horoscope_id string |
Filter horoscope items by a given horoscope_id | 5ac3c33b05d2a40006b3acaa |
Create or Update Horoscope Item
Create or update a horoscope item object
HTTP Request
Create horoscope item POST https://api.vice.com/<API version>/horoscope_items
Update horoscope item PATCH https://api.vice.com/<API version>/horoscope_items/<ID>
POST v1.1/horoscope_items
orPATCH v1.1/horoscope_items/<ID>
// Write operations are only permitted in v1.1
{
"id":"5bf4432d689fd5015ba073e0",
"horoscope_id": "hexid",
"zodiac": "leo"
"meme_url":"http://Rudolph.biz/",
"sun_sign_body":"Repudiandae nam accusamus aliquid.",
"friend_family_body":"Impedit ut perferendis harum nihil.",
"crush_body":"Dignissimos quidem eveniet asperiores est sapiente sequi delectus.",
"rising_sign_body":"Dignissimos quidem Repudiandae nam accusamus aliquid.",
"sun_sign_extended_body":"Repudiandae nam accusamus aliquid. Repudiandae nam accusamus aliquid.",
"dek":"Et ipsum totam asperiores tempora et omnis voluptatem quos.",
"social_title":"Facilis voluptatem minus ratione.",
"social_description":"Blanditiis ut quia nisi.",
"published_at": 1518638177597,
"status_id": 3,
"html_page_title":"enim",
"social_lede": {
// Image object
...
},
"lede": {
// Image object
...
},
"topics": [
// Array of embedded topic object
...
],
"contributors": [
// Array of Contributions object
...
]
}
Object Properties
Property and Type | Description | Required On Create |
---|---|---|
horscope_id string |
ID of horoscope this item belongs to | true |
zodiac [zodiac slug] string (https://api-docs.vice.com/#zodiac-base-object) |
Zodiac slug used for horoscope item | true |
dek string |
Summary that appears below the headline | false |
meme_url string |
Meme image for the current horsocope item, should not be resized | false |
sun_sign_body string |
The horoscope item HTML body | false |
friend_family_body string |
HTML Body of the horoscope in 3rd person (friends/family) | false |
crush_body string |
HTML Body of the horoscope in 3rd person (crush) | false |
rising_sign_body string |
HTML Body of the horoscope for the rising sun | false |
sun_sign_extended_body string |
HTML Body of the horoscope (extended version) | false |
schedule_end_date number |
The date after which this item should no longer be displayed | false |
published_at number |
The date that this item was/will be published at | false |
social_description string |
Custom horoscope item description presented on social media platforms | false |
social_title string |
Custom horoscope item title presented on social media platforms | false |
contributions contributions object |
See contributions object for details | false |
topics topic object |
See contributions object for details | false |
Add, Delete or Update an image for a horoscope item
Adds an image to the horoscope item, see image object for details on how to create or update an image resource. Only possible image types for horoscope items is lede
and social_lede
.
HTTP Request
Add an image
POST https://api-vice.com/<API version>/horoscope_items/<ID>/<IMAGE TYPE>
Update an image
PATCH https://api-vice.com/<API version>/horoscope_items/<ID>/<IMAGE TYPE>
Delete an image
DELETE https://api.vice.com/<API version>/horoscope_items/<ID>/<IMAGE TYPE>
Zodiacs
Zodiac are an editorial resource for each of the zodiac signs
Zodiac Object
Fetch zodiac details by id
HTTP Request
GET https://api.vice.com/<API version>/zodiacs/<ID | zodiac_slug>
{
"id":"5bf44a8b584d6501c95d6756",
"locale_id":"5bf44a8b584d6501c95d6740",
"locale":"en_us",
"zodiac":{
// Zodiac base object
...
},
"dek":"aut",
"title":"ratione",
"summary":"Non velit est eos quam sunt aut et.",
"body":"Laboriosam et quis voluptatem labore corrupti ut omnis voluptatem consequatur.",
"word_count":127,
"social_title":"aperiam",
"social_description":"Blanditiis dolore veritatis ut earum.",
"html_page_title":"quasi",
"social_lede": {
// Image object
...
},
"topics": [
// Array of embedded topic object
...
],
"contributors": [
// Array of Contributions object
...
],
"alt_text":null,
"caption":"sit",
"credit":"molestiae",
"filename":"quibusdam.uvx",
"filesize":0,
"cover_json":null,
"thumbnail_url":"dignissimos/eum/voluptatemquibusdam.uvx",
"thumbnail_url_16_9":"dignissimos/eum/voluptatemquibusdam.uvx?crop=0.7612416594139831xw:1xh;center,center",
"thumbnail_url_1_1":"dignissimos/eum/voluptatemquibusdam.uvx?crop=0.4281984334203655xw:1xh;center,center",
"thumbnail_url_2_3":"dignissimos/eum/voluptatemquibusdam.uvx?crop=0.2854656222802437xw:1xh;center,center",
"thumbnail_url_10_4":"dignissimos/eum/voluptatemquibusdam.uvx?crop=1xw:0.9341463414634146xh;center,center",
"thumbnail_url_10_3":"dignissimos/eum/voluptatemquibusdam.uvx?crop=1xw:0.700609756097561xh;center,center",
"thumbnail_url_7_10":"dignissimos/eum/voluptatemquibusdam.uvx?crop=0.29973890339425585xw:1xh;center,center",
"thumbnail_url_952_498":"dignissimos/eum/voluptatemquibusdam.uvx?crop=0.818564073526482xw:1xh;center,center"
}
{
"id":"5bf44a8b584d6501c95d6756",
"locale_id":"5bf44a8b584d6501c95d6740",
"zodiac":{
// Zodiac base object
...
},
"dek":"aut",
"title":"ratione",
"summary":"Non velit est eos quam sunt aut et.",
"body":"Laboriosam et quis voluptatem labore corrupti ut omnis voluptatem consequatur.",
"word_count":127,
"social_title":"aperiam",
"social_description":"Blanditiis dolore veritatis ut earum.",
"html_page_title":"quasi",
"published_at": 1518638177597,
"created_at": 1518638177597,
"updated_at": 1518638177597,
"status_id": 3,
"social_lede": {
// Image object
...
},
"lede": {
// Image object
...
},
"topics": [
// Array of embedded topic object
...
],
"contributors": [
// Array of Contributions object
...
]
}
Object Properties
Property and Type | Nullable | Description | Example |
---|---|---|---|
id string |
false | ID of the zodiac | `5aa6ad57113c9e0008d9c958' |
locale_id string |
false | Locale ID the zodiac is associated with | 5aa6ad57113c9e0008d9c958 |
locale string |
false | Original url_fragment where the zodiac was created |
en_us |
zodiac zodiac base object |
true | Zodiac base object used for zodiac item | See zodiac base object for details |
dek string |
true | Summary that appears below the headline | Residents are concerned the upcoming closure will make commuting in Long Island City and its surrounding neighborhoods a living hell. |
body string |
true | HTML Body of the zodiac | <p>Residents are concerned the upcoming closure will make commuting in Long Island</p> |
word_count number |
true | Zodiac's content word count | 1137 |
social_description string |
true | Custom zodiac description presented on social media platforms | Residents are concerned the upcoming closure will make commuting in Long Island |
social_title string |
true | Custom zodiac title presented on social media platforms | The L Train Shutdown Is Bad News for Queens, Too |
social_lede image object |
true | Custom image used in social platforms | See image object for details |
caption string |
true | Lede image caption | The L Train |
credit string |
true | Lede image credit | Court Square G platform. Photo by Harrison Leong |
filename string |
false | Image filename | 1520959111893-Court_Square_-_Crosstown_Platform.jpeg |
cover_json string |
true | Json representation of lede unit, for internal use only | {} |
thumbnail_url thumbnail_url_<WIDTH_RATIO>_<HEIGHT_RATIO> string |
false | Lede image url and all the possible crops by ratio (width_height) | https://video-images.vice.com/zodiacs/5aa6ad57113c9e0008d9c958/lede/1520959111893-Court_Square_-_Crosstown_Platform.jpeg?crop=1xw:0.7658740039840638xh;center,center |
contributions array of contributions object |
false | List of zodiac's contributors | See contributions object for details |
topics array of embedded topics object |
false | List of Topics for the zodiac | See embedded topics object for details |
Zodiac Base Object
Fetch zodiac details base object by id, without any editorial content
HTTP Request
GET https://api.vice.com/<API version>/zodiacs/<ID | zodiac_slug>
{
"sign":"Capricorn",
"slug":"capricorn",
"IAU_boundaries":{
"start":"01-19",
"end":"02-15"
},
"date_boundaries":{
"start":"01-19",
"end":"02-15"
},
"logo_black_svg_url": "https://s3.com/svg.svg",
"logo_white_svg_url": "https://s3.com/svg.svg"
}
{
"sign":"Capricorn",
"slug":"capricorn",
"IAU_boundaries":{
"start":"01-19",
"end":"02-15"
},
"date_boundaries":{
"start":"01-19",
"end":"02-15"
},
"logo_black_svg_url": "https://s3.com/svg.svg",
"logo_white_svg_url": "https://s3.com/svg.svg"
}
Object Properties
Property and Type | Nullable | Description | Example |
---|---|---|---|
sign string |
false | Zodiac sign | Capricorn |
sign string |
false | Zodiac slug sign used as an identifier | capricorn |
IAU_boundaries object |
false | contains start and end date for the current zodiac sign according to IAU | {"start":"01-19","end":"02-15"} |
date_boundaries object |
false | contains start and end date for the current zodiac sign according to VICE editorial | {"start":"01-19","end":"02-15"} |
logo_black_svg_url string |
true | Black version of zodiac's SVG logo | https://svg.com/black_logo |
logo_white_svg_url string |
true | White version of zodiac's SVG logo | https://svg.com/white_logo |
Zodiac List
Fetch a list of zodiacs
HTTP Request
GET https://api.vice.com/<API version>/zodiacs
This request will return an array of zodiac object, for more details on pagination see https://api-docs.vice.com/#pagination
[
// Array of zodiac objects
...
]
Query Parameters
Parameter and Type | Description | Example |
---|---|---|
ids string |
A comma-separated list of specific zodiac ids to retrieve | 5ac3c33b05d2a40006b3acaa,5abcfefacda0b40006ac220b |
zodiac string |
Filter zodiac by a given zodiac slug | leo |
status_id number |
Filter zodiac based on status_id | 3 |
published_at enum(future , this_week , last_week , last_month ) |
Filter zodiac items based on a published date | future |
Create or Update Zodiac
Create or update a zodiac object
HTTP Request
Create zodiac POST https://api.vice.com/<API version>/zodiacs
Update zodiac PATCH https://api.vice.com/<API version>/zodiacs/<ID>
POST v1.1/zodiacs
orPATCH v1.1/zodiacs/<ID>
// Write operations are only permitted in v1.1
{
"locale_id":"5bf44a8b584d6501c95d6740",
"zodiac": "leo",
"dek":"aut",
"title":"ratione",
"summary":"Non velit est eos quam sunt aut et.",
"body":"Laboriosam et quis voluptatem labore corrupti ut omnis voluptatem consequatur.",
"word_count":127,
"social_title":"aperiam",
"social_description":"Blanditiis dolore veritatis ut earum.",
"html_page_title":"quasi",
"published_at": 1518638177597,
"status_id": 3,
"social_lede": {
// Image object
...
},
"lede": {
// Image object
...
},
"topics": [
// Array of embedded topic object
...
],
"contributors": [
// Array of Contributions object
...
]
}
Object Properties
Property and Type | Description | Required On Create |
---|---|---|
locale_id string |
ID of the locale this item belongs to | true |
zodiac [zodiac slug] string (https://api-docs.vice.com/#zodiac-base-object) |
Zodiac slug used for zodiac | true |
body string |
The zodiac item body | false |
word_count number |
Zodiac's content word count | false |
schedule_end_date number |
The date after which this item should no longer be displayed | false |
published_at number |
The date that this item was/will be published at | false |
social_description string |
Custom zodiac description presented on social media platforms | false |
social_title string |
Custom zodiac title presented on social media platforms | false |
contributions contributions object |
See contributions object for details | false |
topics topic object |
See contributions object for details | false |
Add, Delete or Update an image for a zodiac item
Adds an image to the zodiac, see image object for details on how to create or update an image resource. Only possible image types for zodiacs is lede
and social_lede
.
HTTP Request
Add an image
POST https://api-vice.com/<API version>/zodiacs/<ID>/<IMAGE TYPE>
Update an image
PATCH https://api-vice.com/<API version>/zodiacs/<ID>/<IMAGE TYPE>
Delete an image
DELETE https://api.vice.com/<API version>/zodiacs/<ID>/<IMAGE TYPE>
Horoscopes Compatibility
Horoscopes compatibility show the comparisons of 2 zodiac signs and its possibilities from VICE's editorial interpretation
Horoscope Compatibility Object
Fetch horoscope compatibility details by id
HTTP Request
GET https://api.vice.com/<API version>/horoscopes_compatibility/<ID>
{
"id": "5c2e95daf23a190a7fc82436",
"locale_id": "5c2e95daf23a190a7fc82420",
"locale": "en_us",
"date_range_start": 1546556883848,
"date_range_end": 1546556887448,
"zodiac_sign_1": {
// Zodiac base object
...
},
"zodiac_sign_2": {
// Zodiac base object
...
},
"body": "Iste tempore quis dolorem temporibus ut minima laboriosam nostrum.",
"word_count": 501,
"share": null,
"publish_date": 1546556883848,
"alt_text": null,
"caption": "perspiciatis",
"credit": "eligendi",
"filename": "quia.nfo",
"filesize": 0,
"cover_json": null,
"thumbnail_url": "eligendi/commodi/molestiasquia.nfo",
"thumbnail_url_16_9": "eligendi/commodi/molestiasquia.nfo?crop=1xw:0.6868498049414824xh;center,center",
"thumbnail_url_1_1": "eligendi/commodi/molestiasquia.nfo?crop=0.8189563365282215xw:1xh;center,center",
"thumbnail_url_2_3": "eligendi/commodi/molestiasquia.nfo?crop=0.5459708910188144xw:1xh;center,center",
"thumbnail_url_10_4": "eligendi/commodi/molestiasquia.nfo?crop=1xw:0.48842652795838754xh;center,center",
"thumbnail_url_10_3": "eligendi/commodi/molestiasquia.nfo?crop=1xw:0.3663198959687906xh;center,center",
"thumbnail_url_7_10": "eligendi/commodi/molestiasquia.nfo?crop=0.573269435569755xw:1xh;center,center",
"thumbnail_url_952_498": "eligendi/commodi/molestiasquia.nfo?crop=1xw:0.6387510791052442xh;center,center"
}
{
"id": "hexid",
"locale_id": "hexid",
"locale": {
// Locale Object
...
},
lede: {
// Image Object
...
},
"date_range_start": 1546556883848,
"date_range_end": 1546556887448,
"zodiac_sign_1": "zodiac slug",
"zodiac_sign_2": "zodiac slug",
"body": "Iste tempore quis dolorem temporibus ut minima laboriosam nostrum.",
"word_count": 501,
"body_extended": "Quis dolorem temporibus ut minima laboriosam nostrum. Iste tempore quis dolorem temporibus ut minima laboriosam nostrum.",
"word_count_extended": 517,
"share": null,
"published_at": 1518638177597,
"created_at": 1518638177597,
"updated_at": 1518638177597,
"status_id": 3
}
Object Properties
Property and Type | Nullable | Description | Example |
---|---|---|---|
id string |
false | ID of the horoscope compatibility item | 5aa6ad57113c9e0008d9c958 |
zodiac_sign_1 zodiac base object |
true | Zodiac base object used to compare | See zodiac base object for details |
zodiac_sign_2 zodiac base object |
true | Zodiac base object used to compare | See zodiac base object for details |
locale_id string |
false | Locale ID the horoscope compatibility is associated with | 5aa6ad57113c9e0008d9c958 |
locale string |
false | Original url_fragment where the horoscope compatibility was created |
en_us |
date_range_start |
false | Timestamp where the range of time of the compatilbity is valid, starting time | 1546556883848 |
date_range_end |
false | Timestamp where the range of time of the compatilbity is valid, ending time | 1546556883848 |
publish_date number |
true | Date where object was published in ms | 1520959512483 |
word_count number |
true | Horoscope's compatibility content word count | 1137 |
body string |
true | HTML Body of the horoscope compatibility | <p>Residents are concerned the upcoming closure will make commuting in Long Island</p> |
body_extended string |
true | HTML Extended Body of the horoscope compatibility | <p>Residents are concerned the upcoming closure will make commuting in Long Island</p> |
word_count_extended number |
true | Horoscope's compatibility extended content word count | 1137 |
caption string |
true | Lede image caption | The L Train |
credit string |
true | Lede image credit | Court Square G platform. Photo by Harrison Leong |
filename string |
false | Image filename | 1520959111893-Court_Square_-_Crosstown_Platform.jpeg |
cover_json string |
true | Json representation of lede unit, for internal use only | {} |
thumbnail_url thumbnail_url_<WIDTH_RATIO>_<HEIGHT_RATIO> string |
false | Lede image url and all the possible crops by ratio (width_height) | https://video-images.vice.com/horoscopes/5aa6ad57113c9e0008d9c958/lede/1520959111893-Court_Square_-_Crosstown_Platform.jpeg?crop=1xw:0.7658740039840638xh;center,center |
Horoscopes Compatiblity List
Fetch a list of horoscopes_compatiblity
HTTP Request
GET https://api.vice.com/<API version>/horoscopes_compatiblity
This request will return an array of horoscopes_compatiblity objects, for more details on pagination see https://api-docs.vice.com/#pagination
[
// Array of horoscopes_compatiblity objects
...
]
Query Parameters
Parameter and Type | Description | Example |
---|---|---|
ids string |
A comma-separated list of specific horoscopes_compatiblity ids to retrieve. | 5ac3c33b05d2a40006b3acaa,5abcfefacda0b40006ac220b |
status_id string |
Filter horoscopes_compatiblity based on status_id | 3 |
published_at enum(future , this_week , last_week , last_month ) |
Filter horoscopes_compatiblity based on published date | future |
zodiac_sign string |
Filter horoscopes_compatiblity to the ones that include the passed in sign | taurus |
zodiac_signs string |
Filter horoscopes_compatiblity to the passed in pair of signs | taurus,leo |
Create or Update horoscopes compatibility
Create or update a horoscope compatibility object
HTTP Request
Create horoscope compatibility POST https://api.vice.com/<API version>/horoscopes_compatiblity
Update horoscope compatibility PATCH https://api.vice.com/<API version>/horoscopes_compatiblity/<ID>
POST /v1.1/horoscopes_compatiblity
orPATCH /v1.1/horoscopes_compatiblity/<ID>
// Write operations are only permitted in v1.1
{
"locale_id": "hexid",
lede: {
// Image Object
...
},
"date_range_start": 1546556883848,
"date_range_end": 1546556887448,
"zodiac_sign_1": "zodiac slug",
"zodiac_sign_2": "zodiac slug",
"body": "Iste tempore quis dolorem temporibus ut minima laboriosam nostrum.",
"word_count": 501,
"body_extended": "Quis dolorem temporibus ut minima laboriosam nostrum. Iste tempore quis dolorem temporibus ut minima laboriosam nostrum.",
"word_count_extended": 517,
"share": null,
"published_at": 1518638177597,
"created_at": 1518638177597,
"updated_at": 1518638177597,
"status_id": 3
}
Parameter and Type | Description | Required on create |
---|---|---|
locale_id string |
ID of locale the horoscope belongs to the object | true |
date_range_start number |
Timestamp where the range of time of the compatilbity is valid, starting time | true |
date_range_end number |
Timestamp where the range of time of the compatilbity is valid, ending time | true |
zodiac_sign_1 zodiac slug string |
Zodiac slug used to compare | See zodiac base object for details |
zodiac_sign_2 zodiac slug string |
Zodiac slug used to compare | See zodiac base object for details |
published_at number |
Date in ms when the object was published, date can be set in the future for scheduled posts | false |
status_id enum(1,2,3,4,5) |
Status code that represents published state of the object | false |
body string |
HTML content of the attached resource | false |
word_count number |
Object's content word count | false |
body_extended string |
HTML extended content of the attached resource | false |
word_count_extended number |
Object's extended content word count | false |
Add, Delete or Update an image for a horoscope compatibility item
Adds an image to the horoscope compatibility, see image object for details on how to create or update an image resource. Only possible image types for horoscope compatibility is lede
HTTP Request
Add an image
POST https://api.vice.com/<API version>/campaigns/<ID>/lede
Update an image
PATCH https://api.vice.com/<API version>/campaigns/<ID>/lede
Delete an image
DELETE https://api.vice.com/<API version>/campaigns/<ID>/lede
Astro
The astro endpoints provide a means of retrieving and updating profile data in the context of horoscopes. The use of these endpoints requires that your request be associated with a user.
Get profile
Get the astro profile associated with the passed in token.
HTTP Request
GET https://api.vice.com/v1/astro/me
{
"id": "5c183708e775d306c377dcf5",
"place_of_birth": {
"type": "Point",
"coordinates": [
50,
4
]
},
"date_of_birth": {
"year": 1992,
"month": 5,
"day": 5
},
"time_of_birth": {
"hours": 12,
"minutes": 30
},
"phone_number": "(217) 555-1234",
"astrology_data": {
"asc": "09’30",
"moon": "09’30",
"sun": "09’30"
},
"sun_sign_override": "leo",
"zodiac": {
"sun": "leo",
"moon": "taurus",
"asc": "scorpio"
},
// The values in the `user` field are global to
// the Vice ecosystem and are shared with other services.
// Additionally, they may be autofilled by logging in with
// a third-party provider
"user": {
"first_name": "CJ",
"last_name": "DiMaggio",
"gender": "male",
"timezone": -4
},
"created_at": "2018-12-17T23:53:44.916Z",
"updated_at": "2018-12-18T01:39:13.792Z"
}
Update profile
Update the astro profile associated with the passed in token.
HTTP Request
PATCH https://api.vice.com/v1/astro/me
with a payload of application/json
data.
// Updatable fields
{
"place_of_birth": {
"type": "Point",
"coordinates": [
50,
4
]
},
"date_of_birth": {
"year": 1992,
"month": 5,
"day": 5
},
"time_of_birth": {
"hours": 12,
"minutes": 30
},
"phone_number": "(217) 555-1234",
"sun_sign_override": "leo",
"user": {
"first_name": "CJ",
"last_name": "DiMaggio",
"gender": "male",
"timezone": -4,
"new_email": "newemail@test.com",
"new_password": "newpassword",
"password": "currentpassword"
},
}
Look Up Contacts
Get array of astro profiles associated with phone numbers that are passed in as a query parameter. Each record will contain a flag indicating whether or not they are already friends with the user associated with the passed in token.
HTTP Request
GET https://api.vice.com/v1/astro/users/lookup?phone_numbers=<phone_number_1>,<phone_number_2>
[
{
"id": "5c183708e775d306c377dcf5",
"place_of_birth": {
"type": "Point",
"coordinates": [
50,
4
]
},
"date_of_birth": {
"year": 1992,
"month": 5,
"day": 5
},
"time_of_birth": {
"hours": 12,
"minutes": 30
},
"phone_number": "(217) 555-1234",
"astrology_data": {
"asc": "09’30",
"moon": "09’30",
"sun": "09’30"
},
"sun_sign_override": "leo",
"zodiac": {
"sun": "leo",
"moon": "taurus",
"asc": "scorpio"
},
// The values in the `user` field are global to
// the Vice ecosystem and are shared with other services.
// Additionally, they may be autofilled by logging in with
// a third-party provider
"user": {
"id": "5c183708e775d306c377edg6",
"first_name": "CJ",
"last_name": "DiMaggio",
"gender": "male",
"timezone": -4
},
"created_at": "2018-12-17T23:53:44.916Z",
"updated_at": "2018-12-18T01:39:13.792Z",
"is_friend": 1
}
]
Astro Users
These endpoints provide a means of dealing with users that are not yourself. The use of these endpoints requires that your request be associated with a user with super-user permissions.
Delete user
Delete a user from the system, permanently. This also deletes the user from Iterable
HTTP Request
DELETE https://api.vice.com/v1/astro/users/:user_id
No JSON body is accepted or returned. A 204 status code will be returned upon success.
Astro User Relations
Users with an astro profile can be associated with other users as a "friend" or "crush". These relationships can be created, deleted, an retrieved by using the /relations
endpoints. The use of these endpoints requires that your request be associated with a user.
Get own user relations
Get all user relations you've created. This includes both friends and crushes. Keep in mind that relations are "one-way", so this endpoint won't return relations that other users have created for you.
HTTP Request
GET https://api.vice.com/v1/astro/me/relations
{
"id": "5c183708e775d306c377dcf5",
"user_id": "5aa6ad57113c9e0008d9c958",
"followed_user_id": "59dcea52ae54a32d39706782",
"type": "crush",
"created_at": "2018-12-17T23:53:44.916Z",
"updated_at": "2018-12-18T01:39:13.792Z"
}
Get another user's relations
Get the user relations of any user. This will only return "friend" relations, because "crush" relations are private and can only be seen with the /astro/me/relations
endpoint.
HTTP Request
GET https://api.vice.com/v1/astro/users/:id/relations
{
"id": "5fcd773c603d577e807381c5",
"user_id": "59dcea52ae54a32d39706782",
"followed_user_id": "5aa6ad57113c9e0008d9c958",
"type": "friend",
"created_at": "2018-12-17T23:53:44.916Z",
"updated_at": "2018-12-18T01:39:13.792Z"
}
Create user relation
Associate yourself with another user as a "friend" or "crush". Crushes are private to you.
HTTP Request
POST https://api.vice.com/v1/astro/me/relations
with a payload of application/json
data.
{
"followed_user_id": "5aa6ad57113c9e0008d9c958",
"type": "friend"
}
Delete user relation
Deletes a previously created user relation.
HTTP Request
DELETE https://api.vice.com/v1/astro/me/relations/:id
The id
in the URL can either be:
- the id
of the user relation
- the followed_user_id
of the user relation
Pseudo Users
Pseudo Users are similar to astro user relations, except that the followed user is fake (i.e., not a real user in the app).
The /pseudo_users
endpoints provide a means of creating, deleting, and retrieving pseudo users. The use of these endpoints requires that your request be associated with a user.
Get own pseudo users
Get all pseudo users you've created.
HTTP Request
GET https://api.vice.com/v1/astro/me/pseudo_users
{
"id": "5c183708e775d306c377dcf5",
"name": "Squall Leonhart",
"zodiac": "leo",
"type": "crush",
"created_at": "2018-12-17T23:53:44.916Z",
"updated_at": "2018-12-18T01:39:13.792Z"
}
Create pseudo users
Create a new pseudo user.
HTTP Request
POST https://api.vice.com/v1/astro/me/pseudo_users
with a payload of application/json
data.
{
"name": "Squall Leonhart",
"zodiac": "leo",
"type": "crush",
}
Delete pseudo users
Delete a previously created pseudo user.
HTTP Request
DELETE https://api.vice.com/v1/astro/me/pseudo_users/:id
The id
in the URL must be the id
of the pseudo user that you want to delete.
Collections
Collections provide a way of creating playlists of videos.
Collection Object
Fetch a collection by id
HTTP Request
GET https://api.vice.com/<API version>/collections/<ID>
{
"id": "58f0e3cbdab96771063f9864",
"publish_date": 1523920228861,
"slug": "vice-weed-week",
"summary": null,
"dek": "Now with more weed. Starts 4/16. Ends 4/20.",
"schedule_end_date": null,
"original_id": 406,
"title": "Weed Week",
"urls": [
"https://www.vice.com/en_us/collection/vice-weed-week",
"https://video.vice.com/en_us/collection/vice-weed-week",
"https://viceland.vice.com/en_us/collection/vice-weed-week",
"https://news.vice.com/en_us/collection/vice-weed-week",
"https://noisey.vice.com/en_us/collection/vice-weed-week",
"https://thump.vice.com/en_us/collection/vice-weed-week",
"https://i-d.vice.com/en_us/collection/vice-weed-week",
"https://sports.vice.com/en_us/collection/vice-weed-week",
"https://motherboard.vice.com/en_us/collection/vice-weed-week",
"https://broadly.vice.com/en_us/collection/vice-weed-week",
"https://munchies.vice.com/en_us/collection/vice-weed-week",
"https://creators.vice.com/en_us/collection/vice-weed-week",
"https://waypoint.vice.com/en_us/collection/vice-weed-week",
"https://tonic.vice.com/en_us/collection/vice-weed-week",
"https://impact.vice.com/en_us/collection/vice-weed-week",
"https://garage.vice.com/en_us/collection/vice-weed-week",
"https://free.vice.com/en_us/collection/vice-weed-week"
],
"collection_items_count": 2,
"collection_items": [
{
"collection_id": "58f0e3cbdab96771063f9864",
"video_id": "5acd0acef1cdb361de3b33b1",
"position": 0,
"video": {
// Video Object
...
}
},
{
"collection_id": "58f0e3cbdab96771063f9864",
"video_id": "5acd0ab6f1cdb361e8195c52",
"position": 1,
"video": {
// Video Object
...
}
}
],
"url": "https://www.vice.com/en_us/collection/vice-weed-week",
"caption": null,
"credit": null,
"filename": "1523920209972-SHORTIES_VICE_BLUNTED_SMOKEABLES_CHIPCAN_VV_CLEAN_V1_04131800_03_00_16Still010.jpeg",
"filesize": 0,
"cover_json": null,
"thumbnail_url": "https://video-images.vice.com/collections/58f0e3cbdab96771063f9864/lede/1523920209972-SHORTIES_VICE_BLUNTED_SMOKEABLES_CHIPCAN_VV_CLEAN_V1_04131800_03_00_16Still010.jpeg",
"thumbnail_url_16_9": "https://video-images.vice.com/collections/58f0e3cbdab96771063f9864/lede/1523920209972-SHORTIES_VICE_BLUNTED_SMOKEABLES_CHIPCAN_VV_CLEAN_V1_04131800_03_00_16Still010.jpeg?crop=1xw:1xh;center,center",
"thumbnail_url_1_1": "https://video-images.vice.com/collections/58f0e3cbdab96771063f9864/lede/1523920209972-SHORTIES_VICE_BLUNTED_SMOKEABLES_CHIPCAN_VV_CLEAN_V1_04131800_03_00_16Still010.jpeg?crop=0.5625xw:1xh;center,center",
"thumbnail_url_2_3": "https://video-images.vice.com/collections/58f0e3cbdab96771063f9864/lede/1523920209972-SHORTIES_VICE_BLUNTED_SMOKEABLES_CHIPCAN_VV_CLEAN_V1_04131800_03_00_16Still010.jpeg?crop=0.375xw:1xh;center,center",
"thumbnail_url_10_4": "https://video-images.vice.com/collections/58f0e3cbdab96771063f9864/lede/1523920209972-SHORTIES_VICE_BLUNTED_SMOKEABLES_CHIPCAN_VV_CLEAN_V1_04131800_03_00_16Still010.jpeg?crop=1xw:0.7111111111111111xh;center,center",
"thumbnail_url_10_3": "https://video-images.vice.com/collections/58f0e3cbdab96771063f9864/lede/1523920209972-SHORTIES_VICE_BLUNTED_SMOKEABLES_CHIPCAN_VV_CLEAN_V1_04131800_03_00_16Still010.jpeg?crop=1xw:0.5333333333333333xh;center,center",
"thumbnail_url_7_10": "https://video-images.vice.com/collections/58f0e3cbdab96771063f9864/lede/1523920209972-SHORTIES_VICE_BLUNTED_SMOKEABLES_CHIPCAN_VV_CLEAN_V1_04131800_03_00_16Still010.jpeg?crop=0.39375xw:1xh;center,center",
"thumbnail_url_952_498": "https://video-images.vice.com/collections/58f0e3cbdab96771063f9864/lede/1523920209972-SHORTIES_VICE_BLUNTED_SMOKEABLES_CHIPCAN_VV_CLEAN_V1_04131800_03_00_16Still010.jpeg?crop=1xw:0.9299719887955181xh;center,center",
"topics": [
],
"system_tags": [
],
"genres": [
],
"primary_topic": null
}
{
"id": "58f0e3cbdab96771063f9864",
"legacy_id": 406,
"created_at": 1492181963304,
"updated_at": 1492181965161,
"content_policy": {
// Content Policy Object
...
},
"base": {
// Base Object
...
},
"meta": {
// Meta Object
...
},
"slugs": [
// Array of Slug Objects
...
],
"slug": {
// Slug Object
...
},
"lede": {
// Image Object
...
},
"collection_items": [
{
"collection_id": "58f0e3cbdab96771063f9864",
"video_id": "5acd0acef1cdb361de3b33b1",
"position": 0,
"locale_scope": 1,
"created_at": null,
"updated_at": 1524176036033,
"article_id": null,
"video": {
// Video Object
...
}
},
{
"collection_id": "58f0e3cbdab96771063f9864",
"video_id": "5acd0ab6f1cdb361e8195c52",
"position": 1,
"locale_scope": 1,
"created_at": null,
"updated_at": 1524176036036,
"article_id": null,
"video": {
// Video Object
...
}
}
],
"topics": [
// Array of Topic Objects
...
]
}
Object Properties
Property and type | Nullable | Description | Example |
---|---|---|---|
id string |
false | ID of the object | 58f4cd7473e7c17a75526deb |
publish_date number |
true | An alias for content_policy.published_at | 1523920228861 |
slug string (v1) |
true | An alias for slug.slug | vice-weed-week |
slug Slug Object (v1.1) |
true | A Slug Object | Slug Object |
summary string |
true | An alias for meta.summary | Inside the Crisis Actor Conspiracy Movement |
dek string |
true | An alias for meta.dek | Now with more weed. Starts 4/16. Ends 4/20. |
schedule_end_date number |
true | An alias for content_policy.schedule_end_date | 1523920228861 |
legacy_id number |
true | Legacy ID reference | 123 |
original_id number |
true | An alias for legacy_id | 123 |
title number |
true | An alias for base.display_title or base.title | Weed Week |
urls array(string) |
true | An array of urls the collection is available at | [] |
collection_items array(object) |
true | An array of mappings of collection to video | { collection_id: 123, video_id: 123 } |
collection_items_count number |
true | Number of items in collection_items |
2 |
content_policy Content Policy Object |
true | A Content Policy Object | Content Policy Object |
base Base Object |
true | A Base Object | Base Object |
meta Meta Object |
true | A Meta Object | Meta Object |
lede Image Object |
true | A Image Object | Image Object |
Collection list
Fetch a list of collections
HTTP Request
GET https://api.vice.com/<API version>/collections
This request will return an array of collections, for more details on pagination see https://api-docs.vice.com/#pagination
[
// Array of collection objects
...
]
Query Parameters
Parameter and Type | Description | Example |
---|---|---|
legacy_id string |
Filter by the legacy id of an item | 123 |
id string |
Find by the id of an item | 57a204088cb727dec794c67f |
slug number |
Filter by the slug of an item | vice-weed-week |
Sorting Query Parameters Values
Parameter Value | Description |
---|---|
id |
Sort by the id |
published_at |
Sort by content_policy.published_at |
created_at |
Sort by content_policy.created_at |
updated_at |
Sort by content_policy.updated_at |
deleted_at |
Sort by content_policy.deleted_at |
schedule_end_date |
Sort by content_policy.schedule_end_date |
Create or update a Collection
Create or update a collection
HTTP Request
Create article POST https://api.vice.com/v1.1/collections
Update article PATCH https://api.vice.com/v1.1/collections/<ID>
POST /v1.1/collections
orPATCH /v1.1/collections/<ID>
// Write operations are only permitted in v1.1
{
"base": {
"title": "Weed Week",
"display_title": "Weed Week"
},
"meta": {
"dek": "Now with more weed. Starts 4/16. Ends 4/20."
},
"collection_items": [
{
"collection_id": "58f0e3cbdab96771063f9864",
"video_id": "5acd0ab6f1cdb361e8195c52",
"position": 0,
"locale_scope": 1,
"created_at": null,
"updated_at": 1524598975096,
"article_id": null
},
{
"collection_id": "58f0e3cbdab96771063f9864",
"video_id": "5acd0acef1cdb361de3b33b1",
"position": 1,
"locale_scope": 1,
"created_at": null,
"updated_at": 1524598975081,
"article_id": null
}
]
}
Parameter and Type | Description | Required on create |
---|---|---|
collection_items array(object) |
An array videos in this playlist. Must have the fields, at least, of { "video_id": ""5a382683177dd40315151ad5"", "position": 0 } |
false |
Delete Collection
Removes collection from visibility
HTTP Request
DELETE https://api.vice.com/v1.1/collections/<ID>
Add, Delete or Update a lede for a Collection
Adds an associated lede to the collection, see image object for details on how to create or update an image resource.
HTTP Request
Add an image
POST https://api.vice.com/v1.1/collections/<ID>/lede
Update an image
PATCH https://api.vice.com/v1.1/collections/<ID>/lede/<LEDE ID>
Delete an image
DELETE https://api.vice.com/v1.1/collections/<ID>/lede/<LEDE ID>
Sets
Sets provide a way of creating content series. Sets can contain articles, videos, or linkouts, and they support various properties for curation such as a title, text color, content ordering, and more.
Set list
Fetch a list of sets.
HTTP Request
GET https://api.vice.com/<API version>/sets
This request will return an array of sets, for more details on pagination see https://api-docs.vice.com/#pagination
[
// Array of set objects
...
]
Query Parameters
Parameter and Type | Description | Example |
---|---|---|
web_id string |
Filter by the web_id of an item | 123 |
site_id string |
Find by the site_id of an item | 57a204088cb727dec794c67f |
Set Object
Fetch a Set by id
HTTP Request
GET https://api.vice.com/<API version>/sets/<ID>
{
"id": "5bc78b4ae46858000600a89f",
"site_id": "57a204058cb727dec794c567",
"locale_id": "57a204068cb727dec794c573",
"title": "VICE Guide to Life",
"background_color": null,
"text_color": "dark",
"dek": "Our imperfect advice on becoming an adult",
"display_type": "standard",
"themed_background_position": "top",
"lede_type": "none",
"hide_title": false,
"call_to_action_text": "Welcome to the VICE Guide to Life, our imperfect advice on becoming an adult.",
"web_id": "vrnw6x",
"slug": "vice-guide-to-life",
"site": {
// Site object
...
},
"featured_set_image": {
// Image object
...
},
"url": "https://www.vice.com/en_us/series/vrnw6x/vice-guide-to-life",
"alt_text": "vgtl-169",
"caption": null,
"credit": null,
"filename": "1559749353116-vgtl-169.png",
"filesize": 0,
"cover_json": null,
"thumbnail_url": "https://video-images.vice.com/sets/5bc78b4ae46858000600a89f/lede/1559749353116-vgtl-169.png",
"thumbnail_url_16_9": "https://video-images.vice.com/sets/5bc78b4ae46858000600a89f/lede/1559749353116-vgtl-169.png?crop=0.9958791556061181xw:1xh;center,center",
"thumbnail_url_1_1": "https://video-images.vice.com/sets/5bc78b4ae46858000600a89f/lede/1559749353116-vgtl-169.png?crop=0.5602xw:1xh;0.2148xw,0xh",
"thumbnail_url_2_3": "https://video-images.vice.com/sets/5bc78b4ae46858000600a89f/lede/1559749353116-vgtl-169.png?crop=0.37345468335229426xw:1xh;center,center",
"thumbnail_url_10_4": "https://video-images.vice.com/sets/5bc78b4ae46858000600a89f/lede/1559749353116-vgtl-169.png?crop=1xw:0.7141xh;0xw,0.1535xh",
"thumbnail_url_10_3": "https://video-images.vice.com/sets/5bc78b4ae46858000600a89f/lede/1559749353116-vgtl-169.png?crop=1xw:0.5355402112103981xh;center,center",
"thumbnail_url_7_10": "https://video-images.vice.com/sets/5bc78b4ae46858000600a89f/lede/1559749353116-vgtl-169.png?crop=0.392127417519909xw:1xh;center,center",
"thumbnail_url_952_498": "https://video-images.vice.com/sets/5bc78b4ae46858000600a89f/lede/1559749353116-vgtl-169.png?crop=1xw:0.9338201161861982xh;center,center"
}
{
"id": "5bc78b4ae46858000600a89f",
"site_id": "57a204058cb727dec794c567",
"locale_id": "57a204068cb727dec794c573",
"status_id": 3,
"published_at": 1539805152155,
"updated_at": 1559749457430,
"created_at": 1539803978456,
"title": "VICE Guide to Life",
"background_color": null,
"text_color": "dark",
"dek": "Our imperfect advice on becoming an adult",
"display_type": "standard",
"themed_background_position": "top",
"lede_type": "none",
"hide_title": false,
"call_to_action_text": "Welcome to the VICE Guide to Life, our imperfect advice on becoming an adult.",
"legacy_id": 1,
"slug": "vice-guide-to-life",
"lede": {
// Image object
...
},
"featured_set_image": {
// Image object
...
},
"locale": {
// Locale object
...
},
"site": {
// Site object
...
},
"web_id": "vrnw6x",
"urls": Array[1][
"https://www.vice.com/en_us/series/vrnw6x/vice-guide-to-life"
],
"url": "https://www.vice.com/en_us/series/vrnw6x/vice-guide-to-life"
}
Create or update a Set
Create or update a Set.
HTTP Request
Create Set POST https://api.vice.com/v1.1/sets
Update Set PATCH https://api.vice.com/v1.1/sets/<ID>
POST /v1.1/sets
orPATCH /v1.1/sets/<ID>
// Write operations are only permitted in v1.1
{
"lede_type": "none",
"lede_id": "5a382683177dd40315151ad5",
"featured_set_image_id": "5a382683177dd40315151ad6",
"themed_background_position": "top",
"display_type": "standard",
"background_color": null,
"text_color": "dark",
"hide_title": false,
"status_id": 3,
"published_at": 1565712167405,
"title": "VICE Guide to Life",
"dek": "Our imperfect advice on becoming an adult",
"call_to_action_text": "Welcome to the VICE Guide to Life",
"slug": "vice-guide-to-life",
"set_items": [
{
"article_id": "5bdc77f6595ea8000613421f",
"position": 0,
"layout": "standard"
}
]
}
Parameter and Type | Description | Required on create |
---|---|---|
set_items array(object) |
An array of articles/videos/linkouts in this set. Must have the fields, at least, of { "layout": "standard", "position": 0 } , plus article_id , video_id , or linkout_id |
false |
Delete Set
Removes the Set from visibility.
HTTP Request
DELETE https://api.vice.com/v1.1/sets/<ID>
Add, Delete or Update a lede for a Set
Adds an associated lede to the Set, see image object for details on how to create or update an image resource.
HTTP Request
Add an image
POST https://api.vice.com/v1.1/sets/<ID>/lede
Update an image
PATCH https://api.vice.com/v1.1/sets/<ID>/lede/<LEDE ID>
Delete an image
DELETE https://api.vice.com/v1.1/sets/<ID>/lede/<LEDE ID>
Change Set items
Change the items within a Set.
PUT https://api.vice.com/v1.1/sets/<ID>/items
PUT /v1.1/sets/<ID>/items
// Write operations are only permitted in v1.1
// Array of Set items
[
{
"article_id": "5bdc77f6595ea8000613421f",
"position": 0,
"layout": "standard"
},
{
"video_id": "123204088cb727dec794c890",
"position": 1,
"layout": "standard"
}
]
Order Set items
Reorder the items within a Set, in a single request.
PUT https://api.vice.com/v1.1/sets/<ID>/items/order
PUT /v1.1/sets/<ID>/items/order
// Write operations are only permitted in v1.1
// Array of Set items
[
{
"id": "57a204088cb727dec794c123",
"position": 0
},
{
"id": "123204088cb727dec794c890",
"position": 1
}
]
Feeds
Feeds is responsible for serving non-HTML formatted data collections, such as XML sitemap docs for SEO.
Sitemap Homes
Fetch a list of sitemaps for each locale in a site
<?xml version="1.0" encoding="utf-8" ?>
<sitemapindex
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/siteindex.xsd"
xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<sitemap>
<loc>https://www.vice.com/en_us/sitemap</loc>
<lastmod>2017-01-11T11:45:00.123Z</lastmod>
</sitemap>
<sitemap>
<loc>https://www.vice.com/fr_ca/sitemap</loc>
<lastmod>2017-01-11T11:45:00.123Z</lastmod>
</sitemap>
<sitemap>
<loc>https://www.vice.com/en_ca/sitemap</loc>
<lastmod>2017-01-11T11:45:00.123Z</lastmod>
</sitemap>
<sitemap>
<loc>https://www.vice.com/de/sitemap</loc>
<lastmod>2017-01-11T11:45:00.123Z</lastmod>
</sitemap>
<sitemap>
<loc>https://www.vice.com/sv/sitemap</loc>
<lastmod>2017-01-11T11:45:00.123Z</lastmod>
</sitemap>
<sitemap>
<loc>https://www.vice.com/en_au/sitemap</loc>
<lastmod>2017-01-11T11:45:00.123Z</lastmod>
</sitemap>
<sitemap>
<loc>https://www.vice.com/en_uk/sitemap</loc>
<lastmod>2017-01-11T11:45:00.123Z</lastmod>
</sitemap>
<sitemap>
<loc>https://www.vice.com/es/sitemap</loc>
<lastmod>2017-01-11T11:45:00.123Z</lastmod>
</sitemap>
<sitemap>
<loc>https://www.vice.com/es_cl/sitemap</loc>
<lastmod>2017-01-11T11:45:00.123Z</lastmod>
</sitemap>
<sitemap>
<loc>https://www.vice.com/es_ar/sitemap</loc>
<lastmod>2017-01-11T11:45:00.123Z</lastmod>
</sitemap>
</sitemapindex>
HTTP Request
GET https://api.vice.com/v1/feeds/sitemap/homes
Required Query Parameters
Parameter and Type | Description | Example |
---|---|---|
site string |
site name | vice-videos |
Sitemap
Fetch a list of sitemaps for resources in a site
<?xml version="1.0" encoding="utf-8" ?>
<sitemapindex
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/siteindex.xsd"
xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<sitemap>
<lastmod>2018-05-01T20:01:02.366Z</lastmod>
<loc>https://www.vice.com/en_us/sitemap/articles?page=1</loc>
</sitemap>
<sitemap>
<lastmod>2018-05-01T20:01:02.366Z</lastmod>
<loc>https://www.vice.com/en_us/sitemap/articles?page=2</loc>
</sitemap>
<sitemap>
<lastmod>2018-05-01T20:01:02.366Z</lastmod>
<loc>https://www.vice.com/en_us/sitemap/articles?page=3</loc>
</sitemap>
<sitemap>
<lastmod>2018-05-01T20:01:02.366Z</lastmod>
<loc>https://www.vice.com/en_us/sitemap/articles?page=4</loc>
</sitemap>
<sitemap>
<lastmod>2018-05-01T20:01:02.366Z</lastmod>
<loc>https://www.vice.com/en_us/sitemap/articles?page=5</loc>
</sitemap>
<sitemap>
<lastmod>2018-05-01T20:01:02.366Z</lastmod>
<loc>https://www.vice.com/en_us/sitemap/articles?page=6</loc>
</sitemap>
<sitemap>
<lastmod>2018-05-01T20:01:02.366Z</lastmod>
<loc>https://www.vice.com/en_us/sitemap/articles?page=7</loc>
</sitemap>
<sitemap>
<lastmod>2018-05-01T20:01:02.366Z</lastmod>
<loc>https://www.vice.com/en_us/sitemap/articles?page=8</loc>
</sitemap>
<sitemap>
<lastmod>2018-05-01T20:01:02.366Z</lastmod>
<loc>https://www.vice.com/en_us/sitemap/articles?page=9</loc>
</sitemap>
<sitemap>
<lastmod>2018-05-01T20:01:02.366Z</lastmod>
<loc>https://www.vice.com/en_us/sitemap/articles?page=10</loc>
</sitemap>
<sitemap>
<lastmod>2018-05-01T20:01:02.366Z</lastmod>
<loc>https://www.vice.com/en_us/sitemap/topics?page=1</loc>
</sitemap>
</sitemapindex>
HTTP Request
GET https://api.vice.com/v1/feeds/sitemap
Required Query Parameters
Parameter and Type | Description | Example |
---|---|---|
site string |
site name | vice-videos |
locale string |
locale to filter by | en_ca |
Sitemap Resource
Fetcheas a sitemap of resources in a site for a locale
<?xml version="1.0" encoding="utf-8" ?>
<urlset
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
xmlns:xhtml="http://www.w3.org/1999/xhtml" xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd">
<url>
<loc>https://www.vice.com/en_us/article/xw5bad/theres-more-to-seren-sensei-than-skewering-bruno-mars-for-cultural-appropriation</loc>
<lastmod>2018-03-15T18:45:34.323Z</lastmod>
<changefreq>always</changefreq>
<priority>0.5</priority>
</url>
<url>
<loc>https://www.vice.com/en_us/article/ywxmgx/i-thought-depression-was-a-white-people-disease-a-conversation-with-depressed-while-black</loc>
<lastmod>2018-03-15T19:22:35.798Z</lastmod>
<changefreq>always</changefreq>
<priority>0.5</priority>
</url>
<url>
<loc>https://www.vice.com/en_us/article/437k4g/i-watched-scientology-tv-for-24-confusing-hours-straight</loc>
<lastmod>2018-03-15T20:13:04.635Z</lastmod>
<changefreq>always</changefreq>
<priority>0.5</priority>
</url>
<url>
<loc>https://www.vice.com/en_us/article/neq8yd/how-activists-turned-empty-london-property-into-a-thriving-homeless-shelter</loc>
<lastmod>2018-03-15T20:31:38.097Z</lastmod>
<changefreq>always</changefreq>
<priority>0.5</priority>
</url>
<url>
<loc>https://www.vice.com/en_us/article/paxedv/awful-video-shows-maga-moms-teaching-toddlers-to-hate-muslims-at-a-mosque-vgtrn</loc>
<lastmod>2018-03-15T20:50:56.925Z</lastmod>
<changefreq>always</changefreq>
<priority>0.5</priority>
</url>
<url>
<loc>https://www.vice.com/en_us/article/ywxm3g/all-the-insane-conspiracy-theories-you-hear-in-prison</loc>
<lastmod>2018-03-16T09:22:36.793Z</lastmod>
<changefreq>always</changefreq>
<priority>0.5</priority>
</url>
<url>
<loc>https://www.vice.com/en_us/article/paxeq8/desus-and-mero-break-down-that-wild-dj-envy-interview</loc>
<lastmod>2018-03-16T13:38:34.999Z</lastmod>
<changefreq>always</changefreq>
<priority>0.5</priority>
</url>
<url>
<loc>https://www.vice.com/en_us/article/mbxq98/the-vice-morning-bulletin-03-16-18</loc>
<lastmod>2018-03-16T15:49:39.811Z</lastmod>
<changefreq>always</changefreq>
<priority>0.5</priority>
</url>
<url>
<loc>https://www.vice.com/en_us/article/xw7q5a/yeah-buddy-the-new-jersey-shore-reunion-trailer-is-here-vgtrn</loc>
<lastmod>2018-03-16T16:08:35.233Z</lastmod>
<changefreq>always</changefreq>
<priority>0.5</priority>
</url>
<url>
<loc>https://www.vice.com/en_us/article/qvxdn3/rupauls-drag-race-all-stars-recap-justice-for-shangela</loc>
<lastmod>2018-03-16T16:45:36.821Z</lastmod>
<changefreq>always</changefreq>
<priority>0.5</priority>
</url>
</urlset>
HTTP Request
GET https://api.vice.com/v1/feeds/sitemap/<resource>
URL Parameters
Parameter | Description | Example |
---|---|---|
resource enum('articles', 'videos', 'topics') |
resource to get urls for | articles |
Query Parameters
Parameter and Type | Description | Example | Required |
---|---|---|---|
site string |
site name | vice |
true |
locale string |
locale to filter by | en_us |
true |
page integer |
page of results | 1 |
false |
Sitemap History
Fetcheas a list of sitemaps for a site in a locale grouped by month and year
[
{
"year": 2018,
"month": 5,
"count": 17,
"oldest": 1525134238128,
"newest": 1525206716520,
"urls": [
"/v1/feeds/sitemap/articles?start=1525134238128&end=1525206716520&site=1&locale=1&page=1"
]
},
{
"year": 2018,
"month": 4,
"count": 451,
"oldest": 1522642758866,
"newest": 1525131380502,
"urls": [
"/v1/feeds/sitemap/articles?start=1522642758866&end=1525131380502&site=1&locale=1&page=1"
]
},
{
"year": 2018,
"month": 3,
"count": 422,
"oldest": 1519862738233,
"newest": 1522502214141,
"urls": [
"/v1/feeds/sitemap/articles?start=1519862738233&end=1522502214141&site=1&locale=1&page=1"
]
},
{
"year": 2018,
"month": 2,
"count": 379,
"oldest": 1517464994310,
"newest": 1519858800000,
"urls": [
"/v1/feeds/sitemap/articles?start=1517464994310&end=1519858800000&site=1&locale=1&page=1"
]
},
{
"year": 2018,
"month": 1,
"count": 433,
"oldest": 1514906400000,
"newest": 1517440500000,
"urls": [
"/v1/feeds/sitemap/articles?start=1514906400000&end=1517440500000&site=1&locale=1&page=1"
]
}
]
HTTP Request
GET https://api.vice.com/v1/feeds/sitemap/history/<resource>
URL Parameters
Parameter | Description | Example |
---|---|---|
resource enum('articles', 'videos') |
resource to get history for | articles |
Query Parameters
Parameter and Type | Description | Example | Required |
---|---|---|---|
site number |
site bitwise | 1 |
true |
locale number |
locale bitwise | 1 |
true |
News Sitemap
Fetcheas a sitemap of resources in a site for a locale formatted specifically for Google News
<?xml version="1.0" encoding="utf-8" ?>
<urlset
xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
xmlns:news="http://www.google.com/schemas/sitemap-news/0.9">
<url>
<loc>https://munchies.vice.com/en_us/article/a3yb9p/in-defense-of-sneaking-food-into-movie-theaters</loc>
<news:news>
<news:publication>
<news:name>munchies</news:name>
<news:language>en</news:language>
</news:publication>
<news:genres>Blog</news:genres>
<news:publication_date>2018-05-01</news:publication_date>
<news:title>In Defense of Sneaking Food into Movie Theaters</news:title>
<news:keywords>Op-Ed,movie theater</news:keywords>
</news:news>
</url>
<url>
<loc>https://munchies.vice.com/en_us/article/59jxek/best-summer-grilling-recipes</loc>
<news:news>
<news:publication>
<news:name>munchies</news:name>
<news:language>en</news:language>
</news:publication>
<news:genres>Blog</news:genres>
<news:publication_date>2018-05-01</news:publication_date>
<news:title>32 Grilling Recipes to Release Your Inner Grill Dad This Summer</news:title>
<news:keywords>Make this,Recipe,grilling,how to grill a steak,summer grilling recipes,how to light a grill</news:keywords>
</news:news>
</url>
<url>
<loc>https://munchies.vice.com/en_us/article/9kgpjy/penis-shaped-pasta-served-to-children-by-mistake</loc>
<news:news>
<news:publication>
<news:name>munchies</news:name>
<news:language>en</news:language>
</news:publication>
<news:genres>Blog</news:genres>
<news:publication_date>2018-05-01</news:publication_date>
<news:title>Mother Accidentally Serves Children Literal Bowl of (Pasta) Dicks</news:title>
<news:keywords>WTF,Pasta,LOL</news:keywords>
</news:news>
</url>
<url>
<loc>https://munchies.vice.com/en_us/article/a3yb8p/300-million-cockroaches-eat-restaurant-waste-on-this-chinese-farm</loc>
<news:news>
<news:publication>
<news:name>munchies</news:name>
<news:language>en</news:language>
</news:publication>
<news:genres>Blog</news:genres>
<news:publication_date>2018-05-01</news:publication_date>
<news:title>300 Million Cockroaches Eat Restaurant Waste on This Chinese Farm</news:title>
<news:keywords>bugs,china,cockroaches,food waste,restaurant waste</news:keywords>
</news:news>
</url>
<url>
<loc>https://munchies.vice.com/en_us/article/59jxqk/why-you-eat-your-feelings-according-to-science</loc>
<news:news>
<news:publication>
<news:name>munchies</news:name>
<news:language>en</news:language>
</news:publication>
<news:genres>Blog</news:genres>
<news:publication_date>2018-05-01</news:publication_date>
<news:title>Why You Eat Your Feelings, According To Science</news:title>
<news:keywords>The Ice Cream Show,Ice Cream,dopamine,seratonin,nutritionist,dana james,nutritional therapy</news:keywords>
</news:news>
</url>
<url>
<loc>https://munchies.vice.com/en_us/article/gymep4/jerk-chicken-recipe</loc>
<news:news>
<news:publication>
<news:name>munchies</news:name>
<news:language>en</news:language>
</news:publication>
<news:genres>Blog</news:genres>
<news:publication_date>2018-05-01</news:publication_date>
<news:title>Jerk Chicken</news:title>
<news:keywords>Recipe,Chicken,dinner,Matty Matheson,easy,jerk chicken,poultry,suppertime,it's suppertime</news:keywords>
</news:news>
</url>
<url>
<loc>https://munchies.vice.com/en_us/article/3kjg5k/no-dunkaroos-arent-coming-back-despite-what-twitter-says</loc>
<news:news>
<news:publication>
<news:name>munchies</news:name>
<news:language>en</news:language>
</news:publication>
<news:genres>Blog</news:genres>
<news:publication_date>2018-04-30</news:publication_date>
<news:title>No, Dunkaroos Aren't Coming Back, Despite What Twitter Says</news:title>
<news:keywords>Dunkaroos,cookies,hoax,fake news,twitter hoax</news:keywords>
</news:news>
</url>
<url>
<loc>https://munchies.vice.com/en_us/article/zmgayw/vegan-man-doxxes-vegan-woman-for-giving-dairy-ice-cream-to-crying-child</loc>
<news:news>
<news:publication>
<news:name>munchies</news:name>
<news:language>en</news:language>
</news:publication>
<news:genres>Blog</news:genres>
<news:publication_date>2018-04-30</news:publication_date>
<news:title>Vegan Man Doxxes Vegan Woman for Giving Dairy Ice Cream to Crying Child</news:title>
<news:keywords>Vegan,Twitter,the internet,Rude,veganism</news:keywords>
</news:news>
</url>
<url>
<loc>https://munchies.vice.com/en_us/article/a3ybk8/starbucks-plans-to-make-fewer-limited-edition-monstrosities-like-the-unicorn-frappucino</loc>
<news:news>
<news:publication>
<news:name>munchies</news:name>
<news:language>en</news:language>
</news:publication>
<news:genres>Blog</news:genres>
<news:publication_date>2018-04-30</news:publication_date>
<news:title>Starbucks Plans to Make Fewer 'Limited-Edition' Monstrosities Like the Unicorn Frappucino</news:title>
<news:keywords>Starbucks,frappuccinos,frappuccino,unicorn frappuccino</news:keywords>
</news:news>
</url>
<url>
<loc>https://munchies.vice.com/en_us/article/gymav4/baristas-living-wage</loc>
<news:news>
<news:publication>
<news:name>munchies</news:name>
<news:language>en</news:language>
</news:publication>
<news:genres>Blog</news:genres>
<news:publication_date>2018-04-30</news:publication_date>
<news:title>Most Baristas Still Don't Make a Living Wage</news:title>
<news:keywords>labor,coffee,wages,Starbucks,Fair Trade</news:keywords>
</news:news>
</url>
</urlset>
HTTP Request
GET https://api.vice.com/v1/feeds/news_sitemap
Query Parameters
Parameter and Type | Description | Example | Required |
---|---|---|---|
site string |
site name | munchies |
true |
locale string |
locale to filter by | en_us |
true |
topic_slug slug slug object |
See slug object for details | cupcake |
false |
Sitemap RSS
Fetcheas an rss feed of the latest videos or articles
<?xml version="1.0" encoding="utf-8" ?>
<rss version="2.0"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:wfw="http://wellformedweb.org/CommentAPI/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:snf="http://www.smartnews.be/snf"
xmlns:media="http://search.yahoo.com/mrss/">
<channel>
<title>VICE</title>
<link>https://www.vice.com/en_us</link>
<atom:link href="https://www.vice.com/en_us/rss" rel="self" type="application/rss+xml"></atom:link>
<description>RSS feed for https://www.vice.com</description>
<language>en</language>
<pubDate>Tue, 01 May 2018 20:57:20 +0000</pubDate>
<item>
<title>
<![CDATA[Chuck Palahniuk Hung Out with 'Separatists of Every Stripe' for New Novel ]]>
</title>
<link>https://www.vice.com/en_us/article/paxn4z/chuck-palahniuk-hung-out-with-separatists-of-every-stripe-for-new-novel</link>
<pubDate>Tue, 01 May 2018 20:57:20 +0000</pubDate>
<description>
...
</description>
<content:encoded>
...
</content:encoded>
<guid isPermaLink="false">paxn4z</guid>
<enclosure url="https://video-images.vice.com/articles/5ae8a1b89ffa400006a29038/lede/1525200210305-Untitled-collage-63.jpeg" length="0" type="image/jpeg"></enclosure>
<dc:creator>Peter Rugh</dc:creator>
<dc:creator>Brian McManus</dc:creator>
<category>FIGHT CLUB</category>
<category>writers</category>
<category>q&a</category>
<category>Novels</category>
<category>authors</category>
<category>Millennials</category>
</item>
</channel>
</rss>
HTTP Request
GET https://api.vice.com/v1/feeds/rss
Query Parameters
Parameter and Type | Description | Example | Required |
---|---|---|---|
site string |
site name | munchies |
true |
locale string |
locale to filter by | en_us |
true |
page integer |
page of results | 1 |
false |
Features
Features provide an ordered list for exposing playlists on the video homepage.
Feature Object
Fetch a feature by id
HTTP Request
GET https://api.vice.com/<API version>/features/<ID>
{
"id": "5ad52d7c3e2be000079d2b59",
"position": 0,
"legacy_id": 582,
"title": "Weed Week",
"label": "Now with more weed. Starts 4/16. Ends 4/20.",
"lede": null,
"collection_items": [
"58f0e3cbdab96771063f9864"
]
}
{
"id": "5ad52d7c3e2be000079d2b59",
"feature_type": null,
"position": 0,
"legacy_id": 582,
"button_text": null,
"title": "Weed Week",
"label": "Now with more weed. Starts 4/16. Ends 4/20.",
"created_at": 1523920252550,
"updated_at": 1524594833150,
"content_policy": {
// Content Policy Object
...
},
"lede": null,
"collection_items": [
{
"feature_id": "5ad52d7c3e2be000079d2b59",
"collection_id": "58f0e3cbdab96771063f9864",
"locale_scope": 1,
"created_at": null,
"updated_at": 1523920252871,
"feature": {
"id": "5ad52d7c3e2be000079d2b59",
"feature_type": null,
"position": 0,
"legacy_id": 582,
"button_text": null,
"title": "Weed Week",
"label": "Now with more weed. Starts 4/16. Ends 4/20.",
"created_at": 1523920252550,
"updated_at": 1524594833150,
"content_policy": {
// Content Policy Object
...
}
}
}
]
}
Object Properties
Property and type | Nullable | Description | Example |
---|---|---|---|
id string |
false | ID of the object | 58f4cd7473e7c17a75526deb |
legacy_id number |
false | Legacy Id reference | 123 |
position number |
true | The position of the feature | 0 |
title string |
true | The title of the feature to display | Weed Week |
label string |
true | The label of the feature to display | Now with more weed. Starts 4/16. Ends 4/20. |
button_text string |
true | The text to display on the button | Weed week button |
feature_type enum(card, carousel, collection, featured_show, show) |
true | The type of the feature | collection |
collection_items array |
true | Array of collections associated with this feature | [] |
content_policy content policy object |
true | The content policy associated with this entry | See content policy object for details |
Feature list
Fetch a list of features, by default this list is ordered by position ascending
HTTP Request
GET https://api.vice.com/<API version>/features
This request will return an array of feature objects, for more details on pagination see https://api-docs.vice.com/#pagination
[
// Array of feature objects
...
]
Query Parameters
Parameter and Type | Description | Example |
---|---|---|
title string |
Filter by the title of items | Wee%20Week |
position number |
Filter by the position of an item | 0 |
id string |
Find by the id of an item | 57a204088cb727dec794c67f |
status number |
Filter by the status_id of an item | 3 |
Sorting Query Parameters Values
Parameter Value | Description |
---|---|
id |
Sort by the id |
position |
Sort by position |
title |
Sort by title |
Create or update a feature
Create or update a feature
HTTP Request
Create article POST https://api.vice.com/v1.1/features
Update article PATCH https://api.vice.com/v1.1/features/<ID>
POST /v1.1/features
orPATCH /v1.1/features/<ID>
// Write operations are only permitted in v1.1
{
"feature_type": null,
"position": 17,
"button_text": null,
"title": "dasd",
"label": "dasd",
"created_at": 1524596749023,
"collection_items": [
{
"collection_id": "5a7103cff8c0f15a99cbd212"
}
]
}
Parameter and Type | Description | Required on create |
---|---|---|
position number |
What order this item should appear in | false |
title string(255) |
The title of the feature to display | false |
label string(255) |
The label of the feature to display | false |
button_text string(255) |
The text to display on the button | false |
feature_type enum(card, carousel, collection, featured_show, show) |
The text to display on the button | false |
collection_items array(object) |
An array of objects describing which collections are associated with this feature | false |
Delete feature
Removes feature from visibility
HTTP Request
DELETE https://api.vice.com/v1.1/features/<ID>
Order features
Reorder multiple features at once. Will update the positions and content_policy.status_id of each entry.
PUT https://api.vice.com/v1.1/features/order
PUT /v1.1/features/order
// Write operations are only permitted in v1.1
[
// Array of feature objects
]
Permissions
Permissions is responsible for managing a CMS user's permissions.
List Roles
Gets a list of user roles.
[
{
"name": "writer",
"role": {
"permissions": ["draft-articles", "edit-articles", "use-dam"],
"description": "Can create, edit & save drafts of posts/videos, and view published content."
}
},
{
"name": "translator",
"role": {
"permissions": [
"draft-articles",
"edit-articles",
"use-dam",
"translate-articles",
"edit-videos",
"view-worldwide",
"manage-collections",
"manage-article-slugs",
"manage-video-slugs",
"use-google-translate"
],
"description": "Can create, edit, view & translate posts and videos."
}
}
]
HTTP Request
GET https://api.vice.com/v1/permissions/roles
Get User Role
Gets a role's description and permissions.
{
"permissions": ["draft-articles", "edit-articles", "use-dam"],
"description": "Can create, edit & save drafts of posts/videos, and view published content."
}
HTTP Request
GET https://api.vice.com/v1/permissions/roles/:role
URL Parameters
Parameter and Type | Description | Example | Required |
---|---|---|---|
role string |
a valid role | writer |
true |
Update User Role
Creates or replaces a user role
{
"description": "Can create, edit & save drafts of posts/videos, and view published content.",
"permissions": [
"draft-articles",
"edit-articles",
"use-dam"
]
}
HTTP Request
PUT https://api.vice.com/v1/permissions/roles/:role
URL Parameters
Parameter and Type | Description | Example | Required |
---|---|---|---|
role string |
Role name | writer |
true |
Request Body Parameters
Parameter and Type | Description | Example | Required |
---|---|---|---|
description string |
Description of role | Can create, edit & save drafts of posts/videos, and view published content. |
true |
permissions string[] |
Array of permissions | [ "draft-articles", "edit-articles" ] |
true |
Delete User Role
Deletes a user role
HTTP Request
DELETE https://api.vice.com/v1/permissions/roles/:role
URL Parameters
Parameter and Type | Description | Example | Required |
---|---|---|---|
role string |
Role name | writer |
true |
Get User Permissions
Gets a list of a user's permissions.
{
"permissions": [
"draft-articles",
"edit-articles",
"use-dam",
"translate-articles",
"edit-videos",
"view-worldwide",
"manage-collections",
"manage-article-slugs",
"manage-video-slugs",
"use-google-translate",
"publish-articles",
"delete-draft-articles",
"embargo-articles",
"manage-topics",
"manage-links",
"manage-modules",
"publish-videos",
"delete-draft-videos",
"edit-feed-visibility",
"manage-homepage-carousel",
"manage-scopes",
"manage-permissions",
"manage-site-settings",
"superpower-post",
"superpower-put",
"superpower-patch",
"superpower-delete",
"manage-campaigns"
]
}
HTTP Request
GET https://api.vice.com/v1/permissions/for/:user_id
URL Parameters
Parameter and Type | Description | Example | Required |
---|---|---|---|
user_id string |
ID of user | 576afa894d99ca4a1df5d197 |
true |
Update User Permissions
Creates or replaces a user's permissions.
{
"permissions": ["draft-articles", "edit-articles"]
}
HTTP Request
PUT https://api.vice.com/v1/permissions/for/:user_id
URL Parameters
Parameter and Type | Description | Example | Required |
---|---|---|---|
user_id string |
ID of user | 576afa894d99ca4a1df5d197 |
true |
Request Body Parameters
Parameter and Type | Description | Example | Required |
---|---|---|---|
permissions string[] |
Array of permissions | [ "draft-articles", "edit-articles" ] |
true |
Delete User Permisisons
Deletes a user's permissions
HTTP Request
DELETE https://api.vice.com/v1/permissions/for/:user_id
URL Parameters
Parameter and Type | Description | Example | Required |
---|---|---|---|
user_id string |
ID of user | 58bf2fa8229a9f220da3139a |
true |
Latest
Returns a list of the newest articles or videos, sorted in descending published_at
order.
HTTP Request
GET https://api.vice.com/<API version>/latest
This request will return an array of article or video objects, for more details on pagination see https://api-docs.vice.com/#pagination
[
// Array of article or video objects
...
]
Query Parameters
Parameter and Type | Description | Example |
---|---|---|
topic_id string |
Filters results to only those associated with the given topic | 59dcea52ae54a32d39706782 |
nsfw boolean |
Filter results by not safe for work flag | true |
contributor_id string |
Filters results to only those associated with the given contributor | 59dcea52ae54a32d39706782 |
section_id string |
Filters results to only those associated with the given section | 59dcea52ae54a32d39706782 |
type 'videos' or 'articles' |
Only return resources of the given type. If excluded will return both | articles |
not_id string |
Exclude resources with this id from the returned results | 59dcea52ae54a32d39706782 |
Modules
Modules provide a means of defining reusable components which can be associated with dynamically changing data, such as a collection of items or reference to a secondary api request.
Module Object
Fetch a module by id
HTTP Request
GET https://api.vice.com/<API version>/modules/<ID>
{
"id": "58ecff8a3797504e6e539d7a",
"module_id": "58ecff8a3797504e6e539d7a",
"module_type": "grid",
"title": "Homepage - VICE",
"position": 1,
"content_source_type": null,
"content_source_id": null,
"api_items_path": "/modules/58ecff8a3797504e6e539d7a/items",
"api_items_url": "https://api.vice.com/v1/modules/58ecff8a3797504e6e539d7a/items?site=vice&locale=en_us",
"display_preference": "default",
"article": null,
"video": null,
"linkout": null,
"collection": null
}
{
"id": "58ecff8a3797504e6e539d7a",
"content_source_id": null,
"article_id": null,
"video_id": null,
"linkout_id": null,
"collection_id": null,
"content_source_type": null,
"title": "Homepage - VICE",
"display_preference": "lede",
"module_type": "grid",
"position": 1,
"api_items_path": "",
"created_at": 1491926922227,
"updated_at": 1524516483142,
"content_policy": {
// Content Policy Object
...
},
"display_settings": {
// Display Settings Object
...
},
"content_policies": [
// Array of Content Policy Objects
...
],
"article": {
// Optional Article Object
...
},
"video": {
// Optional Video Object
...
}
}
Object Properties
Property and type | Nullable | Description | Example |
---|---|---|---|
id string |
false | ID of the object | 58f4cd7473e7c17a75526deb |
module_id string |
false | Alias of id | 58f4cd7473e7c17a75526deb |
module_type enum(grid, hero, carousel, live-hero, news, sections, lede, latest, features) |
true | Describes the type of content the module holds | 0 |
title string |
true | The title identifying the module | Homepage - VICE |
position number |
true | The position of the module | grid |
content_source_type string |
true | A description of the type of data contained in the module | collections |
content_source_id string |
true | An identifier for the type of data held in the module | 58f4cd7473e7c17a75526deb |
api_items_path string |
true | A url path relative to the api that can be used to retrieve several items associated with this module. For /v1/ routes it will be defaulted to the modules /items/ route. For /v1.1/ it will simply mirror what is saved in the database |
/modules/58ecff8a3797504e6e539d7a/items |
api_items_url string |
true | A fully qualified url that can be hit for more items associated with this module | https://api.vice.com/v1/modules/58ecff8a3797504e6e539d7a/items?site=vice&locale=en_us |
display_preference string |
true | Description for the preferred display type | default |
article article object |
true | The article associated with this module | See article object for details |
video video object |
true | The video associated with this module | See video object for details |
linkout linkout object |
true | The linkout associated with this module | See linkout object for details |
collection collection object |
true | The collection associated with this module | See collection object for details |
content_policy content policy object |
true | The content policy associated with this entry | See content policy object for details |
content_policies array([content policy object])(https://api-docs.vice.com/#content-policy-object) |
true | The content policy associated with this entry | See content policy object for details |
Module list
Fetch a list of modules, by default this list is ordered by position ascending
HTTP Request
GET https://api.vice.com/<API version>/modules
This request will return an array of module objects, for more details on pagination see https://api-docs.vice.com/#pagination
[
// Array of module objects
...
]
Query Parameters
Parameter and Type | Description | Example |
---|---|---|
id string |
Find by the id of an item | 57a204088cb727dec794c67f |
slug number |
Filter by the associated slug | some-module |
Sorting Query Parameters Values
Parameter Value | Description |
---|---|
id |
Sort by the id |
position |
Sort by position |
Create or update a module
Create or update a module
HTTP Request
Create module POST https://api.vice.com/v1.1/modules
Update module PATCH https://api.vice.com/v1.1/modules/<ID>
POST /v1.1/modules
orPATCH /v1.1/modules/<ID>
// Write operations are only permitted in v1.1
{
"content_source_type": null,
"content_source_id": null,
"article_id": null,
"video_id": null,
"linkout_id": null,
"collection_id": null,
"title": "Vice - Homepage",
"display_preference": "lede",
"position": 0,
"module_type": "grid",
"api_items_path": "/latest",
"items": [
// Instead of specifying an api path of pointing to a collection of items,
// a list of manually curated items can be passed in to be associated directly
// with this modules
{
"position": 0,
"article_id": "",
"video_id": "",
"linkout_id": "",
"collection_id": "",
"set_id": "",
"section_id": ""
}
]
}
Parameter and Type | Description | Required on create |
---|---|---|
content_source_type string(45) |
Describe what specific model is being held (should only be used if you have corresponding content_source_id ) |
false |
content_source_id hexIDString |
The id for the model type being held | false |
article_id hexIDString |
The associated article id | false |
video_id hexIDString |
The associated video id | false |
linkout_id hexIDString |
The associated linkout id | false |
collection_id hexIDString |
The associated collection id | false |
title string(255) |
The title of the module | false |
display_preference enum(lede, super-lede) |
How you prefer the module to be displayed | false |
position number |
Control the ordering of the modules during default sorting | false |
module_type enum(grid, hero, carousel) |
What kind of module this is | false |
api_items_path string(255) |
URL path relative to the api from which associated items can be retrieved from | false |
Module items
Modules can also directly contain a number of associated items.
Module Item Object
// Module Item Object
{
"module_id": "58ecff8a3797504e6e539d7a",
"video_id": null,
"article_id": "5ae03c80b34bd300087d4524",
"linkout_id": null,
"collection_id": null,
"position": 0,
"id": "5ae03c80b34bd300087d4524",
"type": "articles",
"data": {
// Object serializaion of the defined "type"
...
}
}
// Module Item Object
{
"module_id": "58ecff8a3797504e6e539d7a",
"article_id": "5ae03c80b34bd300087d4524",
"video_id": null,
"linkout_id": null,
"collection_id": null,
"position": 0,
"video": {
// Optional Video Object
...
},
"linkout": {
// Optional Linkout Object
...
},
"collection": {
// Optional Collection Object
...
},
"article": {
// Optional Article Object
...
}
}
Getting module items
GET https://api.vice.com/<API version>/modules/<ID>/items
// /modules/<ID>/items response
[
// Array of module item objects
...
]
Update module items
PATCH /v1.1/modules/<ID>/items
// /modules/<ID>/items PATCH request
// Write operations are only permitted in v1.1
// /modules/<ID>/items PATCH request
[
// Array of module item objects
...
]
Delete module
Removes module from visibility
HTTP Request
DELETE https://api.vice.com/v1.1/modules/<ID>
Trending
The trending endpoint returns the most popular videos, shows, or articles according to Google Analytics (this data is polled every few hours and cached) in descending order of number of views.
HTTP Request
GET https://api.vice.com/<API version>/trending
This request will return an array of article, video, or show objects, for more details on pagination see https://api-docs.vice.com/#pagination
[
{
"type": "videos", // Can be either "videos" or "articles" or "shows"
"data": {
// A video, article, or show object depending on the "type"
}
}
]
Query Parameters
Parameter and Type | Description | Example |
---|---|---|
type 'videos' or 'articles' or 'shows' (defaults to 'videos') |
Only return resources of the given type. If excluded will return videos | articles |
for_sites comma separated list of site names |
Allows you to specify sites to query against beyond your configured "site" scope | munchies,broadly |
not_for_sites comma separated list of site names |
The inverse of 'for_sites', the included sites will be excluded | munchies,broadly |
Search
Full text search for Content API resources.
Note:
Endpoints with a /v1.1/search/cms
prefix use different search algorithms that favor CMS use cases. If you're looking for general search results, you should use the variants outside of the /cms
namespace.
Search Results
The search results list resources in the Content API that match the q
query parameter.
HTTP Request
GET https://api.vice.com/<API version>/search?q=news&model=videos
GET https://api.vice.com/<API version>/cms/search?q=news&model=videos
This request will return an array of whichever resource is selected using the
model
query parameter. For more details on pagination see https://api-docs.vice.com/#pagination
{
"data": [
// array of video objects
...
],
"meta": {
"count": 28,
"scores": [
{
"id": "5a54e471177dd46d0c255dfc",
"score": 0.833098
},
{
"id": "59b7e2ed701094a02a1bcc81",
"score": 0.6095448
},
{
"id": "5a01e013177dd40b875bc823",
"score": 0.60354394
},
{
"id": "586c2d03ef69730b72217adc",
"score": 0.5607406
},
{
"id": "583cf8829b1abab240292954",
"score": 0.5601336
},
{
"id": "582d238df80fd1af3a37db9f",
"score": 0.5594994
}
],
"link": {
"self": "/v1/search/cms?site=8&locale=1&page=1&per_page=25&q=news&cache=false&nsfw=1&all_published_content=0&platform=0&client_site=4294967295&client_locale=9223372036854775807&user_site_scope=9007199254740991&model=videos",
"first": "/v1/search/cms?site=8&locale=1&page=1&per_page=25&q=news&cache=false&nsfw=1&all_published_content=0&platform=0&client_site=4294967295&client_locale=9223372036854775807&user_site_scope=9007199254740991&model=videos",
"last": "/v1/search/cms?site=8&locale=1&page=67&per_page=25&q=news&cache=false&nsfw=1&all_published_content=0&platform=0&client_site=4294967295&client_locale=9223372036854775807&user_site_scope=9007199254740991&model=videos",
"next": "/v1/search/cms?site=8&locale=1&page=2&per_page=25&q=news&cache=false&nsfw=1&all_published_content=0&platform=0&client_site=4294967295&client_locale=9223372036854775807&user_site_scope=9007199254740991&model=videos"
}
}
}
Multi - Model Search
This multi-model search is availble on all the search endpoints (/search
, /cms/search
, /typeahead
, /cms/typeahead
).
HTTP Request
GET https://api.vice.com/<API version>/search?q=news&model=videos,shows
You can also provide a comma-separated list in the
model
query parameter to retrieve results of multiple model searches in one request. These result sets will come back as independent result sets. Each model will have it's own set of pagination links provided in themeta
section of the response, which will contain aself
link, which is the link to query the current page of the current search, but only for that model, as well as next page, last page, previous page and first page.
{
"data": {
"videos": [
// array of video objects
...
],
"shows": [
// array of show objects
...
]
},
"meta": {
"videos": {
"count": 1675,
"scores": [
...
],
"link": {
"self": "/v1/search/cms?site=8&locale=1&page=1&per_page=25&q=news&cache=false&nsfw=1&all_published_content=0&platform=0&client_site=4294967295&client_locale=9223372036854775807&user_site_scope=9007199254740991&model=videos",
"first": "/v1/search/cms?site=8&locale=1&page=1&per_page=25&q=news&cache=false&nsfw=1&all_published_content=0&platform=0&client_site=4294967295&client_locale=9223372036854775807&user_site_scope=9007199254740991&model=videos",
"last": "/v1/search/cms?site=8&locale=1&page=67&per_page=25&q=news&cache=false&nsfw=1&all_published_content=0&platform=0&client_site=4294967295&client_locale=9223372036854775807&user_site_scope=9007199254740991&model=videos",
"next": "/v1/search/cms?site=8&locale=1&page=2&per_page=25&q=news&cache=false&nsfw=1&all_published_content=0&platform=0&client_site=4294967295&client_locale=9223372036854775807&user_site_scope=9007199254740991&model=videos"
}
},
"shows": {
"count": 500,
"scores": [
...
],
"link": {
"self": "/v1/search/cms?site=8&locale=1&page=1&per_page=25&q=news&cache=false&nsfw=1&all_published_content=0&platform=0&client_site=4294967295&client_locale=9223372036854775807&user_site_scope=9007199254740991&model=shows",
"first": "/v1/search/cms?site=8&locale=1&page=1&per_page=25&q=news&cache=false&nsfw=1&all_published_content=0&platform=0&client_site=4294967295&client_locale=9223372036854775807&user_site_scope=9007199254740991&model=shows",
"last": "/v1/search/cms?site=8&locale=1&page=1&per_page=25&q=news&cache=false&nsfw=1&all_published_content=0&platform=0&client_site=4294967295&client_locale=9223372036854775807&user_site_scope=9007199254740991&model=shows"
}
}
}
}
Query Parameters
Parameter and Type | Description | Example |
---|---|---|
q string |
The terms to search. If contains any double-quoted phrases, the search will find exact phrase matches (if any) | politics |
nsfw boolean |
Filter results by not safe for work flag | true |
model string |
The model for which the search should be performed. | videos |
status_id string |
Filter results based on their status_id | 3 |
date_range string |
Filter results by their published date using either an English timespan or a YYYYMMDD range. | 2_hours or 20170803,20180101 |
Typeahead Results
The typeahead search results list resources in the Content API that match the q
query parameter. This endpoint favors autocomplete style search by omitting body content and enables more robust partial matching.
HTTP Request
GET https://api.vice.com/<API version>/search/typeahead?q=news&model=videos
GET https://api.vice.com/<API version>/search/cms/typeahead?q=news&model=videos
This request will return an array of whichever resource is selected using the
model
query parameter. For more details on pagination see https://api-docs.vice.com/#pagination
{
"data": [
// array of video objects
...
],
"meta": {
"count": 20,
"scores": [
...
],
"link": {
...
}
}
}
Recipe Search
Although recipe searches search through the articles collection, the query used for retrieving results differs in a few major ways: 1. Recipe searches put more emphasis on the body. This is useful for searching by ingredient names, cooking methods, accompanying foods/drinks, etc. 2. There is also more emphasis on partial title matches. Even if the recipe title is creative or overly descriptive, it will likely contain the name of the food being prepared, and this will trigger a match. 3. There is no age-decay on search results. For article searches, we expect that articles will lose relevance over time, and newer articles will be more sought-after. This is not necessarily so with recipes, so this search is done strictly based on content, and not age.
All together, the /search/recipes endpoint will look for matches in the title, body, contributor list, topic list, and body. The /typeahead variant acts as a 'lite' version of this search, but will find partial-word matches in the title, and partial web_id matches.
HTTP Request
GET https://api.vice.com/<API version>/search/recipes?q=chicken
This request will return an array of articles. For more details on pagination see https://api-docs.vice.com/#pagination
{
"data": [
// array of article objects
...
],
"meta": {
"count": 28,
"scores": [
{
"id": "5a54e471177dd46d0c255dfc",
"score": 0.833098
},
{
"id": "59b7e2ed701094a02a1bcc81",
"score": 0.6095448
},
...
],
"link": {
"self": "/v1/search/recipes?site=4&locale=1&page=1&per_page=25&q=chicken",
"first": "/v1/search/recipes?site=4&locale=1&page=1&per_page=25&q=chicken",
"last": "/v1/search/recipes?site=4&locale=1&page=4&per_page=25&q=chicken",
"next": "/v1/search/recipes?site=4&locale=1&page=2&per_page=25&q=chicken"
}
}
}
Query Parameters
Parameter and Type | Description | Example |
---|---|---|
q string |
The terms to search. If contains any double-quoted phrases, the search will find exact phrase matches (if any) | chicken |
date_range string |
Filter results by their published date using either an English timespan or a YYYYMMDD range. | 2_hours or 20170803,20180803 |
Stats
Returns some statistics about articles and videos within the given date range. This currently powers the metrics found at the top of the CMS dashboard (new, edited, published from the past 24 hours), but could be used to retrieve time series data regarding the amount of content VICE has been creating.
Available Statistics
The following statistics are returned for both articles and videos:
Name | Description |
---|---|
new |
The number of articles/videos created in the given date range that have a status of New |
draft |
The number of articles/videos updated in the given date range that have a status of Draft |
published |
The number of articles/videos that have been published in the given date range (and are still published) |
scheduled |
The number of articles/videos that are scheduled to be published in the future |
HTTP Request
GET https://api.vice.com/<API version>/stats?locale=1&site=1&date_range=24_hours
{
"data": {
"articles": {
"new": 0,
"scheduled": 2,
"draft": 5,
"published": 13
},
"videos": {
"new": 2,
"scheduled": 0,
"draft": 0,
"published": 6
}
}
}
Query Parameters
Parameter and Type | Description | Example |
---|---|---|
locale string |
Filter query by locale | en_us |
site string |
Filter query by site | vice |
date_range string |
Filter query by date range, accepts either English timespan or a YYYYMMDD range | 24_hours , 30_days , 20170803,20180803 |
Related
Using the /related
endpoints, clients can fetch a list of articles related a given article, or videos related to a given video.
How Related Items Are Found:
There are several factors that go into making the decision which articles/videos are related to the current object. Things considered (listed in order of importance) are extractions, primary topic, topic list, contributors, as well as the most relevant keywords from the title, dek, and body. Most relevant keywords are determined using the TF-IDF algorithm (words that appear most in the current article, and least in the entire collection of articles).
Note:
By default, these endpoints will return the top 25 scoring articles or videos. If you don't need all of these, it is advisable to use the per_page
parameter in your request. For more details on pagination, see https://api-docs.vice.com/#pagination.
Related Article List
Fetch a list of articles related to the current one
HTTP Request
GET https://api.vice.com/<API version>/related/articles/<ID>
This request will return an array of articles, for more details on pagination see https://api-docs.vice.com/#pagination
[
// Array of article objects
...
]
Query Parameters
Parameter and Type | Description | Example |
---|---|---|
date_range string |
Filter results by their published date using either an English timespan or a YYYYMMDD range. | 2_hours , 5_days , 20170803-20180803 |
Related Video List
Fetch a list of videos related to the current one
HTTP Request
GET https://api.vice.com/<API version>/related/videos/<ID>
This request will return an array of articles, for more details on pagination see https://api-docs.vice.com/#pagination
[
// Array of video objects
...
]
Query Parameters
Parameter and Type | Description | Example |
---|---|---|
date_range string |
Filter results by their published date using either an English timespan or a YYYYMMDD range. | 2_hours , 5_days , 20170803-20180803 |
GraphQL
The /graphql
route is used to communicate with the GraphQL API service and to run GraphQL queries in order to CRUD data.
This service supports an Apollo GraphQL style schema. Please refer to the Apollo docs for more information.
# This service supports an Apollo GraphQL style schema and should be formatted as follows:
{
articles(locale: 1, site: 1, page: 1, per_page: 10){
dek
title
contributions{
contributor{
full_name
}
}
topics{
is_primary_topic
name
}
thumbnail_url
}
}
# You may also wish to request multiple resources in a single query:
{
articles(locale: 1, site: 1){
...
}
topics(slug: "stuff"){
...
}
}
# Aliases can be used to request two of the same resource in a single query:
{
vice: articles(locale: 1, site: 1){
...
}
munchies: articles(locale: 1, site: 2){
...
}
}
When accessing a union type
Some resources, such as latest
, have multiple possible datatypes that may be resolved. In order to tell GraphQL which fields need to be returned from a union per type, you must specify an inline fragment
{
latest(locale:1, site: 1, type: "articles,videos"){
data{
... on Article{
title
}
... on Video{
title
}
}
}
}
HTTP Request
POST https://api.vice.com/<API version>/graphql
{
"query": "articles(locale: 1, site: 1, page: 1, per_page: 10){ dek title contributions{ contributor{ full_name } } topics{ is_primary_topic name } thumbnail_url } }",
"variables":null,
"operationName":null
}
Note: only POST requests are supported by this endpoint
GraphIQL
GraphIQL is a popular tool that allows users to explore a GraphQL endpoint with a helpful query builder tool as well as a response preview panel.
It is recommended that you build more complex queries with the help of this interface, or simply use it to familiarize yourself with the GraphQL service, as it will import the entire service's schema and provide you with autocomplete suggestions.
Secrets
The secrets endpoint gives authorized API clients (currently only the CMS) access to managed secrets.
Get a single secret
Secrets are themselves JSON objects, containing multiple keys and values and possibly even nested structures
GET https://api.vice.com/v1/secrets/<SECRET_ID>
{
"key": "value"
}
Get multiple secrets
GET https://api.vice.com/v1/secrets?id=secret1,secret2
{
"secret1": {
"key": "value"
},
"secret2": {
"key": "value"
}
}
Adding a secret
Contact devops for adding a new secret to a given environment.
Getting access
New clients that need access to the secrets endpoint will need to reach out to the api team to have their account authorized for accessing this route.
Scheduled Segments
Scheduled segments are used to describe the presentational states of a client application over a span of time.
Scheduled Segments List
Fetch a list of scheduled segments. The default start time of these segments is the moment the request reaches the server.
HTTP Request
GET https://api.vice.com/<API version>/scheduled_segments
This request will return an array of scheduled_segment objects
Note that scheduled_segments
are meant to be a continuous stream of presentational states. If there is a gap in segments, it will be on the client to fill that time with a fallback presentational state which will likely be pulled from homepage_carousel_items
, or simply display nothing for that position.
[
{
"id": "57a204058cb727dec794c570",
"locale_id": "57a204068cb727dec794c573",
"site_id": "57a204058cb727dec794c568",
"video": <video object | null>,
"start_time": 1544645123143,
"end_time": 1544652337209,
"event_type": "during-livestream",
"display_position": "homepage-lede",
"title": "VICELAND Goes Live Febuary 4th",
"dek": "Lots of fun guests tonight",
"promotional_text": "Tonight on VICELAND at 9pm EST",
"cta_text": "Live tonight",
"cta_url": "https://www.viceland.com",
"home_lede_clip": "https://vice-videos-assets-cdn.vice.com/videos/homepagecarouselitem/58f4cd7473e7c17a75526deb/output/KENTUCKY_AYAHUASCA_VL_WEBSITE_LEDE_111918_V4-master.m3u8",
"show_lede_clip": "https://vice-videos-assets-cdn.vice.com/videos/homepagecarouselitem/58f4cd7473e7c17a75526deb/output/KENTUCKY_AYAHUASCA_VL_WEBSITE_LEDE_111918_V4-master.m3u8",
"home_web_lede": <image object | null>,
"home_app_lede": <image object | null>,
"show_web_lede": <image object | null>,
"show_app_lede": <image object | null>,
}
]
Fields
Filed Name | Description | Enums |
---|---|---|
start_time |
The beginning of a presentational state | N/A |
end_time (nullable) |
The end of a presentational state | N/A |
event_type |
The type of event ocurring. Generally used to tie to a presentational state | pre-livestream , during-livestream , post-livestream |
display_position |
Where the presentational state should be displayed | homepage-lede |
Query Parameters
Parameter and Type | Description | Example |
---|---|---|
site string or int |
||
locale string or int |
||
start_time (optional) int |
The beginning time of the desired list of scheduled_segments. Defaults to the current server time. | 1549256400000 |
end_time (optional) int |
The end time of the desired list of scheduled_segments. If not provided, will default to start_time + 6 hours in order to capture a potential full live show block |
1549263600000 |
Create/Update Scheduled Segment
One important thing to note when creating a new scheduled_segment or when updating an existing one, is that segments with event_type
of during-livestream
will always create a blank video/content_policy/episode/season/show set with an autofilled uplynk_channel_id
field for the video. The video_type
for this video will also be set to live
. The uplynk_channel_id
is not used by the client. The field is used to retrieve the uplynk livestream by the VMS.
Subscriptions
Manage in-app subscription purchases.
Subscription Object
Fetch subscription details associated with the passed in token.
HTTP Request
GET https://api.vice.com/<API Version>/subscriptions
{
"user_id": "57a204088cb727dec794c67b",
"original_transaction_id": 123456789,
"latest_receipt": "ICAidHdpdHRlcl91cmwiOiAiaHR0cHM6Ly90d2l0dGVyLmNvbS9WSUNFIiwKICAiZmFjZWJvb2tfdXJsIjogImh0dHBzOi8vd3d3LmZhY2Vib29rLmNvbS9WSUNFIiwKICAiZmFjZWJvb2tfcGFnZV9pZCI6IG51bGwsCiAgImluc3RhZ3JhbV91cmwiOiAiaHR0cHM6Ly93d3cuaW5zdGFncmFtLmNvbS9WSUNFIiwKICAieW91dHViZV91cmwiOiAiIiwKICAidHVtYmxyX3VybCI6ICIiLAogICJwaW50ZXJlc3RfdXJsIjogIiIsCiAgInJlZGRpdF91cmwiOiAiaHR0cHM6Ly93d3cucmVkZGl0LmNvbS91c2VyL3ZpY2UiLAogICJyZWRkaXRfaGFuZGxlIjogInZpY2UiLAogICJzb3VuZGNsb3VkX3VybCI6ICIiLAogICJ0d2l0Y2hfdXJsIjogIiIsCiAgInR3aXRjaF9oYW5kbGUiOiBudWxsLAogICJzaXRlX3Byb21vdGlvbmFsX21lc3NhZ2UiOiBudWxsLAogICJjb2xvciI6ICIjMDAwMDAwIiwKICAiZGVrIjogIlRoZSBkZWZpbml0aXZlIGd1aWRlIHRvIGVubGlnaHRlbmluZyBpbmZvcm1hdGlvbi4iCg==",
"subscription_level": "viceHoroscopeUnlimitedSubscription",
"subscription_status": "active",
"start_date": 1521486871766,
"cancellation_date": null
}
{
"user_id": "57a204088cb727dec794c67b",
"original_transaction_id": 123456789,
"latest_receipt": "ICAidHdpdHRlcl91cmwiOiAiaHR0cHM6Ly90d2l0dGVyLmNvbS9WSUNFIiwKICAiZmFjZWJvb2tfdXJsIjogImh0dHBzOi8vd3d3LmZhY2Vib29rLmNvbS9WSUNFIiwKICAiZmFjZWJvb2tfcGFnZV9pZCI6IG51bGwsCiAgImluc3RhZ3JhbV91cmwiOiAiaHR0cHM6Ly93d3cuaW5zdGFncmFtLmNvbS9WSUNFIiwKICAieW91dHViZV91cmwiOiAiIiwKICAidHVtYmxyX3VybCI6ICIiLAogICJwaW50ZXJlc3RfdXJsIjogIiIsCiAgInJlZGRpdF91cmwiOiAiaHR0cHM6Ly93d3cucmVkZGl0LmNvbS91c2VyL3ZpY2UiLAogICJyZWRkaXRfaGFuZGxlIjogInZpY2UiLAogICJzb3VuZGNsb3VkX3VybCI6ICIiLAogICJ0d2l0Y2hfdXJsIjogIiIsCiAgInR3aXRjaF9oYW5kbGUiOiBudWxsLAogICJzaXRlX3Byb21vdGlvbmFsX21lc3NhZ2UiOiBudWxsLAogICJjb2xvciI6ICIjMDAwMDAwIiwKICAiZGVrIjogIlRoZSBkZWZpbml0aXZlIGd1aWRlIHRvIGVubGlnaHRlbmluZyBpbmZvcm1hdGlvbi4iCg==",
"subscription_level": "viceHoroscopeUnlimitedSubscription",
"subscription_status": "active",
"start_date": 1521486871766,
"cancellation_date": null
}
Object Properties
Property and Type | Nullable | Description | Example |
---|---|---|---|
user_id string |
false | ID of the user | 57a204088cb727dec794c67b |
original_transaction_id number |
false | Original Transaction ID for subscription. Provided by Apple. | 123456789 |
latest_receipt string |
false | Most recent receipt associated with subscription, encoded. | ICAidHdpdHRlcl91cmwiOiAiaHR0cHM6Ly90d2l0dGVyLmNvbS9WSUNFIiwKICAiZmFjZWJvb2tfdXJsIjogImh0dHBzOi8vd3d3LmZhY2Vib29rLmNvbS9WSUNFIiwKICAiZmFjZWJvb2tfcGFnZV9pZCI6IG51bGwsCiAgImluc3RhZ3JhbV91cmwiOiAiaHR0cHM6Ly93d3cuaW5zdGFncmFtLmNvbS9WSUNFIiwKICAieW91dHViZV91cmwiOiAiIiwKICAidHVtYmxyX3VybCI6ICIiLAogICJwaW50ZXJlc3RfdXJsIjogIiIsCiAgInJlZGRpdF91cmwiOiAiaHR0cHM6Ly93d3cucmVkZGl0LmNvbS91c2VyL3ZpY2UiLAogICJyZWRkaXRfaGFuZGxlIjogInZpY2UiLAogICJzb3VuZGNsb3VkX3VybCI6ICIiLAogICJ0d2l0Y2hfdXJsIjogIiIsCiAgInR3aXRjaF9oYW5kbGUiOiBudWxsLAogICJzaXRlX3Byb21vdGlvbmFsX21lc3NhZ2UiOiBudWxsLAogICJjb2xvciI6ICIjMDAwMDAwIiwKICAiZGVrIjogIlRoZSBkZWZpbml0aXZlIGd1aWRlIHRvIGVubGlnaHRlbmluZyBpbmZvcm1hdGlvbi4iCg== |
subscription_level string |
false | The subscription's product ID in iTunes Connect | viceHoroscopeUnlimitedSubscription |
subscription_status enum(active , expired , cancelled ) |
false | Status of the subscription | active |
start_date number |
false | Start date of the subscription in ms | 1521486871766 |
cancellation_date number |
true | Cancellation date of the subscription in ms | 1521486871766 |
Notify API of New Subscription
Creates a subscription record with details from Apple's in-app purchase receipt, linked to our user ID from the passed in token.
HTTP Request
POST https://api.vice.com/<API Version>/subscriptions
{
"receipt_data": "ICAidHdpdHRlcl91cmwiOiAiaHR0cHM6Ly90d2l0dGVyLmNvbS9WSUNFIiwKICAiZmFjZWJvb2tfdXJsIjogImh0dHBzOi8vd3d3LmZhY2Vib29rLmNvbS9WSUNFIiwKICAiZmFjZWJvb2tfcGFnZV9pZCI6IG51bGwsCiAgImluc3RhZ3JhbV91cmwiOiAiaHR0cHM6Ly93d3cuaW5zdGFncmFtLmNvbS9WSUNFIiwKICAieW91dHViZV91cmwiOiAiIiwKICAidHVtYmxyX3VybCI6ICIiLAogICJwaW50ZXJlc3RfdXJsIjogIiIsCiAgInJlZGRpdF91cmwiOiAiaHR0cHM6Ly93d3cucmVkZGl0LmNvbS91c2VyL3ZpY2UiLAogICJyZWRkaXRfaGFuZGxlIjogInZpY2UiLAogICJzb3VuZGNsb3VkX3VybCI6ICIiLAogICJ0d2l0Y2hfdXJsIjogIiIsCiAgInR3aXRjaF9oYW5kbGUiOiBudWxsLAogICJzaXRlX3Byb21vdGlvbmFsX21lc3NhZ2UiOiBudWxsLAogICJjb2xvciI6ICIjMDAwMDAwIiwKICAiZGVrIjogIlRoZSBkZWZpbml0aXZlIGd1aWRlIHRvIGVubGlnaHRlbmluZyBpbmZvcm1hdGlvbi4iCg=="
}
{
"receipt_data": "ICAidHdpdHRlcl91cmwiOiAiaHR0cHM6Ly90d2l0dGVyLmNvbS9WSUNFIiwKICAiZmFjZWJvb2tfdXJsIjogImh0dHBzOi8vd3d3LmZhY2Vib29rLmNvbS9WSUNFIiwKICAiZmFjZWJvb2tfcGFnZV9pZCI6IG51bGwsCiAgImluc3RhZ3JhbV91cmwiOiAiaHR0cHM6Ly93d3cuaW5zdGFncmFtLmNvbS9WSUNFIiwKICAieW91dHViZV91cmwiOiAiIiwKICAidHVtYmxyX3VybCI6ICIiLAogICJwaW50ZXJlc3RfdXJsIjogIiIsCiAgInJlZGRpdF91cmwiOiAiaHR0cHM6Ly93d3cucmVkZGl0LmNvbS91c2VyL3ZpY2UiLAogICJyZWRkaXRfaGFuZGxlIjogInZpY2UiLAogICJzb3VuZGNsb3VkX3VybCI6ICIiLAogICJ0d2l0Y2hfdXJsIjogIiIsCiAgInR3aXRjaF9oYW5kbGUiOiBudWxsLAogICJzaXRlX3Byb21vdGlvbmFsX21lc3NhZ2UiOiBudWxsLAogICJjb2xvciI6ICIjMDAwMDAwIiwKICAiZGVrIjogIlRoZSBkZWZpbml0aXZlIGd1aWRlIHRvIGVubGlnaHRlbmluZyBpbmZvcm1hdGlvbi4iCg=="
}
Parameter and Type | Required | Description |
---|---|---|
receipt_data string |
true | Encoded receipt data returned by Apple upon completion of the in-app purchase |
Products
A Product object contains information about the affiliate products promoted, such as the name, description, price, brand, retailers and currency.
Products Object
Fetch product details by id
HTTP Request
GET https://api.vice.com/<API version>/products/<ID>
{
"id": "608612db832999009a886949",
"name": "I'd Rather Be Dancing Bumper Sticker",
"name_override": 0,
"description": "",
"category": {
// Topic object
...
},
"subcategory": {
// Embeded topic object
...
},
"contributor": {
// Contributor object
...
},
"brand": {
// Brand object
...
},
"currency_id": "5fc7d1caa1a96d008bb68358",
"currency": {
// Currency object
...
},
"retailers": [
// Array of retailers object
...
],
"language": {
// Language object
...
},
"images": [
// Array of images object
...
],
"site": {
// Site object
...
},
"status_id": 3,
"created_at": 1619399387242,
"updated_at": 1619399387242,
"published_at": 1619399387087
}
{
"id": "608612db832999009a886949",
"name": "I'd Rather Be Dancing Bumper Sticker",
"name_override": 0,
"description": "",
"category": {
// Topic object
...
},
"subcategory": {
// Embeded topic object
...
},
"contributor": {
// Contributor object
...
},
"brand": {
// Brand object
...
},
"currency_id": "5fc7d1caa1a96d008bb68358",
"currency": {
// Currency object
...
},
"retailers": [
// Array of retailers object
...
],
"language": {
// Language object
...
},
"images": [
// Array of images object
...
],
"site": {
// Site object
...
},
"status_id": 3,
"created_at": 1619399387242,
"updated_at": 1619399387242,
"published_at": 1619399387087
}
Object Properties
Property and type | Nullable | Description | Example |
---|---|---|---|
id string |
false | ID of the product | 608612db832999009a886949 |
name string |
false | The name of the product | I'd Rather Be Dancing Bumper Sticker. |
name_override number |
false | Flag to determine if the product name will be overwritten | 0 |
description string |
true | Product description | Cool bumper sticker |
category topic object |
true | Primary topic for the product | See topic object for details |
subcategory topic object |
true | Secondary topic for the product | See topic object for details |
contributor contributor object |
true | The product contributor | See contributor object for details |
brand brand object |
true | The product brand | See brand object for details |
currency_id string |
true | Currency ID reference | 5fc7d1caa1a96d008bb68358 |
currency currency object |
true | The product currency | See brand object for details |
retailers array of retailer object |
false | List of the product's retailers | See retailer object for details |
language currency object |
true | The product currency | See brand object for details |
images array of image object |
true | List of the product's images | See image object for details |
site site object |
false | Site the campaign belongs to | See site object For Details |
status_id number |
false | The status of the campaign item | 3 |
created_at number |
false | Date in ms when the object was created | 1619399387242 |
updated_at number |
false | Date in ms when the object was updated | 1619399387242 |
published_at number |
true | Date in ms when the object was/will be published. | 1619399387087 |
Products list
Fetch a list of products, by default this list is ordered by id
HTTP Request
GET https://api.vice.com/<API version>/products
This request will return an array of products objects, for more details on pagination see https://api-docs.vice.com/#pagination
[
// Array of products objects
...
]
Query Parameters
Parameter and Type | Description | Example |
---|---|---|
ids string |
A comma-separated list of specific ids to retrieve. | 608612db832999009a886949,609197698c6812009aa75249 |
category_id string |
Filter products by a given category by id | 5899ce62f857014f069d2384 |
subcategory_id string |
Filter products by a given subcategory by id | 582b24a782c77b49331897f3 |
contributor_id string |
Filter products contributed by a given contributor by id | 57a2057c8cb727dec795ba25 |
brand_id string |
Filter products by a given brand by id | 60c789b55dea980095a74655 |
retailer_id string |
Filter products by a given retailer by id | 607094b28b5e0900969e9008 |
currency_id string |
Filter products by a given currency by id | 5fc7d1caa1a96d008bb68358 |
site_id string |
Filter products by its original site ID where products was generated from | 57a204058cb727dec794c567 |
email string |
Filter topics by contributor email | email@vice.com |
sort string |
Sort based on possible values, see bellow | -first_name |
Sorting Query Parameters Values
Parameter Value | Description |
---|---|
first_name |
Sort by name |
Create or update product
Create or update a product object
Product objects are created/updated when sending a resource create request e.g.
HTTP Request
Create product POST https://api.vice.com/<API version>/products
Update product PATCH https://api.vice.com/<API version>/products/<ID>
POST /<API version>/products
orPATCH /<API version>/products/<ID>
// Write operations are only permitted in v1.1
{
"name": "I'd Rather Be Dancing Bumper Sticker",
"name_override": 0,
"description": "Cool bumper sticker",
"category_id": "5899ce62f857014f069d2384",
"subcategory_id": "582b24a782c77b49331897f3",
"contributor_id": "57a2091c154cbfdf93225340",
"brand_id": "6091972f837ff80094508fd4",
"currency_id": "5fc7d1caa1a96d008bb68358",
"retailer_id": "607094b28b5e0900969e9008"
"language_id": "31353736383164373124e0bb",
"site_id": "57a204058cb727dec794c567",
"status_id": 3,
"created_at": 1619399387242,
"updated_at": 1619399387242,
"published_at": 1619399387087,
}
Property and type | Nullable | Description | Example |
---|---|---|---|
name string |
false | The name of the product | I'd Rather Be Dancing Bumper Sticker. |
name_override number |
false | Flag to determine if the product name will be overwritten | 0 |
description string |
true | Product description | Cool bumper sticker |
category_id string |
true | ID of the category | 5899ce62f857014f069d2384 |
subcategory_id string |
true | ID of the subcategory | 582b24a782c77b49331897f3 |
contributor_id string |
true | ID of the contributor | 57a2091c154cbfdf93225340 |
brand_id string |
true | ID of the brand | 6091972f837ff80094508fd4 |
currency_id string |
true | ID of the currency | 5fc7d1caa1a96d008bb68358 |
retailer_id string |
true | ID of the category | 607094b28b5e0900969e9008 |
language_id string |
true | ID of the language | 31353736383164373124e0bb |
site_id string |
true | ID of the site | 57a204058cb727dec794c567 |
status_id enum(1,2,3,4,5) |
true | Status code that represents published state of the product | 3 |
created_at number |
true | Date in ms when the object was created | 1619399387242 |
updated_at number |
true | Date in ms when the object was updated | 1619399387242 |
published_at number |
true | Date in ms when the object was/will be published. | 1619399387087 |
Delete product
Removes product from visibility
HTTP Request
DELETE https://api.vice.com/<API version>/products/<ID>
Get product image object
Fetch product image objects, for more details see image object.
HTTP Request
Fetch an image
GET https://api.vice.com/<API version>/products/<ID>/images
[
// Array of image objects
...
]
[
// Array of image objects
...
]
Add or update product image objects
Adds an image to the product, see image object for details on how to create or update an image resource. Only possible image types for products is gallery-image
HTTP Request
Add an image
POST https://api.vice.com/<API version>/products/<ID>/gallery-image
// Write operations are only permitted in v1.1
{
"product_id": "609197698c6812009aa75249",
"image_type": "gallery-image", // Forcing this value
// Image object
...
}
Property and type | Nullable | Description | Example |
---|---|---|---|
product_id string |
false | The id of the product | 609197698c6812009aa75249 |
image_type enum('gallery-image') |
false | Image type, send in the url | gallery-image |
crop_<WIDTH_RATIO>_<HEIGHT_RATIO> string |
true | Crop string of the possible crops by ratio (width_height) | 16_9 |
caption string |
true | Image caption | Super image caption |
credit string |
true | Image credit | Joe Cool |
cover_json string |
true | Json representation of lede unit, for internal use only | {} |
file stream |
false | File to be uploaded, see above for supported content types and encodings | `` |
Update an image
PATCH https://api.vice.com/<API version>/products/<ID>/gallery-image/<IMAGE ID>
Add product embedded retailers
Adds an embedded retailer to the product, see retailer object for details on how to create or update a retailer resource.
HTTP Request
Add an embedded retailer
POST https://api.vice.com/<API version>/products/<ID>/retailers
POST /<API version>/products/<ID>/retailers
// Write operations are only permitted in v1.1
{
"product_id": "609197698c6812009aa75249",
"retailer_id": "607094b28b5e0900969e9008",
"product_url": "https://us.romwe.com/Chicken-Crossbody-Bag-p-633596-cat-1031.html",
"price": "12.50",
"sale_price": "9.99",
"sponsorship_flag": 0,
"impression_tracker_url": "",
"click_tracker_url": ""
}
Property and type | Nullable | Description | Example |
---|---|---|---|
product_id string |
false | ID of the product | 609197698c6812009aa75249 |
retailer_id string |
false | ID of the retailer | 607094b28b5e0900969e9008 |
product_url string |
false | URL of the product | https://us.romwe.com/Chicken-Crossbody-Bag-p-633596-cat-1031.html |
price string |
true | The regular price of the product | 12.50 |
sale_price string |
true | The sale price of the product | 9.99 |
sponsorship_flag enum(0,1) |
true | Flag to show sponsored object | 0 |
impression_tracker_url string |
true | The url to track impressions | https://vice.com/analytics/impression_tracker |
click_tracker_url string |
true | The url to track number of clicks | https://vice.com/analytics/click_tracker |
Delete product embedded retailers
Removes product embedded retailer
HTTP Request
DELETE https://api.vice.com/<API version>/products/<ID>/retailers/<RETAILER ID>
Brands
A Brand is a resource that allows you to curate collections of products.
Brand Object
Fetch brand details by id
HTTP Request
GET https://api.vice.com/<API version>/brands/<ID>
{
"id": "607094e3b1883e009d7e3268",
"name": "ROMWE",
"created_at": 1617990883165,
"updated_at": 1617990883165
}
{
"id": "607094e3b1883e009d7e3268",
"name": "ROMWE",
"created_at": 1617990883165,
"updated_at": 1617990883165
}
Object Properties
Property and type | Nullable | Description | Example |
---|---|---|---|
id string |
false | ID of the brand | 607094e3b1883e009d7e3268 |
name string |
false | The name of the brand | ROMWE |
created_at number |
false | Date in ms when the object was created | 1617990883165 |
updated_at number |
false | Date in ms when the object was updated | 1617990883165 |
Brands list
Fetch a list of brands, by default this list is ordered by id
HTTP Request
GET https://api.vice.com/<API version>/brands
This request will return an array of brands objects, for more details on pagination see https://api-docs.vice.com/#pagination
[
// Array of brands objects
...
]
Query Parameters
Parameter and Type | Description | Example |
---|---|---|
ids string |
A comma-separated list of specific ids to retrieve. | 608612db832999009a886949,609197698c6812009aa75249 |
sort string |
Sort based on possible values, see bellow | -name |
Sorting Query Parameters Values
Parameter Value | Description |
---|---|
name |
Sort by name |
Create or update brand
Create or update a brand object
brand objects are created/updated when sending a resource create request e.g.
HTTP Request
Create brand POST https://api.vice.com/<API version>/brands
Update brand PATCH https://api.vice.com/<API version>/brands/<ID>
POST /<API version>/brands
orPATCH /<API version>/brands/<ID>
// Write operations are only permitted in v1.1
{
"name": "ROMWE",
}
Property and type | Nullable | Description | Example |
---|---|---|---|
name string |
false | The name of the brand | ROMWE |
Delete brand
Removes brand from visibility
HTTP Request
DELETE https://api.vice.com/<API version>/brands/<ID>
Currencies
A Currency is a resource that allows you to curate collections of products.
Currency Object
Fetch currency details by id
HTTP Request
GET https://api.vice.com/<API version>/currencies/<ID>
{
"id": "5fc7d1caa1a96d008bb68358",
"name": "US Dollar",
"code": "USD"
}
{
"id": "5fc7d1caa1a96d008bb68358",
"name": "US Dollar",
"code": "USD"
}
Object Properties
Property and type | Nullable | Description | Example |
---|---|---|---|
id string |
false | ID of the currency | 5fc7d1caa1a96d008bb68358 |
name string |
false | The name of the currency | US Dollar |
code string |
false | The code of the currency (must be unique for the currency's site/locale scope) | USD |
Currencies list
Fetch a list of currencies, by default this list is ordered by id
HTTP Request
GET https://api.vice.com/<API version>/currencies
This request will return an array of currency objects, for more details on pagination see https://api-docs.vice.com/#pagination
[
// Array of currency objects
...
]
Query Parameters
Parameter and Type | Description | Example |
---|---|---|
ids string |
A comma-separated list of specific ids to retrieve. | 5fc7d1caa1a96d008bb68358,6269fa9f930d5e8384f9308e |
sort string |
Sort based on possible values, see bellow | -name |
Sorting Query Parameters Values
Parameter Value | Description |
---|---|
name |
Sort by name |
Create or update currency
Create or update a currency object
currency objects are created/updated when sending a resource create request e.g.
HTTP Request
Create currency POST https://api.vice.com/<API version>/currencies
Update currency PATCH https://api.vice.com/<API version>/currencies/<ID>
POST /<API version>/currencies
orPATCH /<API version>/currencies/<ID>
// Write operations are only permitted in v1.1
{
"name": "US Dollar",
"code": "USD"
}
Property and type | Nullable | Description | Example |
---|---|---|---|
name string |
false | The name of the currency | US Dollar |
code string |
false | The code of the currency (must be unique for the currency's site/locale scope) | USD |
Delete currency
Removes currency from visibility
HTTP Request
DELETE https://api.vice.com/<API version>/currencies/<ID>
Retailers
A Retailer is a resource that allows you to curate collections of products.
Retailer Object
Fetch Retailer details by id
HTTP Request
GET https://api.vice.com/<API version>/retailers/<ID>
{
"id": "607094b28b5e0900969e9008",
"name": "ROMWE",
"created_at": 1617990834402,
"updated_at": 1617990834402
}
{
"id": "607094b28b5e0900969e9008",
"name": "ROMWE",
"created_at": 1617990834402,
"updated_at": 1617990834402
}
Object Properties
Property and type | Nullable | Description | Example |
---|---|---|---|
id string |
false | ID of the retailer | 607094b28b5e0900969e9008 |
name string |
false | The name of the retailer | ROMWE |
created_at number |
false | Date in ms when the object was created | 1617990834402 |
updated_at number |
false | Date in ms when the object was updated | 1617990834402 |
Retailers list
Fetch a list of retailers, by default this list is ordered by id
HTTP Request
GET https://api.vice.com/<API version>/retailers
This request will return an array of retailer objects, for more details on pagination see https://api-docs.vice.com/#pagination
[
// Array of retailer objects
...
]
Query Parameters
Parameter and Type | Description | Example |
---|---|---|
ids string |
A comma-separated list of specific ids to retrieve. | 607094b28b5e0900969e9008,60774f3a6f086c009c40919e |
sort string |
Sort based on possible values, see bellow | -name |
Sorting Query Parameters Values
Parameter Value | Description |
---|---|
name |
Sort by name |
Create or update retailer
Create or update a retailer object
retailer objects are created/updated when sending a resource create request e.g.
HTTP Request
Create retailer POST https://api.vice.com/<API version>/retailers
Update retailer PATCH https://api.vice.com/<API version>/retailers/<ID>
POST /<API version>/retailers
orPATCH /<API version>/retailers/<ID>
// Write operations are only permitted in v1.1
{
"name": "ROMWE"
}
Property and type | Nullable | Description | Example |
---|---|---|---|
name string |
false | The name of the retailer | ROMWE |
Delete retailer
Removes retailer from visibility
HTTP Request
DELETE https://api.vice.com/<API version>/retailers/<ID>
Consumables
Manage record of in-app purchases for one-time, consumable products. These endpoints provide server-side verification with Apple and allow for record keeping of users' 'balances' of each product offering.
Retrieve User's Balances
Fetch an aggregate list of each product the current user has purchased and their remaining balance of unused items for each, based on the user ID associated with the passed in token.
HTTP Request
GET https://api.vice.com/<API Version>/consumables
[
{
"product_id": "friendRequestAllowance",
"balance": 5
},
{
"product_id": "compatibilityCheckAllowance",
"balance": 3
}
]
[
{
"product_id": "friendRequestAllowance",
"balance": 5
},
{
"product_id": "compatibilityCheckAllowance",
"balance": 3
}
]
Object Properties
Property and Type | Nullable | Description | Example |
---|---|---|---|
product_id string |
false | Product ID from iTunes Connect | friendRequestAllowance |
balance number |
false | Remaining balance of unused purchases for this product | 5 |
Notify API of New In-App Purchase
Creates a purchase record with details from Apple's in-app purchase receipt, linked to our user ID from the passed in token.
HTTP Request
POST https://api.vice.com/<API Version>/consumables
{
"receipt_data": "ICAidHdpdHRlcl91cmwiOiAiaHR0cHM6Ly90d2l0dGVyLmNvbS9WSUNFIiwKICAiZmFjZWJvb2tfdXJsIjogImh0dHBzOi8vd3d3LmZhY2Vib29rLmNvbS9WSUNFIiwKICAiZmFjZWJvb2tfcGFnZV9pZCI6IG51bGwsCiAgImluc3RhZ3JhbV91cmwiOiAiaHR0cHM6Ly93d3cuaW5zdGFncmFtLmNvbS9WSUNFIiwKICAieW91dHViZV91cmwiOiAiIiwKICAidHVtYmxyX3VybCI6ICIiLAogICJwaW50ZXJlc3RfdXJsIjogIiIsCiAgInJlZGRpdF91cmwiOiAiaHR0cHM6Ly93d3cucmVkZGl0LmNvbS91c2VyL3ZpY2UiLAogICJyZWRkaXRfaGFuZGxlIjogInZpY2UiLAogICJzb3VuZGNsb3VkX3VybCI6ICIiLAogICJ0d2l0Y2hfdXJsIjogIiIsCiAgInR3aXRjaF9oYW5kbGUiOiBudWxsLAogICJzaXRlX3Byb21vdGlvbmFsX21lc3NhZ2UiOiBudWxsLAogICJjb2xvciI6ICIjMDAwMDAwIiwKICAiZGVrIjogIlRoZSBkZWZpbml0aXZlIGd1aWRlIHRvIGVubGlnaHRlbmluZyBpbmZvcm1hdGlvbi4iCg==",
"was_redeemed": false
}
{
"receipt_data": "ICAidHdpdHRlcl91cmwiOiAiaHR0cHM6Ly90d2l0dGVyLmNvbS9WSUNFIiwKICAiZmFjZWJvb2tfdXJsIjogImh0dHBzOi8vd3d3LmZhY2Vib29rLmNvbS9WSUNFIiwKICAiZmFjZWJvb2tfcGFnZV9pZCI6IG51bGwsCiAgImluc3RhZ3JhbV91cmwiOiAiaHR0cHM6Ly93d3cuaW5zdGFncmFtLmNvbS9WSUNFIiwKICAieW91dHViZV91cmwiOiAiIiwKICAidHVtYmxyX3VybCI6ICIiLAogICJwaW50ZXJlc3RfdXJsIjogIiIsCiAgInJlZGRpdF91cmwiOiAiaHR0cHM6Ly93d3cucmVkZGl0LmNvbS91c2VyL3ZpY2UiLAogICJyZWRkaXRfaGFuZGxlIjogInZpY2UiLAogICJzb3VuZGNsb3VkX3VybCI6ICIiLAogICJ0d2l0Y2hfdXJsIjogIiIsCiAgInR3aXRjaF9oYW5kbGUiOiBudWxsLAogICJzaXRlX3Byb21vdGlvbmFsX21lc3NhZ2UiOiBudWxsLAogICJjb2xvciI6ICIjMDAwMDAwIiwKICAiZGVrIjogIlRoZSBkZWZpbml0aXZlIGd1aWRlIHRvIGVubGlnaHRlbmluZyBpbmZvcm1hdGlvbi4iCg==",
"was_redeemed": false
}
Parameter and Type | Required | Description |
---|---|---|
receipt_data string |
true | Encoded receipt data returned by Apple upon completion of the in-app purchase |
was_redeemed boolean |
false | Defaults to true . Indicates whether or not this purchase was redeemed at the time of purchasing. If false , the user's available balance of this product type will be incremented and will be available for redemtion at a later time. |
Notify API of Redemption of Available Prior In-App Purchase
If an in-app purchase has been made at an earlier time, but not redeemed right away, the user will have an available balance for that product type. This endpoint can be used to decrement the available balance of the appropriate product type.
HTTP Request
POST https://api.vice.com/<API Version>/consumables/redeem
{
"product_id": "friendRequestAllowance"
}
{
"product_id": "friendRequestAllowance"
}
Parameter and Type | Required | Description |
---|---|---|
product_id string |
true | Product ID that is being redeemed |
Response
Returns the new aggregate available balance of only the product redeemed.
{
"product_id": "friendRequestAllowance",
"balance": 3
}
{
"product_id": "friendRequestAllowance",
"balance": 3
}
Parameter and Type | Nullable | Description | Example |
---|---|---|---|
product_id string |
false | Product ID from iTunes Connect | friendRequestAllowance |
balance number |
false | The new balance of the product type after redeeming one | 3 |
For You
/for_you
can best be thought of as a series of endpoints that are proxied through a personalization service which uses a daily-trained ML model that attempts to predict which topics and content attributes are best suited for particular users. Unless otherwise noted, the query parameters accepted by a /for_you/*
endpoint are generally the same as its non-personalized counterpart.
Latest
Returns a list of the newest articles or videos, first sorted in descending published_at
order, and then reshuffled if the user has been trained into the model.
HTTP Request
GET https://api.vice.com/<API version>/for_you/latest
This request will return an array of article or video objects, for more details on pagination see https://api-docs.vice.com/#pagination
[
// Array of article or video objects
...
]
Query Parameters
Parameter and Type | Description | Example |
---|---|---|
anon_id string (required) |
Anonymous user id to personalize response for | 003bc9c3-0440-4812-b803-806e44d61207 |
nsfw boolean |
Filter results by not safe for work flag | true |
contributor_id string |
Filters results to only those associated with the given contributor | 59dcea52ae54a32d39706782 |
section_id string (comma separated) |
Filters results to only those associated with the given section(s) | 59dcea52ae54a32d39706782,59dcea52ae54a32d39706783 |
type 'videos' or 'articles' |
Only return resources of the given type. If excluded will return both | articles |
not_id string |
Exclude resources with this id from the returned results | 59dcea52ae54a32d39706782 |
Related Content List
Fetch a list of articles or videos related to the current article or video, first sorted by similar to the current record then reshuffled if the user has been trained into the model.
HTTP Request
GET https://api.vice.com/<API version>/related/<articles|videos>/<ID>
This request will return an array of articles or videos, for more details on pagination see https://api-docs.vice.com/#pagination
[
// Array of article or video objects
...
]
Query Parameters
Parameter and Type | Description | Example |
---|---|---|
anon_id string (required) |
Anonymous user id to personalize response for | 003bc9c3-0440-4812-b803-806e44d61207 |
content_window_size number |
Number of records to fetch from the base endpoint before resorting | 10 |
model 'articles' or 'videos' |
Type of content to return | articles |
date_range string |
Filter results by their published date using either an English timespan or a YYYYMMDD range. | 2_hours , 5_days , 20190803-2019-0808 |