# Personal Content API

## Get Personal Content

<mark style="color:blue;">`GET`</mark> `https://contentapi.celltick.com/mediaApi/v1.0/personal/content`

Method returns content based on user past reading preferences.\
API can also filter out already read articles by user (Partner settings level)

#### Query Parameters

| Name              | Type    | Description                                                                                                                                                                                                                          |
| ----------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| vendorFilter      | string  | Filtered out comma separated list of content providers                                                                                                                                                                               |
| vendor            | string  | comma separated list of content providers                                                                                                                                                                                            |
| team              | string  | comma separated team list of Wikipedia ids                                                                                                                                                                                           |
| person            | string  | comma separated person list of Wikipedia ids                                                                                                                                                                                         |
| topic             | string  | comma separated topic list names or Wikipedia ids. In case extended search is needed, add :ext to topic name. (e.g. weather:ext)                                                                                                     |
| sortBy            | string  | <p>Parameter used to allow content sort by "newest" articles first (in descending order). When using the 'sortBy' parameter it overrides the "personal" method.<br>In case parameter not in use, content order define by System.</p> |
| thumbImgQuality   | integer | Set thumbnail image quality (e.g. 30 is 30% of the original quality)                                                                                                                                                                 |
| thumbImgWidth     | integer | Set thumbnail image width (pixels)                                                                                                                                                                                                   |
| thumbImgHeight    | integer | Set thumbnail image height (pixels)                                                                                                                                                                                                  |
| offset            | integer | <p>For paging only.<br>When offset=0 returns all query content items.</p>                                                                                                                                                            |
| limit             | integer | <p>Limits the number of returned content items. <br>Default is 20.</p>                                                                                                                                                               |
| language          | string  | 2 letter language code (ISO 639-1)                                                                                                                                                                                                   |
| localCountryCode  | string  | <p>Allows fetching categories by local country<br>2 letter country code (ISO-ALPHA-2)</p>                                                                                                                                            |
| originCountryCode | string  | <p>Allows fetching categories by origin country<br>2 letter country code (ISO-ALPHA-2)</p>                                                                                                                                           |
| countryCode       | string  | <p>Allows fetching content by country.<br>2 letter country code (ISO-ALPHA-2)</p>                                                                                                                                                    |
| tag               | string  | Allows fetching content by tag names (case insensitive) \[one or more]                                                                                                                                                               |
| categoryFilter    | string  | <p>Allow filter out content by category names \[one or more]<br>e.g. categoryFilter=Sports,News</p>                                                                                                                                  |
| category          | string  | <p>Allows fetching content by specific category names \[one ot more]<br>e.g. category=Sports,News<br>(Case insensitive)</p>                                                                                                          |
| publishedAfter    | string  | <p>Allows fetching content from point in time and on.<br>Date/time of publication format is:<br>"MM/dd/yyyy hh:mm:ss"</p>                                                                                                            |
| optOut            | string  | <p>Allowed values are:<br>true/false</p>                                                                                                                                                                                             |
| aid               | string  | Mandatory in case of android application                                                                                                                                                                                             |
| userId            | string  | Source user id (UUID)                                                                                                                                                                                                                |

{% tabs %}
{% tab title="200 Returned articles example:" %}

