Вы находитесь на странице: 1из 5

Friday-Ad

Endeca Search API

Endeca Search API


Web Service Developer Guide
Introduction
The Endeca search API provides a web services interface to search and browse the FridayAd Endeca index. The following protocols are supported: SOAP 1.1 SOAP 1.2 HTTP GET HTTP POST The URLs for calling the API are: Dev http://api.friday-ad.co.uk/EndecaDev/Search.asmx Live http://api.friday-ad.co.uk/Endeca/Search.asmx The API supports the following functionality: Searching and browsing adverts Filtering results on Latitude/Longitude, Town and Range Filtering results on selected Endeca dimension values Sorting by Latest, Nearest, and Price Paging results (with variable page size) Specifying returned attributes in search results Searching by ad ref (for retrieving saved ads) Retrieving full ad details Returns selected and refinement dimension values (with dynamic ranking and bin counts) Expanding single dimensions Location data (Lat/Long, County and Town browse lists) can be obtained through the Location API at http://api.friday-ad.co.uk/Location/Location.asmx

Paul Young

Page 1

17/02/2011

Friday-Ad

Endeca Search API

Search Method
Use the Search method to initiate a search or browse, to filter results and retrieve additional pages of results. Parameter TargetSite LatLong Town R O O Description Friday-Ad.co.uk or Friday-Ad.es or Friday-Ad.gi A decimal Latitude/Longitude value (required when Sort = Nearest or Range > 0) e.g. 50.954537,-0.193168 A valid Post Town (only required when user opted to search based on Town). If populated a range search will always include ads from this town irrespective of range setting. An integer value indicating the range to search within. 0 will execute a national search. Miles or Kilometers Terms to search for. If empty a browse is performed. A comma separated list of Dimension Value IDs used to filter results.

Range RangeUnits SearchTerms SelectedDimensio n ValueIDs Sort

R R O O

R Latest or Nearest or PriceAscending or PriceDescending RecordsPerPage R Integer value to set maximum number of records returned in results. Page R Integer value >=1 specifying page number to return. AttributeList O Comma separated list of Attribute names to be returned in results set. If blank, all populated attributes will be returned. R = Required, O = Optional This method returns a SearchResult object. Property Description TotalRecords Total number of records matching the search/browse request. Records A collection of EndecaRecord objects. Dimensions A collection of EndecaDimension objects. Empty if Page > 1 in request. EndecaRecord object Property Description Id Unique AdRef of advert Attributes A collection of Attribute objects

Paul Young

Page 2

17/02/2011

Friday-Ad

Endeca Search API

Attribute object Property Description Key Attribute name <Value> Value of the attribute Multiple Attribute values can exist with the same Key. They will be returned as separate Attribute objects. Example attributes with multiple values are ImageURL and AdvertFlags. EndecaDimension object Property Description Id The Endeca DimensionID. Use this value with the ExpandDimension method. DisplayName The display name for the Dimension. MultiSelect None = Only one dimension value can be selected And = Multiple dimension values must both match results Or = Any one or more dimension values must match results HasMore If true, more dimension values are available by calling the ExpandDimension method. Selected A collection of EndecaRefinement objects identifying dimension values selected in the request. Refinements A collection of EndecaRefinement objects identifying dimension values which can be selected. EndecaRefinement object Property Description Id The Dimension Value ID. Use this value in the SelectedDimensionValueIDs parameter. DisplayName The display name for the dimension value. RecordCount The number of records in the current total results set matching this dimension value.

Paul Young

Page 3

17/02/2011

Friday-Ad

Endeca Search API

SearchByAdRef Method
Use this method to return a result set from a collection of Ad Refs, typically used for retrieving a list of Saved Ads. Parameter LatLong Description O A decimal Latitude/Longitude value required when Sort = Nearest. e.g. 50.954537,-0.193168 Sort R Latest or Nearest or PriceAscending or PriceDescending RecordsPerPage R Integer value to set maximum number of records returned in results. Page R Integer value >=1 specifying page number to return. AttributeList O Comma separated list of Attribute names to be returned in results set. If blank, all populated attributes will be returned. AdRefs R Comma separated list of Ad Refs to return. R = Required, O = Optional This method returns a SearchResult object.

Paul Young

Page 4

17/02/2011

Friday-Ad

Endeca Search API

ExpandDimension Method
Use this method to return the full list of dimension values when HasMore is true for a Dimension returned by a Search, or to obtain a list of dimension values for starting a browse. Parameter TargetSite LatLong Description R Friday-Ad.co.uk or Friday-Ad.es or Friday-Ad.gi O A decimal Latitude/Longitude value (required when Range > 0) e.g. 50.954537,-0.193168 Town O A valid Post Town (only required when user opted to search based on Town). If populated a range search will always include ads from this town irrespective of range setting. Range R An integer value indicating the range to search within. 0 will execute a national search. RangeUnits R Miles or Kilometers SearchTerms O Terms to search for. If empty a browse is performed. SelectedDimension O A comma separated list of Dimension Value IDs used ValueIDs to filter results. ExpandDimensionI O Integer ID of Dimension to return or Classification or D Make or Town or Model or Body Type or Colour or Property Type or Rent Or Buy. R = Required, O = Optional This method returns a single EndecaDimension object.

GetAd Method
Use this method to return full ad details for a single ad. Parameter Description AdRef R The unique Ad Ref of the ad to return R = Required, O = Optional This method returns a single EndecaRecord object with all populated Attributes.

Test Method
This method can be used to test the Endeca server and API are up and working correctly. It performs a simple browse and returns a SearchResult object. There are no parameters.

Paul Young

Page 5

17/02/2011

Вам также может понравиться