https://api.keywordtool.io/v1/search/google?apikey=[API_KEY]&keyword=abc&country=us&language=en&output=json
curl -s "https://api.keywordtool.io/v1/search/google?apikey=[API_KEY]&keyword=abc&country=us&language=en&output=json"
<?php
$apikey = '[API_KEY]';
$params = [
'apikey' => $apikey,
'keyword' => 'abc',
'country' => 'us',
'language' => 'en',
'output' => 'json',
];
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://api.keywordtool.io/v1/search/google?' . http_build_query($params));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$output = curl_exec($ch);
$response = json_decode($output, true);
var_dump($response);
import urllib2
import json
import pprint
url = 'https://api.keywordtool.io/v1/search/google?apikey=[API_KEY]&keyword=abc&country=us&language=en&output=json'
data = json.loads(urllib2.urlopen(url).read())
pprint.pprint(data)
var request = require('request');
function dump(obj) {
return require('util').inspect(obj, false, null, true);
}
request('https://api.keywordtool.io/v1/search/google?apikey=[API_KEY]&keyword=abc&country=us&language=en&output=json', function(error, response, body) {
if (!error && response.statusCode == 200) {
data = JSON.parse(body);
console.log(dump(data));
}
});
Keyword suggestions generated using Keyword Tool API can be pulled right into Google Spreadsheets using ImportXML function.
Here is sample syntax of ImportXML function that you can use:
=IMPORTXML("https://api.keywordtool.io/v1/search/google?apikey=[API_KEY]&keyword=how+to&country=us&language=en&output=xml", "//item/@string")