The openly editable web directory


LibDir API


Access the LibDir catalogue entries and search through our xml web api.

API Key

To access the api you need a key. You need to be a registered user. Click here to get your key.


Search

To search the website directory you submit query via HTTP GET request using the format:

http://libdir.com/api/search?query=(query1)+(query2)+(query3)&page=(page number)&apikey=(your api key)

Query Parameters:

query - The query terms. Can be 1 term or multiple terms separated by a + sign.
page - The page of the query desired. We return only 100 results at a time so use this to access nth set of 100 results. *optional*
apikey - Your developer api key which you can retrieve from here

Results:

<result>
  <estimated_total_matches/> - The estimated number of results for this query. The number of pages is this number divided by 100
  <result_count/>- The number of entries returned in this result. Will be no more than 100.
  <query_string/> - The query terms used.
  <page/> - The page number for this result.
  <entries> - A list of entry items.
    <entry>
    <id/> - The website id.
    <url/> - The website url.
    <title/> - The website url.
    <description/> - The description for the site.
    <category_id/> - The id of the category the website is classified under.
    </entry>
  </entries>
<result>


Example search query:

http://libdir.com/api/search?query=pimlico&apikey=1-00Cjpl640FwSk

returns

<result>
  <estimated_total_matches>48</estimated_total_matches>
  <result_count>48</result_count>
  <query_string>pimlico</query_string>
  <page>1</page>
  <entries>
    <entry>
      <id>186976</id>
      <url>http://www.fortunecity.com/lavendar/pimlico/462/</url>
      <title>Traylor Howard fan page</title>
      <description>Picture gallery.</description>
      <category_id>35785</category_id>
    </entry>
    <entry>
      <id>2581597</id>
      <url>http://www.pimlico.com/</url>
      <title>Laurel Park</title>
      <description> Thoroughbred racing in Laurel, MD. Events, promotions, standings. </description>
      <category_id>485770</category_id>
    </entry>
  </entries>
</results>

Details

To retrieve the details for a single website use the following HTTP GET request:

http://libdir.com/api/details?id=(website_id)&apikey=(your_api_key)

Query Parameters:

details - The website id
apikey - Your developer api key which you can retrieve from here

Results:

<externalpage>
  <category-id type="integer"/> - The category id that this website belongs to
  <created-at type="datetime" /> - The date and time the website was added
  <description/> - The website description
  <extrank type="integer"/> - The top 1 million rank.
  <id type="integer"> - The website id
  <is-sticky type="boolean"/> - Is the record sticky. ie. unmodifiable
  <title/> - The website title
  <updated-at type="datetime"/> - The date and time the record was last updated
  <url/> - The website url
</externalpage>


Example details query:

http://libdir.com/api/details?id=1234&apikey=1-00Cjpl640FwSk

returns

<externalpage>
  <category-id type="integer">103</category-id>
  <created-at type="datetime" nil="true"/>
  <description> Fiction for several series, including Bubble Gum Crisis, and Battle Angel Alita. </description>
  <extrank type="integer">-1</extrank>
  <id type="integer">1234</id>
  <is-sticky type="boolean">true</is-sticky>
  <title>Zapan's Fan Fiction</title>
  <updated-at type="datetime" nil="true"/>
  <url>http://zapan.0catch.com/</url>
</externalpage>



add a site   home    faq    contact us   api


hello hi