```markup
{
totalItems: 3,
content: [
{
contentId: "a6645bc6-34ab-4c88-a9ba-5e088b4bee56",
title: "Olly Murs pranks fans with fake bad haircut",
summary: "Olly Murs made his fans believe he had gotten a bad haircut in a silly prank on social media on Thursday (01.11.18).",
contentSource: "BangShowbiz",
contentSourceDisplay: "BangShowbiz",
categories: [
"Entertainment"
],
categoriesEnglish: [
"Entertainment"
],
origURL: "",
images: {
mainImage: {
url: "https://imageca.thestartmagazine.com/upload/d_m_Entertainment06.jpg,c_fill,g_auto,fl_lossy,q_30,w_480/v1541073898/bangshowbiz_1706497.jpg",
width: 650,
height: 1000,
caption: ""Olly Murs pranks fans (c) Twitter""
},
mainImageThumbnail: {
url: "https://imageca.thestartmagazine.com/upload/d_m_Entertainment06.jpg,c_fill,g_auto,fl_lossy,q_30,w_270,h_190/v1541073898/bangshowbiz_1706497.jpg",
width: 270,
height: 190,
quality: 30,
caption: ""Olly Murs pranks fans (c) Twitter""
},
additionalImages: [ ]
},
countries: [
"AE",
"AU",
"BS",
"CA",
"CY",
"EG",
"GB",
"GR",
"HK",
"ID",
"IE",
"IL",
"IN",
"JM",
"JO",
"KW",
"LK",
"LY",
"MY",
"NG",
"NZ",
"PH",
"PK",
"QA",
"SD",
"SG",
"TH",
"US",
"VN",
"ZA",
"WW"
],
locale: "en_GB",
publishedAt: 1541073600,
tags: [
"olly murs"
],
views: 0,
isPreview: false,
contentURL: "https://www.thestartmagazine.com/article/a6645bc6-34ab-4c88-a9ba-5e088b4bee56?ref=TWFnYXppbmVfZnJvbV9TdGFydGVyJSQlWEU0bjNadDcyWEtQMWNpU3cxZ1pDNzd0OUdmMGJrT3AlJCUxMzU3OTg2NDI%3D&countryCode=US&language=en&vendorFilter=Livescreen&recommendationId=TIME_BL",
recommendationId: "TIME_BL"
},
{
contentId: "25e948f2-16dd-42ee-9afd-67fb2307135a",
title: "Ray Fisher: I want Zack Snyder to direct Cyborg movie",
summary: "Ray Fisher wants Zack Snyder to direct the 'Cyborg' solo movie, after previously working with him on 'Batman v Superman: Dawn of Justice' and 'Justice League'.",
contentSource: "BangShowbiz",
contentSourceDisplay: "BangShowbiz",
categories: [
"Movies"
],
categoriesEnglish: [
"Movies"
],
origURL: "",
images: {
mainImage: {
url: "https://imageca.thestartmagazine.com/upload/d_m_Movies08.jpg,c_fill,g_auto,fl_lossy,q_30,w_480/v1541073873/bangshowbiz_1706427.jpg",
width: 650,
height: 1000,
caption: ""Ray Fisher""
},
mainImageThumbnail: {
url: "https://imageca.thestartmagazine.com/upload/d_m_Movies08.jpg,c_fill,g_auto,fl_lossy,q_30,w_270,h_190/v1541073873/bangshowbiz_1706427.jpg",
width: 270,
height: 190,
quality: 30,
caption: ""Ray Fisher""
},
additionalImages: [ ]
},
countries: [
"AE",
"AU",
"BS",
"CA",
"CY",
"EG",
"GB",
"GR",
"HK",
"ID",
"IE",
"IL",
"IN",
"JM",
"JO",
"KW",
"LK",
"LY",
"MY",
"NG",
"NZ",
"PH",
"PK",
"QA",
"SD",
"SG",
"TH",
"US",
"VN",
"ZA",
"WW"
],
locale: "en_GB",
publishedAt: 1541073600,
tags: [
"ray fisher",
"zack snyder",
"epus-movies"
],
views: 0,
isPreview: false,
contentURL: "https://www.thestartmagazine.com/article/25e948f2-16dd-42ee-9afd-67fb2307135a?ref=TWFnYXppbmVfZnJvbV9TdGFydGVyJSQlWEU0bjNadDcyWEtQMWNpU3cxZ1pDNzd0OUdmMGJrT3AlJCUxMzU3OTg2NDI%3D&countryCode=US&language=en&vendorFilter=Livescreen&recommendationId=TIME_BL",
recommendationId: "TIME_BL"
},
{
contentId: "189bf8c7-3507-4477-91ab-3873799a3b2e",
title: "Kris Jenner nearly 'wets herself' during spooky TV prank",
summary: "Kris Jenner admitted she nearly "wet herself" whens he was jumped out on by a zombie during her appearance on 'The Ellen DeGeneres Show'.",
contentSource: "BangShowbiz",
contentSourceDisplay: "BangShowbiz",
categories: [
"Entertainment"
],
categoriesEnglish: [
"Entertainment"
],
origURL: "",
images: {
mainImage: {
url: "https://imageca.thestartmagazine.com/upload/d_m_Entertainment40.jpg,c_fill,g_auto,fl_lossy,q_30,w_480/v1541073899/bangshowbiz_1706447.jpg",
width: 650,
height: 1000,
caption: ""Kris Jenner in Ellen DeGeneres Show prank (c) Instagram""
},
mainImageThumbnail: {
url: "https://imageca.thestartmagazine.com/upload/d_m_Entertainment40.jpg,c_fill,g_auto,fl_lossy,q_30,w_270,h_190/v1541073899/bangshowbiz_1706447.jpg",
width: 270,
height: 190,
quality: 30,
caption: ""Kris Jenner in Ellen DeGeneres Show prank (c) Instagram""
},
additionalImages: [ ]
},
countries: [
"AE",
"AU",
"BS",
"CA",
"CY",
"EG",
"GB",
"GR",
"HK",
"ID",
"IE",
"IL",
"IN",
"JM",
"JO",
"KW",
"LK",
"LY",
"MY",
"NG",
"NZ",
"PH",
"PK",
"QA",
"SD",
"SG",
"TH",
"US",
"VN",
"ZA",
"WW"
],
locale: "en_GB",
publishedAt: 1541073600,
tags: [
"kris jenner",
"corey gamble",
"kylie jenner",
"ellen degeneres"
],
views: 0,
isPreview: false,
contentURL: "https://www.thestartmagazine.com/article/189bf8c7-3507-4477-91ab-3873799a3b2e?ref=TWFnYXppbmVfZnJvbV9TdGFydGVyJSQlWEU0bjNadDcyWEtQMWNpU3cxZ1pDNzd0OUdmMGJrT3AlJCUxMzU3OTg2NDI%3D&countryCode=US&language=en&vendorFilter=Livescreen&recommendationId=TIME_BL",
recommendationId: "TIME_BL"
}
]
}
```

