Home Examples Functions Handling About

Refyn API Documentation

Syntax


$api_server		= "https://api.refyn.org/refyn_api.php";// The Default SaaS Server
$ip				= $_SERVER['REMOTE_ADDR'];				// Your IP Location
$siteurl		= "https://refyn.org";					// Your Registration Server
$apikey			= "1TREfc13kNggm566";					// The API Key You Received After Registration 
$link_search	= "https://refyn.org/refyn/keyword/";	// The Landing Page for the Suggestions
$r				= "spellcheck";							// Call Function
$q				= "chokolate";							// The Search Query (keyword)
//$q			= "good+boy";							// Use '+' For Multiple Words


Examples


Fixing Typo

https://api.refyn.org/refyn_api.php?ip=32.12.45.677&siteurl=https://comfyplane.com&apikey=1TREfc13kNggm566&r=spellcheck&q=chokolate

Output

{"result":"chocolate"}

Get AI Insights

https://api.refyn.org/refyn_api.php?ip=32.12.45.677&siteurl=https://comfyplane.com&apikey=1TREfc13kNggm566&r=spellcheck&q=tylenol

Output

{"result":["analgesic","mild","pain","inflammation",
	"antipyretic","Datril","Tylenol","Panadol",
	"Phenaphen","Tempra","Anacin","III",
	"trademarks","brands","tablets","trademark"],"Total":16}		

PHP Usage

$spell_suggestions = file_get_contents($remote_API_server.'?siteurl='.$home_url.'&apikey='.
								$api_key.'&r=spellcheck&q='.urlencode($search_keyword));
$all_suggestion = json_decode($spell_suggestions, true);

// Get only the 1st suggestion $spellResult = $all_suggestion['result'][$search_keyword][0];


All Functions


R Use For Return JSON Type
ai Get Artificial Inteligent Insights
$json=Array( 'result' => $rows, 
    		'Total'=> count($rows) ) ;
Rows: Array
Total: Integer
tryalso Fuzzy AI Search (Suggestions)
$json=Array( 'tryalso' => $line_of_cats, 
    		'Total'=> count($line_of_cats),
    		'definition' => $ai_table['definition'] );
Tryalso: String comma separated
line_of_cats: HTML
Total: Integer
Definition: String
soundex_match Find Sound Like Words
$json=Array( 'soundex' => $rows, 
    		'checked_soundas' => 1 );
String
logs Get WordPress Post ID by Keyword
$json=Array( 'postid' => $query['post_id'] );
Integer
reverselogs Get WordPress Post ID by Soundex
$json=Array( 'postid' => $query['post_id'] );;
Integer
trytosearch Search Refyn DB (Not AI)
$json=Array( 'trytosearch' => $trytosearch,
    		'seo' => $history_kw_table['seo'],
    		'selected' => 
    		$history_kw_table['selected'] );
Trytosearch: HTML String
SEO: String
Selected: String
spellcheck Fix Typos with Azure Cognitive AI Enable
$json=Array( 'result' => $json );
String
yahoo_translate Get Yahoo's Translation (To English)
$json = $yahoo;
Array
yahoo_translate_extra Get Yahoo Results
$json=Array( 'result' => $json );
Array
history Aggregated Data & SEO Bait Page
$json=Array( 'history' => $res );
Array
scrap Get Google Results
$json = json_decode($api_result, true);
3D Array
like Search Refyn DB %LIKE%
$json=Array( 'kw' => $query['kw'],
    		'seo' => $query['seo'],
    		'the_kw_user_selected' => 
    		$query['the_kw_user_selected'] );
KW: String
SEO: String
KW user selected: String


Error Handling


This is the output when any error occurs.
{"result":"0"}
We found that 99% of the errors are due to wrong syntax, apikey or siteurl.
Contact Technical Support to enable
DEBUG MODE: ON