Neticle Data API


This documentation describes the current version of Neticle’s Data API.

Current version is 2.0.1, released at 2019.02.25.

NOTE: This document is a work in progress.

Rate Limit

From one IP address with a valid Token, 60 requests can be made within a minute.

Token

Token

In each API request, a JWT token provided by Neticle token must be included in the header in bearer authorization format:

    "Authorization": "Bearer <Token>"
  • NOTE: The token is valid for 365 days.

  • NOTE: Endpoints coming soon.

Users
Me

Retrieve user's details

Returns the user’s details, including the clients/profiles/keywords available for the user.

REQUEST

Headers
Authorization Bearer <Token>

RESPONSE

Headers
Content-Type application/json
200 application/json
                        {
    "user": {
        "id": 1,
        "lang": "hu",
        "name": "Demo User",
        "email": "[email protected]",
        "admin": 0,
        "enabled": 1,
        "client_id": 1,
        "selected_region": "hu",
        "client_name": "demo_client",
        "client_label": "Demo Client",
        "user_group_id": 3,
        "iat": 1550135513,
        "exp": 1551345113
    },
    "resources": {
        "1": {              // client_id
            "1": {          // profile_id
                "1": true,  // keyword_id
                "2": true,
                "3": true
            }
        }
    }
}

                      
                        
                      
Countries
Country

Retrieve all Countries

Returns all available Countries.

REQUEST

Headers
Authorization Bearer <Token>

RESPONSE

Headers
Content-Type application/json
200 application/json
                        [
    {
        "id": 1,
        "neticle_country_code": "hu",
        "original_label": "Magyarország",
        "english_label": "Hungary",
        "utc_time_zone": 2
    },
    {
        "id": 2,
        "neticle_country_code": "bg",
        "original_label": "България",
        "english_label": "Bulgaria",
        "utc_time_zone": 3
    },
    {
        "id": 3,
        "neticle_country_code": "ro",
        "original_label": "România",
        "english_label": "Romania",
        "utc_time_zone": 3
    },
    {
        "id": 4,
        "neticle_country_code": "ge",
        "original_label": "საქართველო",
        "english_label": "Georgia",
        "utc_time_zone": 4
    },
    {
        "id": 5,
        "neticle_country_code": "za",
        "original_label": "South Africa",
        "english_label": "South Africa",
        "utc_time_zone": 2
    },
    {
        "id": 6,
        "neticle_country_code": "gr",
        "original_label": "Ελλάδα",
        "english_label": "Greece",
        "utc_time_zone": 3
    },
    {
        "id": 7,
        "neticle_country_code": "rs",
        "original_label": "Србија",
        "english_label": "Serbia",
        "utc_time_zone": 2
    },
    {
        "id": 8,
        "neticle_country_code": "hr",
        "original_label": "Hrvatska",
        "english_label": "Croatia",
        "utc_time_zone": 2
    },
    {
        "id": 9,
        "neticle_country_code": "sk",
        "original_label": "Slovensko",
        "english_label": "Slovakia",
        "utc_time_zone": 2
    },
    {
        "id": 10,
        "neticle_country_code": "cz",
        "original_label": "Česko",
        "english_label": "Czechia",
        "utc_time_zone": 2
    },
    {
        "id": 11,
        "neticle_country_code": "ua",
        "original_label": "Україна",
        "english_label": "Ukraine",
        "utc_time_zone": 3
    },
    {
        "id": 12,
        "neticle_country_code": "ru",
        "original_label": "Росси́я",
        "english_label": "Russia",
        "utc_time_zone": 3
    },
    {
        "id": 13,
        "neticle_country_code": "de",
        "original_label": "Deutschland",
        "english_label": "Germany",
        "utc_time_zone": 2
    },
    {
        "id": 15,
        "neticle_country_code": "pl",
        "original_label": "Polska",
        "english_label": "Poland",
        "utc_time_zone": 1
    }
]

                      
                        
                      
Clients
Client

Retrieve all Clients

Returns all available Clients.

REQUEST

Headers
Authorization Bearer <Token>

RESPONSE

Headers
Content-Type application/json
200 application/json
                        
[
    {
        "id": 1,
        "client": "hu_demo",
        "label": "Demo Client",
        "valid": 1
    }
]

                      
                        
                      
Profiles
Profile

Retrieve all Profiles

Returns all available Profiles for a Client.

REQUEST

Headers
Authorization Bearer <Token>

RESPONSE

Headers
Content-Type application/json
200 application/json
                        [
    {
        "id": 1,
        "client_id": 1,
        "profile": "demo_profile",
        "label": "Demo Profile",
        "valid": 1
    }
]

                      
                        
                      
Keywords
Keyword

Retrieve all Keywords

Returns all available Keywords in a Profile.

REQUEST

Headers
Authorization Bearer <Token>

RESPONSE

