Spell query

The spell function will accept a single search term, and returns the closest terms that are also in our database as well as the number of unique queries the term exists in and the total number of searches for those queries. This function is available at http://api.keyworddiscovery.com/spell.php

Parameters:

The main parameter is the list of query strings, one phrase per line.

Query string (required)
Parameter name: query
Aliases: q, search
Description: Search term
Example: The following query returns spell results for the phrase airport parking:
http://api.keyworddiscovery.com/spell.php?query=airport+parking

Compact results
Parameter name: compact
Aliases: c
Default: 1 (on)
Values: 1,0 (on,off)
Description: Returns results with abbreviated fieldname descriptions. E.g. total="1622" will be displayed as t="1622"
Example: The following query returns spell results with abbreviated fieldname descriptions for the phrase airport parking:
http://api.keyworddiscovery.com/spell.php?query=airport+parking&compact=0



Results

Results are returned as XML. A simple example:

http://api.keyworddiscovery.com/spell.php?query=accomidation&limit=15

This request is for the search terms "accomidation", a mis-spelling of "accommodation". The default sort order is by total, query count and finally distance. By default, compact result display is turned on.

The XML returned from this query is shown below:

<?xml version="1.0"?>
<results compact="true" distance="3" maximum="15" offset="0" query="accomidation" sort="tcd">
<r c="8295" d="2" t="1388850" w="accommodation"/>
<r c="2789" d="1" t="424794" w="accomodation"/>
<r c="1544" d="3" t="119103" w="accommodations"/>
<r c="1280" d="2" t="42956" w="accomodations"/>
<r c="338" d="1" t="12734" w="accomadation"/>
<r c="2" d="3" t="5263" w="accommadition"/>
<r c="150" d="3" t="2219" w="accumulation"/>
<r c="119" d="2" t="1688" w="accomadations"/>
<r c="49" d="2" t="863" w="accommadation"/>
<r c="46" d="1" t="529" w="accomidations"/>
<r c="37" d="0" t="488" w="accomidation"/>
<r c="5" d="2" t="380" w="accomedations"/>
<r c="15" d="1" t="256" w="accomdation"/>
<r c="56" d="3" t="170" w="accomodatie"/>
<r c="2" d="2" t="151" w="accomodatio"/>
</results>

Each result is returned as an 'r' tag with the following attributes

  • w - word
  • t - total searches that include this word
  • c - total queries that include this word
  • d - levenshtein distance, a measure of difference between the query word and this word



NOTE: Data provided on a URL has to be correctly URL encoded.




Multiple queries | Top15 query