Linkgua Semantic API

get/v1/entity

Entity bring to 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.

This endpoint let you add valuable information on each founded keyword.
You can enrich your content with Videos, Images, Amazon or ITunes affiliate products, or simply reference other of your documents where this keyword is been used..
Monetize your content referring related products, and improve the SEO of your website increasing time by users showing videos and images related.

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


Definition

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

Parameters

entity_id:
Integer

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

lang:
String

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

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'
    };

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

    $.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?KEY=:yourkey&TOKEN=:yourToken'

                        
                    
                        
    import requests

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

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

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

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

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

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

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

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


                    
                

Result Format

HTTP/1.1 200 OK
{
     status: "Petition Status [success/error]",
     data: {
          timestamp: "Date and time of the response generation process",
          time: "Time elapsed for generating the response (milliseconds)",
          InfoData : {
             entity: "DbPedia Entity Url Resource",
             wiki_id: "Wikipedia ID",
             label: "Entity label / name",
             description: "Entity Description",
             freebase_link: "Freebase Entity Url Resource",
             categories: "DbPedia Ontology Categories (http://dbpedia.org/resource/Category) for the entity",
             types: "DbPedia Ontology Types (http://dbpedia.org/ontology) for the entity",
             imagen: "Entity's image url"
         },
         MediaData : {
             books:{
                 author:{
                     works_written: "List of books written by the entity (This property doesn't exist if the entity doesn't have written books.)"
                 },
                 book_subject:{
                     works: "List of books with the entity like subject (This property doesn't exist if the entity isn't a book subject.)"
                 },
                 illustrator:{
                     books_illustrated: "List of books Illustrated by the entity (This property doesn't exist if the entity didn't Illustrate any books.)"
                 }
             },
             music:{
                 artist:{
                     album: "List of albums of the entity (This property doesn't exist if the entity doesn't have any album.)",
                     track: "List of tracks of the entity (This property doesn't exist if the entity doesn't have any track.)"
                 }
             },
             videos: "List of Social Videos with entity like subject",
             people:{
                 person:{
                     children:"List of entity's children (Only if the entity has)",
                     date_of_birth:"Entity birthday (Only if the entity has)",
                     gender:"Entity gender (Only if the entity has)",
                     nationality:"Entity nationality (Only if the entity has)",
                     place_of_birth:"Entity place of birth (Only if the entity has)",
                     profession:"Entity profession (Only if the entity has)",
                 }
             },
             events:"List of Events(Musicals) related to entity",
             common:{
                 topic:{
                     alias:"List of entity alias (Only if the entity has)",
                     image:"Entity image (Only if the entity has)",
                     notable_for:"Entity most important type. (Only if the entity has)",
                     notable_types:"List of notable types (Only if the entity has)",
                     official_website:"Entity official web site (Only if the entity has)",
                     social_media_presence:"Entity social profiles urls (Only if the entity has)",
                 }
             },
         },
         ProductData : {
                 iTunes:{
                     Albums:"List of Albums from iTunes (Only if the entity has)"
                 },

                 ...

                 Related Products from several suppliers
         },
         Documents : [
                         {
                             source_id: "Document Id in user's system",
                             title: "Document Title",
                             author: "Document Author",
                             url_referer: "Url where petition come from",
                             source_url: "Document Url in User System",
                             count: "Interactions of this entity in this document [annotates / entity calls]. Documents are sorts by this parameter"
                         },
                         { ... }

                  ]
     }
 }

Editor online response (JSON)

entity = "en/8786" /*[ David Bowie ]*/

View JSON Response


Documentation

Entity bring to 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

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