Headers
Content-Type application/json
200 application/json
                        [
    {
        "id": 1,
        "client": "hu_demo",
        "client_id": 1,
        "profile": "demo_profile",
        "profile_id": 1,
        "keywordgroup_id": 1,
        "keyword": "demo_keyword",
        "keyword_label": "Demo Keyword",
        "is_valid": 1,
        "color": "#009CDF"
    }
]

                      
                        
                      
Aspects
Aspect

Retrieve all Aspects

Returns all available Aspects in a Profile.

REQUEST

Headers
Authorization Bearer <Token>

RESPONSE

Headers
Content-Type application/json
200 application/json
                        [
    {
        "id": 1,
        "client": "hu_demo",
        "client_id": 1,
        "profile": "demo_profile",
        "profile_id": 1,
        "keywordgroup_id": 1,
        "aspect": "demo_aspect",
        "keyword_label": "Demo Aspect",
        "is_valid": 1,
        "color": "#009CDF"
    }
]

                      
                        
                      
Keyword Textunits
Keyword Textunits Collection

A Collection of analysed and detailed mentions of one or more keywords/aspects.

Retrieve all Textunits

Retrieves all textunits for the specified keyword.

REQUEST

Parameters
country_id string

The id of the Country.

client_id string

The id of the Client.

profile_id string

The id of the Profile.

keyword_id string

The id of the Keyword.

start string 1549000001
Default
'Current time - 86400'

Starting time of the query in unix time format.

end string 1549086400
Default
'Current time'

Ending time of the query in unix time format.

polarities array
Default
[1]

To filter only the selected polarities. Possible values.

sources array
Default
[1]

To filter only the selected sources. Possible values.

genders array
Default
[1]

Coming soon. Possible values.

order_by string
Default
date_desc

Coming soon. Sorting order of the textunits. Possible values.

phrases string
Default
none

Coming soon.

Headers
Authorization Bearer <Token>
Content-Type application/json

RESPONSE

Headers
Content-Type application/json
200 application/json
                        {
    "items": [
        {
            "keyword_name": "samplelorem1",
            "keyword": "Sample Lorem 1",
            "id": 1,
            "timestamp": 1544438700000,
            "polarity_index": 2,
            "content_type": 4,
            "author": "Anonym User",
            "domain": "facebook.com",
            "url": "https://www.facebook.com/permalink.php?id=11111111111&v=wall&story_fbid=000000000000000",
            "text": "<p>This is a <span class=\"phrase_pos_lvl2 polarity_item\">very good</span> <span class=\"synonym\">car</span>, I always <span class=\"phrase_pos_lvl2 polarity_item\">love</span> this <span class=\"label\">brand's</span> products.</p>",
            "clean_text": "This is a very good car, I always love this brand's products.",                
            "content_length": 78,                
            "meta_title": "",
            "time": "2019-02-01 09:00",
            "labels": [],
        },
        {
            "keyword_name": "samplelorem1",
            "keyword": "Sample Lorem 1",
            "id": 2,
            "timestamp": 1544438700000,
            "polarity_index": -2,
            "content_type": 4,
            "author": "Anonym User 2",
            "domain": "facebook.com",
            "url": "https://www.facebook.com/permalink.php?id=11111111111&v=wall&story_fbid=000000000000000",
            "text": "<p>This is a <span class=\"phrase_neg_lvl2 polarity_item\">very bad</span> <span class=\"synonym\">car</span>, I always <span class=\"phrase_neg_lvl2 polarity_item\">hate</span> this <span class=\"label\">brand's</span> products.</p>",
            "clean_text": "This is a very bad car, I always hate< this brand's products.",
            "content_length": 78,
            "meta_title": "",
            "time": "2019-02-01 09:00",
            "labels": [],
        }
    ],
    "total_items": 2,
}

                      
                        
                      
Aspect Textunits

Aspect Textunit

Coming soon.

Sources
Source

Retrieve all Sources

Returns all available Sources.

REQUEST

Headers
Authorization Bearer <Token>

RESPONSE

