HTML and JSON API

From Seeks

(Redirected from Seeks JSON Search API)
Jump to: navigation, search

Returns result snippets in response to a query in HTML or JSON format.

Notice: Seeks JSON search API is available for versions of Seeks >= 0.2.2 (Bubs release).

Contents

URL

http://seeks_node/search?output=html

http://seeks_node/search?output=json

where seeks_node should be replaced with the address of the seeks node you would like to search from.

formats

html

json

HTTP Method

GET

Resources

text search:

search

image search:

search_img

node information

info

Requires Authentification

none

API Rate Limit

none

Info Call

Returns information about the running Seeks node. (JSON only). Example:

Returns:

{
    version: "0.3.3"
    code-status: "stable"
    url-source-code: http://seeks.git.sourceforge.net/git/gitweb.cgi?p=seeks/seeks;a=tree
    thumbs: "off"
    content-analysis: "off"
    clustering: "on"
}
Search Parameters
Usage Notes
  • Query strings should be URL encoded.
  • All methods will return a 400 HTTP error if one or more parameters are missing.
  • Similarity calls return a 404 HTTP error if the resource cannot be found.
Example queries
Search operators
  • Language is automatically selected from the HTTP headers of the query.
  • Language can be enforced and directly specified within the query, such as :fr paris bars or :en django, see here for more details.
JSON Response

yields:

{
	"snippets": [
		{
			"id": 580798571,
			"title": "Markov Chains",
			"url": "http://www.dartmouth.edu/~chance/teaching_aids/books_articles/probability_book/Chapter11.pdf",
			"summary": "Format de fichier: PDF/Adobe Acrobat - AfficherVotre navigateur n’est sans doute pas lié à un lecteur PDF. Google vous conseille d’afficher la version texte de ce document.With this information we form a Markov chain as follows. ..... A state in this Markov chain is a description of the color of each square. For this ...",
			"seeks_meta": 1,
			"seeks_score": 0.0466938,
			"rank": 3,
			"cite": "dartmouth.edu/~chance/teaching.../Chapter11.pdf",
			"archive": "http://web.archive.org/web/*/http://www.dartmouth.edu/~chance/teaching_aids/books_articles/probability_book/Chapter11.pdf",
			"engines": [
				"google"
			]
		},
		{
			"id": 249952016,
			"title": "Markov chain - Wikipedia, the free…",
			"url": "http://en.wikipedia.org/wiki/Markov_chain",
			"summary": "A Markov chain is a random process with the property that the next state depends only on the current state. It is a Markov model, named for Andrey Markov, for a particular type ...",
			"seeks_meta": 2,
			"seeks_score": 0.0270976,
			"rank": 2.5,
			"cite": "en.wikipedia.org/wiki/Markov_chain",
			"cached": "http://cc.bingj.com/cache.aspx?q=markov+chain&d=4519482552617814&mkt=fr-FR&setlang=fr-FR&w=c2f87800,2e120828",
			"archive": "http://web.archive.org/web/*/http://en.wikipedia.org/wiki/Markov_chain",
			"engines": [
				"google",
				"bing"
			]
		}
	],
	"date": "Mon, 04 Oct 2010 16:05:22 GMT",
	"qtime":0
}

qtime is the processing time of the query by the Seeks node.

Groups of results obtained with action=clusterize and action=types are returned in the form:

     "clusters": [
            {
             "label": "markovchainmontecarlo monte time"
             "snippets": [ ... ]
             },
             {
             "label": "state edges states"
             "snippets": [ ... ]
             }
           ]
          "date": "Thu, 06 May 2010 11:59:54 GMT",
          "qtime": 3.79
}
Personal tools