The YaCy API: external access to the YaCy search server

YaCy can be embedded into any web page using the search API presented here. Using the API, it is also very easy to integrate YaCy into other programming environments like php or perl.

Data export with XML: integration of search results into other applications

Search results can be retrieved in JSON and RSS format as specified by This lets YaCy search results be easily integrated with any RSS client library. For example:

> curl http://localhost:8090/yacysearch.rss?query=foaf&maximumRecords=10

<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type='text/xsl' href='/yacysearch.xsl' version='1.0'?>
<rss version="2.0"
<!-- stark verkürztes Beispiel! -->
    <title>Friend of a Friend (FOAF) project</title>
    <pubDate>Fri, 23 May 2008 02:00:00 +0200</pubDate>
    <title>FOAF - Wikipedia</title>
    <pubDate>Tue, 08 Jan 2008 01:00:00 +0100</pubDate>
    <pubDate>Fri, 09 May 2008 02:00:00 +0200</pubDate>

Data import with XML: 'Surrogates'

External data sources can easily be loaded into YaCy: the data must be formatted as XML with Dublin Core Metadata XML Data containers. The xml files are imported and indexed automatically if they are stored into a hand-over directory (DATA/SURROGATES/in). Here an example for a 'surrogate'-file:

<?xml version="1.0" encoding="utf-8"?>
<!-- YaCy surrogate using dublin core notion -->
<surrogates xmlns:dc="">
    <dc:title><![CDATA[Alan Smithee]]></dc:title>
    <dc:description><![CDATA[Der als Filmregisseur oft genannte '''Alan Smithee''' ist ein Anagramm von „The Alias Men“.]]></dc:description>
    <dc:date>2009-04-14T00:00:00Z</dc:date> <!-- date is in ISO 8601 -->

Integration into wikis, forums and blogs using the search widget

YaCy provides ready-to-use code snippets to be integrated into the html code of any web page. To load the content of special content management software like blogs, wikis and forums, YaCy has specialized harvesters. The YaCy search then works as a meta-search over your different data sources and can provide a faceted view which distinguishes your data sources in the search results.

Retrieval of the web page link structure

The link structure of web domains can be visualized and also exported as xml data and may be interesting for web page designers.

> curl http://localhost:8090/api/webstructure.xml?

<webstructure maxhosts="20000">
  <references direction="out" count="1" maxref="300">
    <domain host="" id="Fh1hyQ" date="20090618">
      <reference id="VRAHIA" count="5"></reference>
      <reference id="EMaLDQ" count="3"></reference>
      <reference id="sX4ozA" count="15"></reference>
  <references direction="in" count="1">
    <domain host="" id="Fh1hyQ" date="20090618">
      <reference id="a_bYbR" count="32"></reference>
      <reference id="DWDqhA" count="1"></reference>
      <reference id="4JR9RA" count="1"></reference>
      <reference id="wqcWfA" count="1"></reference>
      <reference id="P290EA" count="128"></reference>
      <reference id="z4bRCA" count="1"></reference>
      <reference id="sX4ozA" count="5"></reference>
      <reference id="FXg39Q" count="3"></reference>