Multiple queries

The queries function can accept multiple search terms at once, limited to a maximum of 10, and returns the total number of searches and the number of monthly searches for each search term.

This function is available at http://api.keyworddiscovery.com/queries.php

Parameters:

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

Query string (required)
Parameter name: query
Aliases: q, search, queries, searches
Description: Search terms separated by newline characters
Limit: The number of queries you can provide at one time is limited to 10
Example: The following query returns results for the phrases airport parking, free web hosting and web hosting:
NOTE: the url has been broken down into 2 lines for clarity

http://api.keyworddiscovery.com/queries.php?queries=
airport+parking%0D%0Afree+web+hosting%0D%0Aweb+hosting


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 results for the phrases airport parking and free web hosting without compact fieldname descriptions:
NOTE: the url has been broken down into 2 lines for clarity

http://api.keyworddiscovery.com/queries.php?queries=
airport+parking%0D%0Afree+web+hosting&compact=0


Empty results
Parameter name: empty
Aliases: e
Default: 0 (off)
Values: 1,0 (on,off)
Description: Returns results that have no matches. If you provide a query we do not have results for it will return with a total of 0. Example:The following query returns results for the phrases airport parking and abc123zyx:
NOTE: the url has been broken down into 2 lines for clarity

http://api.keyworddiscovery.com/queries.php?queries=
airport+parking%0D%0Aabc123zyx&empty=1




Results

Results are returned as XML. A simple example:
NOTE: the url has been broken down into 2 lines for clarity

http://api.keyworddiscovery.com/queries.php?queries=
airport+parking%0D%0Afree+web+hosting%0D%0Aweb+hosting%0D%0Afree+hosting

This request is for the search terms "airport parking","free web hosting","web hosting" and free hosting". By default, compact result display is turned on. The XML returned from this query is shown below:

<?xml version="1.0"?>
<results compact="true" results="4">
<r m="1415771" q="web hosting" t="24068113"/>
<r m="62383" q="free web hosting" t="1060512"/>
<r m="28699" q="free hosting" t="487895"/>
<r m="3055" q="airport parking" t="51950"/>
</results>

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

  • q - query string
  • t - total search
  • m - monthly estimate. (takes into account a percentage of data that Keyword discovery has in relation to the total number searches done world wide.)



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




< Show query total | spell query >