Keyword API Documentation

Our API is RESTful… basically that means its super simple to use but we have wrappers for your language just in case

API Endpoint:

http://api.grepwords.com

Keyword Lookup     /lookup

The lookup call returns all the data about the requested keywords, only the exact keywords will be returned. If the keyword does not exist in our database the missing property will be true

Parameters:

Parameter Required? Description
q yes The keywords you want to look up | (pipe) delimited
apikey yes Your API access key
output no Export type [json (default), xml, csv]
loc no The country you would like to query, default is United States. View Countries and Volumes

 

Example Request:

Make the call:

curl -s "http://api.grepwords.com/lookup?apikey=carter&q=mesothelioma|seo"

Response:

[{
    "cpc": 130.61,
    "cmp": 0.97,
    "gms": 60500,
    "lms": 60500,
    "m1": 49500,
    "m2": 60500,
    "m3": 60500,
    "m4": 49500,
    "m5": 60500,
    "m6": 49500,
    "m7": 60500,
    "m8": 60500,
    "m9": 74000,
    "m10": 49500,
    "m11": 60500,
    "m12": 0,
    "keyword": "mesothelioma"
}, {
    "cpc": 11.17,
    "cmp": 0.96,
    "gms": 90500,
    "lms": 90500,
    "m1": 74000,
    "m2": 110000,
    "m3": 110000,
    "m4": 90500,
    "m5": 90500,
    "m6": 90500,
    "m7": 90500,
    "m8": 90500,
    "m9": 90500,
    "m10": 90500,
    "m11": 90500,
    "m12": 0,
    "keyword": "seo"
}]
Make the call:

<?php
$keywords = array('mesothelioma','seo tools','keyword data');
$apikey = 'carter';
$apiurl = "http://api.grepwords.com/related?regex=1&apikey=$apikey&q=".str_replace(' ','+',implode('|',$keywords));
function curl($url){$curl=curl_init();curl_setopt_array($curl,array(CURLOPT_RETURNTRANSFER=>1,CURLOPT_URL=>$url));$resp=curl_exec($curl);curl_close($curl);return $resp;}

$resp = json_decode(curl($apiurl),true); // cmon you dont have php5 yet?

var_dump($resp);

Response:

array(3) {
  [0]=>
  array(17) {
    ["cpc"]=>
    float(130.61)
    ["cmp"]=>
    float(0.97)
    ["gms"]=>
    int(60500)
    ["lms"]=>
    int(60500)
    ["m1"]=>
    int(49500)
    ["m2"]=>
    int(60500)
    ["m3"]=>
    int(60500)
    ["m4"]=>
    int(49500)
    ["m5"]=>
    int(60500)
    ["m6"]=>
    int(49500)
    ["m7"]=>
    int(60500)
    ["m8"]=>
    int(60500)
    ["m9"]=>
    int(74000)
    ["m10"]=>
    int(49500)
    ["m11"]=>
    int(60500)
    ["m12"]=>
    int(0)
    ["keyword"]=>
    string(12) "mesothelioma"
  }
  [1]=>
  array(17) {
    ["cpc"]=>
    float(6.3)
    ["cmp"]=>
    float(0.95)
    ["gms"]=>
    int(4400)
    ["lms"]=>
    int(4400)
    ["m1"]=>
    int(3600)
    ["m2"]=>
    int(5400)
    ["m3"]=>
    int(5400)
    ["m4"]=>
    int(5400)
    ["m5"]=>
    int(5400)
    ["m6"]=>
    int(5400)
    ["m7"]=>
    int(4400)
    ["m8"]=>
    int(4400)
    ["m9"]=>
    int(4400)
    ["m10"]=>
    int(4400)
    ["m11"]=>
    int(4400)
    ["m12"]=>
    int(0)
    ["keyword"]=>
    string(9) "seo tools"
  }
  [2]=>
  array(17) {
    ["cpc"]=>
    int(0)
    ["cmp"]=>
    float(0.03)
    ["gms"]=>
    int(1)
    ["lms"]=>
    int(20)
    ["m1"]=>
    int(30)
    ["m2"]=>
    int(20)
    ["m3"]=>
    int(10)
    ["m4"]=>
    int(10)
    ["m5"]=>
    int(10)
    ["m6"]=>
    int(10)
    ["m7"]=>
    int(10)
    ["m8"]=>
    int(10)
    ["m9"]=>
    int(10)
    ["m10"]=>
    int(20)
    ["m11"]=>
    int(20)
    ["m12"]=>
    int(110)
    ["keyword"]=>
    string(12) "keyword data"
  }
}
Make the call:

