BERT score API – URL Input



Price: 1 credits per request


The BERT Relevance Score API measures how well your keyword or phrase aligns with content by analyzing meaning in context—not just keyword matches. It uses advanced language modeling to assess semantic similarity

Query string parameters

Name Parameter Description
URL &url=

The public URL you want to analyse

example: https:www//seoreviewtools.com/

Keyword &keyword=

The keyword or phrase is used by the the algorithm to analyze content relevance

example: SEO Tools

Key &key= Your private API key

Response elements

Name Description
keyword Your input keyword
content Your input content
BERT score The relevance score calculated by the BERT algorithm. The closer the score is to 1.0 the higher the relevance, if this number is below 0.5 your content probably isn’t really relevant to your keyword. 
label The label, functions as a quick indicator to show you how to interpret the BERT score. 

Labels

BERT score Interpretation
1.0 Perfect match
0.8 – 0.99 Very strong relevance
0.6 – 0.79 Good relevance
0.4 – 0.59 Somewhat related
0.2 – 0.39 Weak relevance (might share a few common words but different meaning)
0.0 – 0.19 Very weak or no similarity
< 0.0 Opposite meaning

PHP code example

<?php

/*
    API documentation for SEO Review Tools.
    API info: https://www.seoreviewtools.com/seo-api/
    API documentation: https://api.seoreviewtools.com/documentation/
    LinkedIn: https://www.linkedin.com/company/seo-review-tools
*/

// input URL
$inputUrl'https://www.seoreviewtools.com/';

// Keyword to check
$keyword"SEO Tools";

// API key 
$apiKey 'YOUR-API-KEY';

// specific API url 
$apiRequestUrl 'https://api.seoreviewtools.com/bert-score/?keyword='.urlencode($keyword).'&url='.urlencode($inputUrl).'&key='.$apiKey;

// get data from API
$jsonReposnse file_get_contents($apiRequestUrl);

// convert JSON to PHP array
$dataArray json_decode($jsonReposnsetrue);

// check if API call is success or failed
// (just some basic validation)

// API call fail
if ($dataArray['status'] !== 'ok'){

    
// return error message
    
echo 'Error message: '.$dataArray['error message'];

// API call success    
} else {

    
// print data
    
print_r($dataArray); 
}

?> 

Python code example

# API documentation for SEO Review Tools.
# API info: https://www.seoreviewtools.com/seo-api/
# API documentation: https://api.seoreviewtools.com/documentation/
# LinkedIn: https://www.linkedin.com/company/seo-review-tools

import requests

# API key
apiKey = 'YOUR-API-KEY'

# keyword
keyword = 'SEO Tools'

# input URL
inputUrl = 'https://www.seoreviewtools.com/'

# API URL
toolRequestUrl = 'https://api.seoreviewtools.com/bert-score/?keyword=' + keyword + '&url=' + inputUrl + '&key=' + apiKey

r = requests.request("GET", toolRequestUrl)
print(r.text)

JSON response example







Trusted by →

clients