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:<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"?>
<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>
    <LASTMOD><![CDATA[26 Apr 2010]]></LASTMOD>
    <LASTCRAWL><![CDATA[26 Apr 2010]]></LASTCRAWL>
  ... More hits follow... 

JSON Response

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

  "q":"entireweb search engine",
      "title":"Entireweb Search Engine",
      "snippet":"The English-language version of a Swedish search engine with a clean interface and large database",
      "lastcrawl":"18 Apr 2010",
      "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? ...",
      "lastcrawl":"17 Apr 2010",
    }, ...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 = '';
$.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

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.