Linkgua Semantic API

get/v1/entity/:lang/:id/videos

Entity videos is Linkgua Semantic’s endpoint that make possible publishers aggregate videos to their contents. When you ask for an entity, linkgua semantic API bring all media information about it.

Get your key and start coding. It's Free!



Definition

https://api.linkgua.com /v1/entity/:lang/:entity_id/videos

Parameters

entity_id:
Integer

Entity Wikipedia Id. [This parameter must be seated in the endpoint url]

lang:
String optional

Language space in wikipedia. [This parameter must be seated in the endpoint url]
(Normally it is the text language, also the annotate response bring the detected language). The language of the text has been annotated; currently English, Spanish, French, German, Italian and Portuguese and and are supported.

Allowed values: en|es|fr|de|it|pt

limit:
Integer

The number of videos that the server will send you.

offset:
String optional

Page identifier.

document_id:
String optional

Client Document ID. This parameter make possible track entities on any specific document and give the possibility to recommend publishers documents based entities.

document_url:
String optional

Document url in client. This parameters make possible track the entities for this documents and give the possibility to recommend publishers documents based entities.

document_title:
String optional

Document Title. Must exist "document_id" or "document_url" for take in account. This parameters make possible track the entities for this documents and give the possibility to recommend publishers documents based entities.

document_author:
String optional

Document Author. Must exist "document_id" or "document_url" for take in account.

document_lang:
String optional

Document Language. Must exist "document_id" or "document_url" for take in account.

document_abstract:
String optional

Document abstract. Must exist "document_id" or "document_url" for take in account.

document_categories:
String optional

Document categories. This parameter is comma separated list. [ex. "Business, Politic"]. Must exist "document_id" or "document_url" for take in account.

document_genres:
String optional

Document genres. This parameter is comma separated list. [ex. "Fiction, History Fiction"]. Must exist "document_id" or "document_url" for take in account.

document_types:
String optional

Document types. This parameter is comma separated list. [ex. "Book, Novel"]. Must exist "document_id" or "document_url" for take in account.

KEY:
String

Your API Key

TOKEN:
String

Your API Token


Examples

                        
    //Setting entity data
    var lang = "en"; /*Text Language or Wikipedia language space [It is bring by annotate endpoint]*/
    var entity_id = "8786"; /*Wikipedia id for "David Bowie" [It is bring by annotate endpoint]*/

    //Credentials and Document Info ( Optional for statistics in Dashboard )
    var params = {
        KEY : ':yourKey',
        TOKEN:':yourToken',
        limit: ':limit',
        offset: ':offset'
    };

    //Api call url
    var urlEntityEndPoint = "https://api.linkgua.com/v1/entity/"+lang+"/"+entity_id+"/videos";

    $.getJSON( urlEntityEndPoint, params,function( response ) {

        //print the complete response in console.
        console.log(JSON.stringify(response));

    });

                        
                    
                        
    //Info about David Bowie (wikipedia language space = "en" | wikipedia id = "8786")

    curl 'https://api.linkgua.com/v1/entity/en/8786/videos?KEY=:yourkey&TOKEN=:yourToken&limit=:limit&offset:offset'

                        
                    
                        
    import requests

    # Credentials
    params = {
        "KEY": ":yourKey"
        "TOKEN": ":yourToken",
        "limit": ":limit",
        "offset": ":offset"
    }

    # Make the call.
    # Info about David Bowie (wikipedia language space = "en" | wikipedia id = "8786")

    r = requests.get('https://api.linkgua.com/v1/entity/en/87867/videos', params=params)

    # print the json result.
    print r.json()
                        
                    
                    

    $params = array(
        'KEY' => :yourkey,
        'TOKEN' => :yourToken,
        'limit': ':limit',
        'offset': ':offset'
    );

    //Info about David Bowie (wikipedia language space = "en" | wikipedia id = "8786")
    $endPointUrl = "https://api.linkgua.com/v1/entity/en/8786/videos";

    $response = file_get_contents($endPointUrl."?".http_build_query($params))

    //show the complete response.
    var_dump($response);


                    
                

Result Format

success
HTTP/1.1 200 OK
{
     status: "success",
     data: {
          items : [
                {
                     kind: "Type of result (youtube#searchResult)",
                     etag: "Tag",
                     id: 
                        {
                            kind: "type of video (youtube#video)",
                            videoId: "Video ID"
                        },
                     snippet:
                        {
                            publishedAt: "Publication datetime",
                            channelId: "Channel Id",
                            title: "Video Title",
                            description: "Video Description",
                            thumbnails:
                                {
                                    default:
                                        {
                                            url: "Default image URL",
                                            width: "Default image Width",
                                            height: "Default image Height"
                                        },
                                    medium:
                                        {
                                            url: "Medium image URL",
                                            width: "Medium image Width",
                                            height: "Medium image Height"
                                        },
                                    high:
                                        {
                                            url: "High image URL",
                                            width: "High image Width",
                                            height: "High image Height"
                                        }
                                },
                                channelTitle: "Channel Title",
                                liveBroadcastContent: "If the channel has broadcast content"

                        },
                     videoUrl: "Video URL"
                },

                { ... }
                 
         ],

          limit: "Page limit",

          offset: "Next page offset",

          region: "Region",

          total: "Total Videos of this entity"
         
     }
 }

Editor online response (JSON)



View JSON Response


Documentation

Entity is Linkgua Semantic’s endpoint that make possible publishers aggregate value to they contents. When you ask for an entity, linkgua semantic api bring all media information about it (videos, images, social profiles).
The most valuable feature, if the entity have some related books, albums, tracks, or related media product in Amazon, or iTunes, this endpoint bring all links to products with your affiliate tracking code, so you can sale it in your site and monetize your content.
All needed data for an Entity endpoint Call, is brought by each entity founded in annotation text endpoint.

Want to Try out the Entity API?

Try out our handy Entity API Explorer. It's awesome and will allow you to preview the response with any keyword (entity).

Go to the Entity API Demo

Grab your key and start coding. It's Free!