PacaSearch API

Article last updated on

  • 9 November 2015

Availability

  • Infradox XS 26.5 and later

Related articles

Introduction

The PacaSearch API is an aggregating search engine for PACA members.  

Support for the PacaSearch API was previously available through the Infradox 3rd party API. To simplify configuration, we have added support for the API calls to the normal XS websites (version 26.5 or later).

Note that the calls will be accepted only if the request is executed from an IP in the PACA IP range

API calls

Retrieving file count information

The Paca system checks once daily for the number of files in your database. The following two calls are available for this purpose:

  • http://www.website.com/searchdata/stills/count
    Returns the number of stills in your database
  • http://www.website.com/searchdata/motion/count
    Returns the number of videos in your database

Note that www.website.com must of course be replaced with your website name.

The response for the above calls will look something like this:

<?xml version="1.0" encoding="UTF-8"?>
   <response>

      <total>495010</total>
      <media>stills</media>
      <datetime>20151109 04:54 pm</datetime>
   </response>
</xml>

The datatime attribute uses the yyyymmdd hh:mm am/pm format.

Retrieving keyword count and search information

The following call is used to retrieve the results count and search URL for one or more keywords:

  • http://www.website.com/searchdata/stills?keywords=amsterdam

The above call will return the results count and your website's search URL. 

When searching for more than one keyword, use a + sign to seprate the keywords.

  • http://www.website.com/searchdata/stills?keywords=amsterdam+street+people

By default, an AND search is executed. It is possible to use Boolean queries too. For example:

  • http://www.website.com/searchdata/stills?keywords=(amsterdam+or+rotterdam)+and+(man+or+woman)

The response will look something like this:

<?xml version="1.0" encoding="UTF-8"?>
   <response>
      <query>amsterdam</query>
      <count>8210</count>
      <url>http://www.website.com/search?s=amsterdam</url>
      <media>stills</media>
      <datetime>20151109 04:28 pm</datetime>
   </response>
</xml>

Have more questions? Submit a request

0 Comments

Article is closed for comments.
Powered by Zendesk