Sindice Search API v2

Sindice API
Sindice API:

The Sindice API provides programmatic access to its search capabilities. Please refer for support questions.

Query services (v2)

There are two types of search in the new API: term search and advanced search.
In general these APIs are based on the OpenSearch 1.1 specification.

  • the q parameter specifies the query
  • the page parameter (mandatory) specifies the result page. Pages are 1-indexed, so the first page is 1, the second is 2 and so on.
  • the qt parameter must be either "term" or "advanced" to select between term Search and Triple Search.
  • the sortbydate parameter is a boolean flag that specifies whether the results have to be sorted by date (they are sorted by relevance, otherwise).


Term Search

Term Search allows you to retrieve documents that are related to keywords and or URIS.
to activate the Term Search use qt=term in the query parameters. Example:

Currently, term search enjoys better ranking and is in general more suitable when searching for user provided strings.
Term search automatically parses URIs and uses them to look at URIs inside the RDF. Example:

In term search three date string might be combined together with the keyword to restrict results:

date:today - shows results only from today
date:last_week - shows results from -7 days to now
date:last_month - shows results from -31 days to now;=term&page;=1;=term&page;=1;=term&page;=1

This can be combined with sortbydate parameter. Example;=term&page;=1&sortbydate;=1

For the complete documentation of the Advanced Search query language see

Advanced Search

Advanced Search allows the use of triple level expressions in the query. Example*

will locate RDF that contain resources which have "foaf:name" "Renaud Delbru".

For the complete documentation of the Advanced Search query language see

Combined Search

Just like the advanced search, but with an additional parameter that specifies a term query. This additional query will be combined with the advanced query using an AND operator. For example:*

will locate those resources which have "foaf:name" "Renaud Delbru" and contain the word "michele".

Result formats

You can negotiate the content and retrieve three different formats:

  • json: curl -H "Accept: application/json" "
  • rdf: curl -H "Accept: application/rdf+xml" "
  • atom: curl -H "Accept: application/atom+xml" "

The basic format has three "groups" of fields :

  • generation time of this search
  • base url, without the specific page
  • number of total results
  • url of this result page
  • url of previous, next, first and last page of results
  • link to the HTML alternate representation for this page, in the normal sindice website
  • author field,
  • number of items per page
  • starting index in this page
  • a Query object with fields that allow replaying of this query (search Term, page, role)

then there is a list of entries, each one has

  • title, a list of the document labels in JSON and RDF, and a single field with comma separated strings for Atom (we can't change the spec)
  • formats, a list, for example RDFa and Microformat
  • content, a simple string such as: "13 triples in 1000 bytes"
  • link, the document URI
  • updated, the document modification date

In specific, a JSON-encoded object looks like this:

 "updated": "2008/06/03 18:27:29 \+0100",
 "base": "\u0026qt=term"
 "totalResults": 211,
 "search": "",
 "self": "\u0026qt=term\u0026page=1",
 "previous": "\u0026qt=term\u0026page=",
 "title": "Sindice search: gabriele",
 "last": "\u0026qt=term\u0026page=22",
 "alternate": "\u0026qt=term",
 "author": "",
 "first": "\u0026qt=term\u0026page=1",
 "itemsPerPage": 10,
 "startIndex": 1,
 "next": "\u0026qt=term\u0026page=2",
   "role": "request",
   "startPage": 1,
   "searchTerms": "gabriele"
 "link": "\u0026qt=term\u0026page=1",
    "title": ["Gabriele Albertini"],
    "formats": ["RDF"],
    "content": "183 triples in 32484 bytes",
    "link": "",
    "updated": "2008/05/23"
    "title": ["Gabriele Paonessa"],
    "formats": ["RDF"],
    "content": "111 triples in 16153 bytes",
    "link": "",
    "updated": "2008/05/23"

The format closely matches the OpenSearch format, so refer to that for further details, the only two differences are the title field in the entry, which is a list (a document can have different labels) and the format field which is a list of the formats found in one page (for example, RDFa and microformats).

Example ATOM format:

<?xml version="1.0" encoding="iso-8859-1"?>
<feed xmlns:opensearch=""
  <title>Sindice search: gabriele</title>
  <link href=""/>
  <opensearch:Query role="request" startPage="1" searchTerms="gabriele"/>
  <link href=""
        rel="alternate" type="text/html"/>
  <link href=""
        rel="first" type="application/atom+xml"/>
  <link href=""
        rel="previous" type="application/atom+xml"/>
  <link href=""
        rel="next" type="application/atom+xml"/>
  <link href=""
        rel="last" type="application/atom+xml"/>
  <link href=""
        rel="self" type="application/atom+xml"/>
  <link href=""
        rel="search" type="application/opensearchdescription+xml"/>
    <title>Gabriele Albertini</title>
    <link href=""/>
    <content>183 triples in 32484 bytes</content>
    <title>Gabriele Paonessa</title>
    <link href=""/>
    <content>111 triples in 16153 bytes</content>

It is a simple ATOM file, plus the OpenSearch schema plus a single additional tag for carrying informations about the document format. You should be able to parse this easily with any XML parser.

The RDF representation defines the base search URI as a search:Query object, which has links to search:Pages, each one having many search:Results. the other fields should be obvious, and mimic the other searches.

<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF xmlns:dcterms=""
  <Query rdf:about="">
    <dc:title>Sindice search: gabriele</dc:title>
    <first rdf:resource=""/>
    <last rdf:resource=""/>
    <page rdf:resource=""/>
    <opensearchDescription rdf:resource=""/>
    <result rdf:resource="#result1"/>
    <result rdf:resource="#result2"/>
  <Page rdf:about="">
    <dc:title>Sindice search: gabriele [page 1]</dc:title>
    <previous rdf:resource=""/>
    <next rdf:resource=""/>
    <foaf:page rdf:resource=""/>
  <Result rdf:about="#result1">
    <dc:title>Gabriele Tarquini</dc:title>
    <link rdf:resource=""/>
    <content>59 triples in 9131 bytes</content>
  <Result rdf:about="#result2">
    <link rdf:resource=""/>
    <content>29 triples in 3374 bytes</content>

Integrating JSON in your script

If you want, you can add an additional argument to the request called callback, which will cause the code to be wrapped in a function with the name you choose.
This allows clean integration of the Sindice results in your webpage, for example:

<script type="text/javascript"

Notice that to force the rendering of JSON output we added an additional parameter format. It can obviously be used with values atom and rdfxml

Query Limits

Sindice currently limits to 100 the number of result pages for each query. For special needs you can contact us .