Using Min and Max Date Range to Filter Results

Minimum and maximum dates can be applied to a search request so that the results fall within the range specified. The date range values are designed to be used with the Publication Date Profile Limiter (DT1).

Sample Responses with Minimum and Maximum Dates:

{
  "SearchRequest": {},
  "SearchResult": {
    "Statistics": {},
    "Data": {},
    "AvailableFacets": [],
    "RelatedContent" : {},
 
    "AvailableCriteria": {
      "DateRange": { "MinDate": "YYYY-MM", "MaxDate":"YYYY-MM"}
    }
  }
}
<SearchResponseMessage xmlns="http://epnet.com/webservices/EbscoApi/Contracts" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
  <SearchRequest>...</SearchRequest> or <SearchRequestGet></SearchRequestGet>
  <SearchResult>
    <Statistics> ... </Statistics>
    <Data> ... </Data>
    <AvailableFacets> ... </AvailableFacets>
    <RelatedContent> ... </RelatedContent>
 
    <AvailableCriteria>
      <DateRange>
           <MinDate>YYYY-MM</MinDate>
           <MaxDate>YYYY-MM</MaxDate>
       </DateRange>
    </AvailableCriteria>
 
  </SearchResult>
</SearchResponseMessage>

Steps to Use the Minimum and Maximum Date Range

  1. Gather available limiters as part of the call to the /edsapi/rest/info endpoint. Please see further documentation on the /edsapi/rest/info endpoint for formats and additional information. The /edsapi/rest/info endpoint response below is from a profile that has the Publication Date Range limiter available.

    <InfoResponseMessage xmlns="http://epnet.com/webservices/EbscoApi/Contracts" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
             <AvailableSearchCriteria>
                 <AvailableSorts>...</AvailableSorts>
                 <AvailableSearchFields>...</AvailableSearchFields>
                 <AvailableExpanders>...</AvailableExpanders>
                 <AvailableLimiters>
                     <AvailableLimiter>
                         <Id>DT1</Id>
                         <Label>Published Date</Label>
                         <Type>ymrange</Type>
                         <AddAction>addlimiter(DT1:value)</AddAction>
                         <DefaultOn>n</DefaultOn>
                         <Order>5</Order>
                     </AvailableLimiter>
                     ...
                 </AvailableLimiters>
                 <AvailableSearchModes>...</AvailableSearchModes>
                 <AvailableRelatedContent>...</AvailableRelatedContent>
             </AvailableSearchCriteria>
             <ViewResultSettings>...</ViewResultSettings>
             <ApplicationSettings>...</ApplicationSettings>
             <ApiSettings>...</ApiSettings>                                                                                                                      
    </InfoResponseMessage>
    
  2. Apply the date range limiter. You can use the date range limiter as a parameter or apply it as an action.
    Note: Use ‘0000-01’ to specify the absolute minimum date. Use ‘9999-12’ to specify the maximum date.

    GET http://eds-api.ebscohost.com/edsapi/rest/search?query=boston&includefacets=y&limiter=DT1:1980-01%2f2015-12
    
    <SearchRequestMessage xmlns="http://epnet.com/webservices/EbscoApi/Contracts" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
               <SearchCriteria>
                 <Queries>
                   <Query>
                     <Term>boston</Term>
                   </Query>
                 </Queries>
                 <IncludeFacets>y</IncludeFacets>
                 <Limiters>
                    <Limiter>
                    <Id>DT1</Id>
                     <Values>
                       <Value>1980-01/2015-12</Value>
                     </Values>
                    </Limiter>
                 </Limiters>
               </SearchCriteria>
    </SearchRequestMessage>
    
    {
         "SearchCriteria":{
            "Queries":[{"Term":"boston"}],
                       "IncludeFacets":"y",
                       "Limiters":[{"Id":"DT1","Values":["1980-01\/2015-12"]}]
         }
    }
    
  3. Create a date range slider. See the example request, response and date range slider below.

    Example: Request, Response and Date Range Slider

    Example: Request with Date Range Limiter Applied as an Input Parameter

Request with the Date Range Limiter Applied as an Input Parameter