We’ve migrated our documentation to a new site, which means some URLs have changed.
Audience

/profile/content/related

Retrieves a set of keywords sorted with their relative relevancy to one or more keywords provided by the user. I.e,, returns other keywords which are biased towards co-occurring with the keyword (or set of keywords) specified by the user.

Possible use cases include finding related queries, or finding good bid phrases for an ad campaign.

The user must be authenticated and have read permissions to the specified site.

Some restrictions on use may apply. Please contact your Cxense representative for further details.


Request

The default keyword groups are: person, location, company, concept, entity, category, taxonomy.

The request object has the following fields:

Name

Type

Required

Description

siteId

String

Yes

The site whose content profiles to aggregate over.

start

Integer or String

No

The start time of the period to compute the statistics over according to

Traffic time specification

. Default value is -1h. Must not be before -24h.

stop

Integer or String

No

The stop time of the period to compute the statistics over according to

Traffic time specification

. Default value is 0, i.e., now.

keywords

Array of Object

Yes

Array of keyword objects, as defined below. These keywords will be used to retrieve related keywords.

groups

Array of String

No

Retrieve keywords from these keyword groups, e.g., person, company, etc. If not specified, the method will consider keywords from the default groups.

count

Integer

No

Maximum number of keywords to return. Default value is 10.

A keyword object has the following fields:

Name

Type

Required

Description

group

String

No

Represents the category or type of information. If no group is specified, the default groups will be considered.

item

String

Yes

Item extracted or generated from the page content. Usually a string or keyword extracted from the page.

Response

The response object has the following fields:

Name

Type

Description

relatedItems

Array of Object

The sorted array of score-augmented keyword objects.

A score-augmented keyword object has the following fields:

Name

Type

Description

group

String

Represents the category or type of information.

item

String

Item extracted or generated from the page content. Usually a string or keyword extracted from the page.

score

Number

A relatedness score which represents how related this keyword is to the keyword(s) provided in the request.

Examples

Bash
$ python cx.py /profile/content/related '{"siteId":"12345","start":"-10h","groups":["person","concept","location"],"keywords":[{"group":"category","item":"kultur"}]}'
 {
 "relatedItems": [
 {
 "group": "concept",
 "item": "filmen",
 "score": 6.673259296115762
 },
 {
 "group": "concept",
 "item": "bok",
 "score": 6.5355857713300365
 },
 {
 "group": "location",
 "item": "hollywood",
 "score": 5.684687796990233
 }
 ]
 }
Bash
$ python cx.py /profile/content/related '{"siteId":"12345","count":8,"groups":["entity","company","concept","person"],"start":-36000,"stop":0,"keywords":[{"group":"company","item":"apple"}]}'
 {
 "relatedItems": [
 {
 "group": "entity",
 "item": "android",
 "score": 11.153299053027183
 },
 {
 "group": "person",
 "item": "steve jobs",
 "score": 10.072601232291724
 },
 {
 "group": "entity",
 "item": "iphone 5",
 "score": 9.926005958994727
 },
 {
 "group": "entity",
 "item": "ios",
 "score": 9.772256925315158
 },
 {
 "group": "concept",
 "item": "iphone",
 "score": 9.260122383645063
 },
 {
 "group": "entity",
 "item": "gadgetoblog",
 "score": 9.069080250868106
 },
 {
 "group": "concept",
 "item": "ipad",
 "score": 8.162527846313818
 },
 {
 "group": "concept",
 "item": "tableta",
 "score": 8.162527846313818
 }
 ]
 }

Last updated: