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

Requires Authentification

none

API Rate Limit

none

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": 753016643,
                "title": "Markov chain - Wikipedia, the free encyclopedia",
                "url": http://en.wikipedia.org/wiki/Markov_chain,
                "summary": "Wikipedia: If all states in a Markov chain are ergodic, then the chain is said to be ergodic...",
                "seeks_score": 3,
                "rank": 0.666667,
                "cite": "en.wikipedia.org/wiki/Markov_chain",
                "cached": "http://en.wikipedia.org/wiki/Markov_chain",
                "archive": "http://web.archive.org/web/*/http://en.wikipedia.org/wiki/Markov_chain",
                "engines": [
                      "google",
                      "cuil",
                      "yahoo"
                  ]
            },
            {
                "id": 284612170,
                "title": "Markov Chain",
                "url": "http://www.markovchain.net/",
                "summary": "This was the start of what would eventually become the cover band now known as Markov Chain […]",
                "seeks_score": 3,
                "rank": 9.33333,
                "cite": "markovchain.net",
                "cached": "http://x.x.x.x/search/cache?ei=UTF-8&p=markov+chain",
                "archive": "http://web.archive.org/web/*/http://www.markovchain.net/",
                 "engines": [
                      "google",
                      "yahoo",
                      "exalead"
                  ]
            }
      ]
    "date": "Thu, 06 May 2010 11:59:54 GMT",
    "qtime": 3.79
}

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