{% endtab %}
{% endtabs %}

## How does the Personalization feature work?

When user opens the feed for the first time, Start Magazine will return content based on its general algorithm. After a user reads a few articles he will notice that more and more articles match his previous choices.

After a while, a user re-opening a feed will see the articles with content similar to previous clicks. The system allows to control the content mix of his feed, time based, and/or personal types of articles.&#x20;

For example:

![](https://1367858755-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LNvQ4xO1k3yQzNY8qb6%2F-LQ95dBy_cZCJFNF88dM%2F-LQ9G-EyzBfgXlTqQb5Q%2FPersonal.jpg?alt=media\&token=75588a10-f7c1-473e-9592-df0d8a150d7a)

If the user reads more articles related to Sports, when reopening the feed after a certain time, he will see mostly sport articles.

## How do I implement personalization using the API?

* Request personal content API:\
  <https://contentapi.celltick.com/mediaApi/v1.0/personal/content?publisherId=publisherId&key=key&userId=aba9334a-dcf3-4396-9a31-4fa386688aa4&countryCode=US&language=en&limit=50&offset=0>
* Build the feed page you want with the returned content.

  For example:

![](https://1367858755-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LNvQ4xO1k3yQzNY8qb6%2F-LQ95dBy_cZCJFNF88dM%2F-LQ9HRAXSsA55JPXjTpB%2Fpersonal%201.jpg?alt=media\&token=7ed33b25-0c4c-4419-bd0e-ac8d6ed7eeea)

* Try to click some articles you like, once you do, Start Magazine will begin to save the article list you see in its cache.
* After a few minutes, reopen the feed. You will see your favorite article types populating.

## What else should I keep in mind before implementation?

* The Personalization feature is only suitable for the C-S model. That means the client must communicate directly with the Start Magazine server.
* The userId should be unique for each user. This is a critical requirement because the server will recognize each user according to his or her unique userId, and thereby return personalized article lists. The best format is UUID.