import urllib2
import json
import pprint

url = 'http://api.grepwords.com/lookup?apikey=apikey&q=mesothelioma'
data = json.loads(urllib2.urlopen(url).read())
pprint.pprint(data)

Response:

[{u'cmp': 0.96999999999999997,
  u'cpc': 130.61000000000001,
  u'gms': 60500,
  u'keyword': u'mesothelioma',
  u'lms': 60500,
  u'm1': 49500,
  u'm10': 49500,
  u'm11': 60500,
  u'm12': 0,
  u'm2': 60500,
  u'm3': 60500,
  u'm4': 49500,
  u'm5': 60500,
  u'm6': 49500,
  u'm7': 60500,
  u'm8': 60500,
  u'm9': 74000},
 {u'cmp': 0.95999999999999996,
  u'cpc': 11.17,
  u'gms': 90500,
  u'keyword': u'seo',
  u'lms': 90500,
  u'm1': 74000,
  u'm10': 90500,
  u'm11': 90500,
  u'm12': 0,
  u'm2': 110000,
  u'm3': 110000,
  u'm4': 90500,
  u'm5': 90500,
  u'm6': 90500,
  u'm7': 90500,
  u'm8': 90500,
  u'm9': 90500}]
Make the call:

var request = require('request');
function dump(obj){return require('util').inspect(obj,false,null,true)}

request('http://api.grepwords.com/lookup?apikey=carter&q=mesothelioma|seo', function (error, response, body) {
  if (!error && response.statusCode == 200) {
	data = JSON.parse(body);
	console.log(dump(data));
  }
})

Response:

[{
    "cpc": 130.61,
    "cmp": 0.97,
    "gms": 60500,
    "lms": 60500,
    "m1": 49500,
    "m2": 60500,
    "m3": 60500,
    "m4": 49500,
    "m5": 60500,
    "m6": 49500,
    "m7": 60500,
    "m8": 60500,
    "m9": 74000,
    "m10": 49500,
    "m11": 60500,
    "m12": 0,
    "keyword": "mesothelioma"
}, {
    "cpc": 11.17,
    "cmp": 0.96,
    "gms": 90500,
    "lms": 90500,
    "m1": 74000,
    "m2": 110000,
    "m3": 110000,
    "m4": 90500,
    "m5": 90500,
    "m6": 90500,
    "m7": 90500,
    "m8": 90500,
    "m9": 90500,
    "m10": 90500,
    "m11": 90500,
    "m12": 0,
    "keyword": "seo"
}]

Related Queries     /related

The related call returns all keywords related to the one included in the query.

Parameters:

Parameter Required? Description
q yes The related keyword you want to look up, or a regular expression
apikey yes Your API access key
start no The index to start at
results no Result records limit (Default: 1000)
sort no Sort order of results (Default: Avg Search Volume)
regex no If your query is RegEx
output no Export type [json (default), xml, csv]
loc no The country you would like to query, default is United States. View Countries and Volumes

 

Example Request:

Make the call:

curl -s "http://api.grepwords.com/related?apikey=carter&q=mesothelioma"

Response:

