Fetch recommendations [GET]
GET /recommend
Retrieves recommendations for the userId
provided as parameter.
Headers
ApiKey:string
- Engine ApiKey
Parameters
userId:string
- (Required) BiskoId of the user.
currentItemId:string
- (Optional) Id of the item user is currently reading.
domain:string
- (Optional) Current domain that the user is visiting.
page:int
- (Optional) Page number (0 based)
size:int
- (Required) Number of articles per page
diversification:boolean
- (Optional, default true
)
pageToken:string
- (Optional for first page, Required on following pages)
Example request
curl -v "https://{engine-name}.gjirafa.ai/recommend?userId={userId}&size=2" \
-H "ApiKey:{api_key}" \
-X "GET"
Example response
{
"items": [
{
"itemId": "1",
"domain": "www.example.com",
"title": "Example Article 1",
"category": null,
"url": "https://www.example.com/article-1",
"imageUrl": "https://cdn.example.com/article-1",
"publishDate": "2022-09-15T09:45:00+00:00",
"locked": "False",
"hasVideo": null,
"requestId": "5497b0f1-0551-4dd2-826f-7f581c931477",
},
{
"itemId": "2",
"domain": "www.example.com",
"title": "Example Article 2",
"category": null,
"url": "https://www.example.com/article-2",
"imageUrl": "https://cdn.example.com/article-2",
"publishDate": "2022-09-15T09:45:00+00:00",
"locked": "True",
"hasVideo": "False",
"requestId": "5497b0f1-0551-4dd2-826f-7f581c931477",
}
],
"pageToken": "2a463502-ca5e-4df5-94dd-8d852d477ed7",
"totalSize": 14,
"totalPages": 7,
"hasNextPage": true,
"requstId": "5497b0f1-0551-4dd2-826f-7f581c931477"
}