Textlocal Logo

API Documentation

Check Keyword

This command can be used to check the availability of a Keyword on either 562637 or 562638.

Resource URL

https://api.textlocal.in/check_keyword/

Sample Request

<?php
	// Account details
	$apiKey = urlencode('Your apiKey');
	
	// Message Details
	$keyword = 'KEYWORD';

	// Prepare data for POST request
	$data = array('apikey' => $apiKey, 'keyword' => $keyword);
 
	// Send the POST request with cURL
	$ch = curl_init('https://api.textlocal.in/check_keyword/');
	curl_setopt($ch, CURLOPT_POST, true);
	curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
	curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
	$response = curl_exec($ch);
	curl_close($ch);
	
	// Process your response here
	echo $response;
?>
<?php
	// Account details
	$apiKey = urlencode('Your apiKey');
	
	// Message Details
	$keyword = 'KEYWORD';

	// Prepare data for POST request
	$data = 'apikey=' . $apiKey . '&keyword=' . $keyword;
 
	// Send the GET request with cURL
	$ch = curl_init('https://api.textlocal.in/check_keyword/?' . $data);
	curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
	$response = curl_exec($ch);
	curl_close($ch);
	
	// Process your response here
	echo $response;
?>
<?php
	require('Textlocal.class.php');

	$Textlocal = new Textlocal(false, false, 'your apiKey');
	
	$keyword = 'Test';
	
	$response = $Textlocal->checkKeyword($keyword);
	print_r($response);
?>

Parameters

Keyword Keyword you want to check the availability of.
Login Parameters (Additional Information)
apiKey You can create these in your Messenger Control Panel (click here) for each application, and limit the usage of them by host IP Address.

Sample Response

{"success":"Keyword available on: 562637 & 562638","status":"success"}
<response>
<success>Keyword available on: 562637 & 562638<success>
<status>success<status>
</response>

Errors

Error Codes
74 No keyword specified
75 Keyword unavailable
76 Keyword is too short
77 Keyword is too long