[{"cmp":0.91,"ams":60500,"cpc":116.41,"m1":60500,"m2":49500,"m3":49500,"m4":60500,"m5":60500,"m6":60500,"m7":60500,"m8":60500,"m9":49500,"m10":49500,"m11":60500,"m12":60500,"lms":60500,"gms":60500,"keyword":"mesothelioma"},
{"cmp":0.58,"ams":3600,"cpc":15.9,"m1":5400,"m2":3600,"m3":3600,"m4":3600,"m5":4400,"m6":4400,"m7":3600,"m8":4400,"m9":3600,"m10":3600,"m11":4400,"m12":4400,"lms":3600,"gms":3600,"keyword":"what is mesothelioma"},
{"cmp":0.71,"ams":3600,"cpc":9.23,"m1":2900,"m2":3600,"m3":3600,"m4":3600,"m5":2900,"m6":3600,"m7":3600,"m8":3600,"m9":3600,"m10":4400,"m11":5400,"m12":4400,"lms":3600,"gms":3600,"keyword":"mesothelioma symptoms"},
{"cmp":0.89,"ams":1900,"cpc":105.38,"m1":1900,"m2":1600,"m3":1900,"m4":1600,"m5":1600,"m6":1900,"m7":1600,"m8":1900,"m9":1900,"m10":1600,"m11":1900,"m12":1900,"lms":1900,"gms":1900,"keyword":"mesothelioma prognosis"},
{"cmp":0.57,"ams":1000,"cpc":9.91,"m1":1000,"m2":1000,"m3":1000,"m4":1000,"m5":1300,"m6":1000,"m7":1000,"m8":1300,"m9":1000,"m10":1000,"m11":1300,"m12":1300,"lms":1000,"gms":1000,"keyword":"symptoms of mesothelioma"},
{"cmp":0.85,"ams":1000,"cpc":98.62,"m1":1000,"m2":1000,"m3":1000,"m4":1000,"m5":1000,"m6":1000,"m7":1300,"m8":1000,"m9":1000,"m10":1300,"m11":1300,"m12":1000,"lms":1000,"gms":1000,"keyword":"peritoneal mesothelioma"},
{"cmp":0.93,"ams":1000,"cpc":183.88,"m1":880,"m2":880,"m3":1300,"m4":1000,"m5":1000,"m6":1000,"m7":1300,"m8":1300,"m9":880,"m10":1000,"m11":1000,"m12":880,"lms":1000,"gms":1000,"keyword":"mesothelioma lawyer"},
{"cmp":0.87,"ams":720,"cpc":131.94,"m1":880,"m2":880,"m3":720,"m4":880,"m5":720,"m6":720,"m7":720,"m8":720,"m9":590,"m10":720,"m11":720,"m12":720,"lms":720,"gms":720,"keyword":"mesothelioma treatment"},
{"cmp":0.87,"ams":720,"cpc":80.7,"m1":720,"m2":720,"m3":720,"m4":720,"m5":880,"m6":880,"m7":590,"m8":590,"m9":590,"m10":880,"m11":880,"m12":720,"lms":720,"gms":720,"keyword":"mesothelioma life expectancy"},
{"cmp":0.91,"ams":590,"cpc":240.19,"m1":590,"m2":720,"m3":720,"m4":720,"m5":480,"m6":390,"m7":390,"m8":720,"m9":590,"m10":590,"m11":880,"m12":880,"lms":590,"gms":590,"keyword":"mesothelioma lawsuit"},
{"cmp":0.86,"ams":590,"cpc":110.15,"m1":590,"m2":720,"m3":720,"m4":590,"m5":590,"m6":720,"m7":590,"m8":480,"m9":390,"m10":480,"m11":590,"m12":590,"lms":590,"gms":590,"keyword":"mesothelioma cancer"},
{"cmp":0.8,"ams":590,"cpc":132.27,"m1":590,"m2":590,"m3":590,"m4":480,"m5":480,"m6":720,"m7":480,"m8":590,"m9":590,"m10":480,"m11":590,"m12":480,"lms":590,"gms":590,"keyword":"malignant mesothelioma"},
{"cmp":0.85,"ams":480,"cpc":182.09,"m1":480,"m2":480,"m3":480,"m4":480,"m5":480,"m6":480,"m7":390,"m8":590,"m9":480,"m10":480,"m11":480,"m12":480,"lms":480,"gms":480,"keyword":"pleural mesothelioma"},
{"cmp":0.75,"ams":390,"cpc":98.06,"m1":480,"m2":480,"m3":480,"m4":390,"m5":390,"m6":480,"m7":480,"m8":390,"m9":320,"m10":390,"m11":480,"m12":390,"lms":390,"gms":390,"keyword":"mesothelioma survival rate"},
{"cmp":0.61,"ams":50,"cpc":0,"m1":20,"m2":20,"m3":10,"m4":10,"m5":30,"m6":30,"m7":30,"m8":20,"m9":70,"m10":140,"m11":140,"m12":140,"lms":50,"gms":50,"keyword":"new jersey mesothelioma lawyer"}]
Make the call:

