Request format

Search API requests are made by performing an HTTP GET request.

Read more ↓

Response format

Entireweb delivers a response in either XML or JSON (optionally JSONP).

Read more ↓

Live examples

Implementations that you are free to use in your own projects.

Read more ↓

Request format

Search requests to the Entireweb Search API are made by performing an HTTP GET request. Following format should be used for the request:

http://www.entireweb.com/xmlquery?pz=<yourPartnerId>&ip=<clientsIp>&q=<query>[&<param>=<value>...]

Request parameters

Below is a selection of parameters that can be sent with each request. Three of the parameters are required, q, pz and ip. We recommend using the n and of parameters as well, even if they are optional. For a complete specification of search request parameters, see the Entireweb Search API Documentation.

  • q (required) - The query to search for. Make sure it is escaped and encoded correctly, e.g: q=entireweb+search+engine
  • pz (required) - The Partner Identification tag. The value of this parameter must be a 32-byte hexadecimal string provided, in the initial e-mail after a successful registration, by Entireweb. It identifies you as a partner and is also used for regulating your allotted query volume.
  • ip (required) - The IP number (dotted quad) of the client performing the search. This is NOT the IP number of the server invoking Entireweb, but the IP number of the client utilizing that server. This is used both for result biasing and authorization/abuse detection.
  • n - The number of results to get in each query.
  • of - The offset indicates from where the current result set should start. Together with the n parameter, of is typically used for pagination.
  • format - Requested format of the response in. Possible values are xml and json, with xml being the default.
  • callback - If the format specified for the request is json, the response can additionally be embedded in a function name, to utilize the usage pattern called JSONP. Please note that JSON requests, which are sent as a HTTP GET request directly from the client, are open and visible to everyone. Consider this before using your Partner Identification tag publicly in AJAX requests.
Scroll to top ↑

Response format

Entireweb delivers a response in either XML or JSON (optionally as JSONP).

XML Response

Below follows the XML response for the query "entireweb search engine":


<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<ENTIREWEB VERSION="3.0">
<QUERY Q="entireweb" TYPECLASS="1" N="15" FIRST="1" THISPAGE="1" TOTPAGES="50" SEARCHTIME="0.002" ESTIMATE="2740000">
  <HIT INDEX="1">
    <TITLE><![CDATA[Entireweb Search Engine]]></TITLE>
    <SNIPPET><![CDATA[Entireweb makes searching easy with a user friendly search engine. ...Express Inclusion lists your site throughout the Entireweb Network within 48 hours. The network receives over 100 million searches every month.]]></SNIPPET>
    <URL><![CDATA[http://www.entireweb.com/]]></URL>
    <LINK><![CDATA[http://www.entireweb.com/]]></LINK>
    <DISPLAYURL><![CDATA[entireweb.com/]]></DISPLAYURL>
    <LANG><![CDATA[English]]></LANG>
    <REGION><![CDATA[com]]></REGION>
    <CLUSTERING><![CDATA[1]]></CLUSTERING>
    <ID>3501874746803392</ID>
    <LOCATION><![CDATA[se]]></LOCATION>
    <LASTMOD><![CDATA[26 Apr 2010]]></LASTMOD>
    <LASTCRAWL><![CDATA[26 Apr 2010]]></LASTCRAWL>
    <DISCOVERED><![CDATA[1 Jan 2000]]></DISCOVERED>
    <SIZE><![CDATA[11287]]></SIZE>
    <INDEX>1</INDEX>
    <IMP>0</IMP>
  </HIT>
  ... More hits follow... 
</QUERY>
</ENTIREWEB>

JSON Response

The same query as above would generate a JSON response if the request contains the format parameter and its value is json:

{
  "version":"2.0",
  "q":"entireweb search engine",
  "typeclass":"0",
  "n":"10",
  "first":"1",
  "last":"10",
  "total":"1000",
  "thispage":"1",
  "totpages":"50",
  "searchtime":"0.008",
  "hits": 
  [
    {
      "title":"Entireweb Search Engine",
      "snippet":"The English-language version of a Swedish search engine with a clean interface and large database",
      "url":"http://www.entireweb.com/",
      "link":"http://www.entireweb.com/",
      "displayurl":"entireweb.com/",
      "lang":"English",
      "region":"com",
      "clustering":"1",
      "id":"1693907702174",
      "location":"se",
      "lastcrawl":"18 Apr 2010",
      "size":"11282",
      "imp":"0",
      "index":"1"
    },
    {
      "title":"FastSubmit - The Web's free search engine submission & website ...",
      "snippet":"Submit your website to the most popular search engines for free! ... Submit to 1650+ Search Engines for just $49 with SubmitCentre? ...",
      "url":"http://www.evrsoft.com/fastsubmit/",
      "link":"http://www.evrsoft.com/fastsubmit/",
      "displayurl":"evrsoft.com/fastsubmit/",
      "lang":"English",
      "region":"com",
      "clustering":"1",
      "id":"2929703606121",
      "location":"us",
      "lastcrawl":"17 Apr 2010",
      "size":"19528",
      "imp":"0",
      "index":"2"
    }, ...More hits follow...
  ]
}

For additional information and a detailed description of available parameters, as well as a dictionary of the response, please read the official documentation.

Scroll to top ↑

Live examples

The snippets presented below are free to use and modify for all partners of Entireweb. Please note that the example scripts are very rudimentary and will require some customization and further development to make use of all features available.

PHP example

A sample PHP script that demonstrates how to turn the XML response into a custom-designed HTML page can be downloaded from here.

AJAX example with jQuery

Below follows a client-side implementation, using the jQuery library's high-level AJAX API.

// The request URL - use your own pz parameter, and insert client's IP
// By supplying the last parameter (callback=?), we make use of jQuery's JSONP mechanism which enables us to make cross domain AJAX requests.
var url = 'http://www.entireweb.com/xmlquery?pz=01234567012345670123456701234567&ip=1.2.3.4&n=10&of=0&sc=9&format=json&q=entireweb+search+engine&callback=?';
$.getJSON(url, function(json) {
  
  // Build up a string which will later be appended to the page
  var str = '<p>Showing results '+json.first+' - '+json.last+' for <b>'+json.q+'</b></p>';
  
  str+= '<p>Search took '+json.searchtime+' seconds.</p>';
  str+= '<ol id="results">';
  
  // Loop through results. For each result, add a list item to the string
  $.each(json.hits, function() {
    str+= '<li>';
    str+= '<a href="'+this.url+'">';
    str+= this.title;
    str+= '</a>';
    str+= '</li>';
  });
  
  // Append the created string to the DOM element with ID #json
  $('#json').append(str);
});

Even though it is possible to obtain results directly via a JSONP callback, it is recommended to create a proxy between the client and Entireweb's API server, to ensure that the unique Partner Identification key is not visible for users.