collection.relatedGroups

Compare a range of texts against your groups.

Request Parameters

collection_idint (required)
min_text_idint (required) (default: 1)

Start on this text id

limitint (default: 1000)

Number of texts from the "min_text_id" it will produce results for.

waitint (default: 60)

Max wait time.

min_thresholddouble (default: 0)

Minimum relevance to return.

max_thresholddouble (default: 1)

Max relevance to return.

group_scopeint (default: all your groups)
The group ids you want the text to be compared against. Can either be a single integer or an array containing many groups e.g. "group_scope":[1,32,54]

Response Parameters

See example code

Code Examples

JSON

//Response
{
  "id":0,
  "result":{
    "texts":[
      {
        "collection_id":68,
        "text_id":11,
        "ext_text_id":"174278984849309696",
        "related_groups":[
         {
            "name":"Economy",
            "group_id":154,
            "relevance":0.18
          },
          {
            "name":"Sport",
            "group_id":6856,
            "relevance":0.82
          },
          {
            "name":"Politics",
            "group_id":8971,
            "relevance":0.16
          }]
      },
      {
        "collection_id":68,
        "text_id":10,
        "ext_text_id":"174278984849309697",
        "related_groups":[
          {
            "name":"Economy",
            "group_id":154,
            "relevance":0.62
          },
          {
            "name":"Sport",
            "group_id":6856,
            "relevance":0.12
          },
          {
            "name":"Politics",
            "group_id":8971,
            "relevance":0.67
          }]
      }]
  },
  "jsonrpc":"2.0"
}