<?php
$keyword = 'mesothelioma'
$apikey = 'carter';
$apiurl = "http://api.grepwords.com/lookup?apikey=$apikey&q=".urlencode($keyword);
function curl($url){$curl=curl_init();curl_setopt_array($curl,array(CURLOPT_RETURNTRANSFER=>1,CURLOPT_URL=>$url));$resp=curl_exec($curl);curl_close($curl);return $resp;}

$resp = json_decode(curl($apiurl),true); // cmon you dont have php5 yet?

var_dump($resp);
Make the call:

import urllib2
import json
import pprint

url = 'http://api.grepwords.com/related?apikey=carter&q=mesothelioma'
data = json.loads(urllib2.urlopen(url).read())
pprint.pprint(data)

Response:

[{u'cmp': 0.96999999999999997,
  u'cpc': 130.61000000000001,
  u'gms': 60500,
  u'keyword': u'mesothelioma',
  u'lms': 60500,
  u'm1': 49500,
  u'm10': 49500,
  u'm11': 60500,
  u'm12': 0,
  u'm2': 60500,
  u'm3': 60500,
  u'm4': 49500,
  u'm5': 60500,
  u'm6': 49500,
  u'm7': 60500,
  u'm8': 60500,
  u'm9': 74000},
 {u'cmp': 0.95999999999999996,
  u'cpc': 11.17,
  u'gms': 90500,
  u'keyword': u'seo',
  u'lms': 90500,
  u'm1': 74000,
  u'm10': 90500,
  u'm11': 90500,
  u'm12': 0,
  u'm2': 110000,
  u'm3': 110000,
  u'm4': 90500,
  u'm5': 90500,
  u'm6': 90500,
  u'm7': 90500,
  u'm8': 90500,
  u'm9': 90500}]
Make the call:

var request = require('request');
function dump(obj){return require('util').inspect(obj,false,null,true)}

request('http://api.grepwords.com/related?apikey=carter&q=mesothelioma', function (error, response, body) {
  if (!error && response.statusCode == 200) {
	data = JSON.parse(body);
	console.log(dump(data));
  }
})

Response:

[{
    "cpc": 130.61,
    "cmp": 0.97,
    "gms": 60500,
    "lms": 60500,
    "m1": 49500,
    "m2": 60500,
    "m3": 60500,
    "m4": 49500,
    "m5": 60500,
    "m6": 49500,
    "m7": 60500,
    "m8": 60500,
    "m9": 74000,
    "m10": 49500,
    "m11": 60500,
    "m12": 0,
    "keyword": "mesothelioma"
}, {
    "cpc": 111.17,
    "cmp": 0.96,
    "gms": 90500,
    "lms": 90500,
    "m1": 74000,
    "m2": 110000,
    "m3": 110000,
    "m4": 90500,
    "m5": 90500,
    "m6": 90500,
    "m7": 90500,
    "m8": 90500,
    "m9": 90500,
    "m10": 90500,
    "m11": 90500,
    "m12": 0,
    "keyword": "mesothelioma lawyer"
}]