Site icon Inlinks

Entity-based SEO APIs

Inlinks’ SEO APIs (Application Programming Interfaces) allow developers to access cutting edge SEO analysis and embed them in their own softwares and services. These APIs are updated on a daily basis to take into account Knowledge Graphs changes and InLinks latest developments.

Inlinks currently provides 2 types of SEO APIs:

These APIs are available to all Inlinks users having a level 4+ subscription.

Supported languages are English, French and Spanish.

1. Search Engine Understanding and NLP API

This API lets you send a URL to get:

How to start using the API

  1. Go to your Inlinks Dashboard > My account and grab your api key and your customer id
  2. call the API as follows (PHP example) :

Input Code

$url = 'https://example.com/url-you-want-to-analyse/' ; 
$apiKey = YOUR_API_KEY ;
$customer_id = YOUR_CUSTOMER_ID ; 
$apiURL = 'https://inlinks.net/api/seu.php?api_key='.$apiKey.'&url='.$url.'&cid='.$customer_id;
  
$curl_handle=curl_init();
curl_setopt($curl_handle, CURLOPT_URL,$apiURL);
curl_setopt($curl_handle, CURLOPT_CONNECTTIMEOUT, 8);
curl_setopt($curl_handle, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl_handle, CURLOPT_FOLLOWLOCATION, true);
$data = json_decode(curl_exec($curl_handle));
curl_close($curl_handle) ;

API Response

$entities = $data->entities ; // returns an array of entities objects
$seu_score   = $data->seu_score ;     // returns the SEU score
$message     = $data->message ;      // returns a message in case of problem
$httpStatus  = $data->status ;  // Response status. 200 if OK
$schema     = $data->schema ;   // Semantic Schema in JSON format

Here is what an entity object looks like

$entity = object(stdClass) {
      ["word"] => "detected word",
      ["entity"] => "corresponding entity",
      ["entityID"] => "364978", // Entity ID or null
      ["sameAs"] => "absolute wikipedia URL",
      ["category"]= > "Entity category",
      ["weight"] => "1", // Nb of times the entity has been detected
      ["detected"] => 1  // 1 if detected by Google, 0 if not
} 

Main API characteristics & Cost

API Error codes

If the API call is successfull, the API response status is 200. Otherwise, one of the following error codes can be returned:

2. Content Audit API

This API lets you get a white-label SEO content audit, similar to Inlinks Content Audit tool.

An API call requires the following parameters:

The output of this API is a web page, not XML. If the call is successful, the API returns the URL of the Content Audit.

How to start using the API

  1. Go to your Inlinks Dashboard > My account and grab your api key and your customer id
  2. Upload your own logo in your My account page
  3. Call the API as follows (PHP example) :

Input Code

/* Markets List
FR-FR // French – France
FR-CA // French – Canada
FR-BE // French – Belgium
EN-US // English – United States
EN-UK // English – UK
EN-CA // English – Canada
EN-AU // English – Australia
EN-IN // English – India
EN-NZ // English – New Zealand
EN-ZA // English – SOuth Africa
EN-IE // English – Ireland
EN-SG // English – Singapore
EN-MY // English – Malaysia
ES-ES // Spanish – Spain
ES-EV // Spanish – Venezuela
ES-AR // Spanish – Argentina
ES-CO // Spanish – Columbia
ES-GT // Spanish – Guatemala
ES-CR // Spanish – Costa Rica
ES-DO // Spanish – Dominican Republic
ES-PE // Spanish – Peru
ES-MX // Spanish – Mexico
ES-UY // Spanish – Uruguay

// Input Parameters
$searchType = 1 ; // 1 = Google Search // 2= Bing News ;
$keyword = ‘YOUR KEYWORD’ ; // Shall be URL encoded
$customer_id = ‘YOUR CUSTOMER ID’ ;
$api_key = ‘YOUR API KEY’ ;
$market = ‘EN-US’ ; // see market list above

$refURL = ‘URL TO AUDIT’ ; // LEFT BLANK FOR A CONTENT BRIEF 

$doc = array();
$doc[‘keyword’] = $keyword ;
$doc[‘urls’] = $urls ;
$doc[‘market’] = $market ;
$doc[‘cid’] = $customer_id ;
$doc[‘search’] = $searchType ;
$doc[‘refURL’] = $refURL ;

$payload = json_encode($doc) ;

$url = ‘https://inlinks.net/api/brief?key=’ . $api_key . ‘&payload=’ .$payload ;

$ch = curl_init(); 
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, array(‘Content-Type:application/json’));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$results = json_decode(curl_exec($ch));
curl_close ($ch);

API Response

$httpStatus = $results->code ; // 200: OK
$auditURL = $results->msg ; // Content Audit URL

Main API characteristics

API Error codes

If the API call is successfull, the API response status is 200. Otherwise, one of the following error codes can be returned:

Exit mobile version