Headers
Content-Type application/json
200 application/json
                        [
    {
        "id": 1,
        "name": "all",
        "english_label": "all",
        "ids": [
            17,
            18,
            19,
            20,
            5,
            21,
            6,
            22,
            7,
            8,
            25,
            9,
            10,
            11,
            12,
            13,
            14,
            15,
            16
        ],
        "names": "tumblr,twitter,twitter_tweet,twitter_reply,frontpage,twitter_retweet,forum,twitter_quoted,blog,comment,instagram,article,review,print,radio,tv,facebook,other_social,video"
    },
    {
        "id": 2,
        "name": "news",
        "english_label": "news",
        "ids": [
            5,
            9
        ],
        "names": "frontpage,article"
    },
    {
        "id": 3,
        "name": "social",
        "english_label": "social media",
        "ids": [
            19,
            20,
            21,
            22,
            6,
            7,
            25,
            8,
            10,
            14,
            15,
            16,
            17,
            18
        ],
        "names": "twitter_tweet,twitter_reply,twitter_retweet,twitter_quoted,forum,blog,instagram,comment,review,facebook,other_social,video,tumblr,twitter"
    },
    {
        "id": 4,
        "name": "offline",
        "english_label": "offline",
        "ids": [
            11,
            12,
            13
        ],
        "names": "print,radio,tv"
    },
    {
        "id": 5,
        "name": "frontpage",
        "english_label": "frontpage",
        "ids": [
            5
        ],
        "names": "frontpage"
    },
    {
        "id": 6,
        "name": "forum",
        "english_label": "forum",
        "ids": [
            6
        ],
        "names": "forum"
    },
    {
        "id": 7,
        "name": "blog",
        "english_label": "blog",
        "ids": [
            7
        ],
        "names": "blog"
    },
    {
        "id": 8,
        "name": "comment",
        "english_label": "comment",
        "ids": [
            8
        ],
        "names": "comment"
    },
    {
        "id": 9,
        "name": "article",
        "english_label": "article",
        "ids": [
            9
        ],
        "names": "article"
    },
    {
        "id": 10,
        "name": "review",
        "english_label": "review",
        "ids": [
            10
        ],
        "names": "review"
    },
    {
        "id": 11,
        "name": "print",
        "english_label": "print",
        "ids": [
            11
        ],
        "names": "print"
    },
    {
        "id": 12,
        "name": "radio",
        "english_label": "radio",
        "ids": [
            12
        ],
        "names": "radio"
    },
    {
        "id": 13,
        "name": "tv",
        "english_label": "tv",
        "ids": [
            13
        ],
        "names": "tv"
    },
    {
        "id": 14,
        "name": "facebook",
        "english_label": "facebook",
        "ids": [
            14
        ],
        "names": "facebook"
    },
    {
        "id": 15,
        "name": "other_social",
        "english_label": "other social",
        "ids": [
            15
        ],
        "names": "other_social"
    },
    {
        "id": 16,
        "name": "video",
        "english_label": "video",
        "ids": [
            16
        ],
        "names": "video"
    },
    {
        "id": 17,
        "name": "tumblr",
        "english_label": "tumblr",
        "ids": [
            17
        ],
        "names": "tumblr"
    },
    {
        "id": 18,
        "name": "twitter",
        "english_label": "twitter",
        "ids": [
            18
        ],
        "names": "twitter"
    },
    {
        "id": 19,
        "name": "twitter_tweet",
        "english_label": "teet",
        "ids": [
            19
        ],
        "names": "twitter_tweet"
    },
    {
        "id": 20,
        "name": "twitter_reply",
        "english_label": "twitter reply",
        "ids": [
            20
        ],
        "names": "twitter_reply"
    },
    {
        "id": 21,
        "name": "twitter_retweet",
        "english_label": "retweet",
        "ids": [
            21
        ],
        "names": "twitter_retweet"
    },
    {
        "id": 22,
        "name": "twitter_quoted",
        "english_label": "quoted tweet",
        "ids": [
            22
        ],
        "names": "twitter_quoted"
    },
    {
        "id": 25,
        "name": "instagram",
        "english_label": "instagram",
        "ids": [
            25
        ],
        "names": "instagram"
    }
]

                      
                        
                      
Polarities
Polarity

Retrieve all Polarities

Returns all available Polarities.

REQUEST

Headers
Authorization Bearer <Token>

RESPONSE

Headers
Content-Type application/json
200 application/json
                        [
    {
        "id": 1,
        "name": "all",
        "english_label": "all",
        "ids": [
            6,
            7,
            8
        ]
    },
    {
        "id": 2,
        "name": "not_negative",
        "english_label": "not negative",
        "ids": [
            6,
            7
        ]
    },
    {
        "id": 3,
        "name": "not_neutral",
        "english_label": "not neutral",
        "ids": [
            6,
            8
        ]
    },
    {
        "id": 4,
        "name": "not_positive",
        "english_label": "not positive",
        "ids": [
            7,
            8
        ]
    },
    {
        "id": 5,
        "name": "extreme",
        "english_label": "extreme",
        "ids": [
            9,
            10
        ]
    },
    {
        "id": 6,
        "name": "positive",
        "english_label": "positive",
        "ids": [
            6
        ]
    },
    {
        "id": 7,
        "name": "neutral",
        "english_label": "neutral",
        "ids": [
            7
        ]
    },
    {
        "id": 8,
        "name": "negative",
        "english_label": "negative",
        "ids": [
            8
        ]
    },
    {
        "id": 9,
        "name": "very_positive",
        "english_label": "very positive",
        "ids": [
            9
        ]
    },
    {
        "id": 10,
        "name": "very_negative",
        "english_label": "very negative",
        "ids": [
            10
        ]
    }
]

                      
                        
                      
Sortings
Sorting

Retrieve all Sorting

Returns all available Sorting orders.

REQUEST

Headers
Authorization Bearer <Token>

RESPONSE

Headers
Content-Type application/json
200 application/json
Genders
Gender

Retrieve all Genders

Returns all available Genders.

REQUEST

Headers
Authorization Bearer <Token>

RESPONSE

Headers
Content-Type application/json
200 application/json
Own Filters

Own Filter

Coming soon.