<<

Search

(Standard, EHIS)

The Search method is used to perform searches on the EBSCOhost databases. The Integrated Search version of this method is extended to search an organization's non-EBSCO databases for which connectors have been implemented. Abstracts as well as the full text for documents and articles can be retrieved using this method. When available, full text articles can also be downloaded in pdf format.

To test this method with your EIT profile, visit the EBSCOhost API Search method page.

Searching with Integrated Search

Hide | Back to Top

Searching with an Discovery Service profile is very similar to searching with a normal EIT profile. The differences are as follows:

  • Not all available XML elements are applicable to non-EBSCO database records. See the Real Response sample below for those elements specific to non-EBSCO database records
  • The Browse and AuthoritySearch methods are not supported for EHIS profiles at this time.

Input Parameters

Hide | Back to Top

These are the input parameters for both the REST and SOAP protocols of the EBSCOhost API Search method. To see more information on either the REST or SOAP protocol with the EBSCOhost API, see:

The REST and SOAP protocols will return the same results, but the parameter names are different. Parameter names for the REST protocol are listed under the "REST" column, and parameter names for the SOAP protocol are listed under the "SOAP" column.

REST
SOAP
Description
Required
Values
prof Profile* The profile used for authentication. This must be an EIT enabled profile. Required if using profile authentication. -
pwd Password* The password used for profile authentication. Required if using profile authentication. -
authType AuthType* Indicates if using IP Authentication or Profile Authentication.

Default: profile
No profile,
ip
ipprof IpProfile* The profile used for authentication. Required if using IP authentication. -
- IpAddress* The IP address used for authentication. Required if using IP authentication. -
query Query Keywords and phrases.

Click here for information on using field codes when searching multiple databases.
Yes -
db Databases One or more short database names to search. Values separated by commas. For a list of EBSCO and non-EBSCO database short names, refer to the Databases tab in EBSCOadmin for your web service account. Yes. -
startrec StartingRecordNumber Starting record number for the result set returned from a search.

Default: 1
No 1 or greater
numrec NumberRecordsReturned Number of records returned from a search (if available). Note that the maximum number of records returned is 50 when a 'full' record format is specified.

Default: 10
No 1-200
sort Sort The sort order for the search results. Note that the different sort options are database specific, please use the Info method for a list of sort options per database.

Default: date
No -
format RecordFormat The format of the results' records.

Default: brief
No brief,
detailed,
full
subset RecordsDataSubSet Returns a subset of the records' data. No subjects,
authors,
titles
* When using the SOAP API, these items must be in the AuthorizationHeader of the request. See Making Requests with SOAP for more information on how to form the AuthorizationHeader.

Output Format

Hide | Back to Top

This is the expected output of the Search function:

<?xml version="1.0"?>
<searchResponse xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <Statistics xmlns="http://epnet.com/webservices/SearchService/Response/2007/07/">
    <Statistic>
      <Database>fab96023</Database>
      <Hits>155</Hits>
    </Statistic>
  </Statistics>
  <SearchResults xmlns="http://epnet.com/webservices/SearchService/Response/2007/07/">
    <records xmlns="">
      <rec recordID="1">
        <pdfLink />
        <plink>http://search.ebscohost.com/login.aspx?direct=true&db=fab96023&AN=&site=ehost-live</plink>
        <header shortDbName="fab96023" uiTerm="" longDbName="Britannica Online" uiTag="AN">
          <controlInfo>
            <artinfo>
              <an type="other">187279</an>
              <tig>
                <atl>energy conversion</atl>
              </tig>
              <ab>the transformation of energy from forms provided by nature to forms that can be used by humans.</ab>
             </artinfo>
             <ehis>
               Y
               <URL type="resource">
                 http://www.britannica.com/EBchecked/topic/187279/energy-conversion
               </URL>
             </ehis>
         </controlInfo>
        </header>
      </rec>
    </records>
  </SearchResults>
</searchResponse>

Viewing: Simplified Response | Real Response

Upon success, the first node returned should be the <searchResponse> node (note: in SOAP, this node is contained within the Envelope/Body/SearchResponse node). If there was an error, then the first node returned would be the <Fault> node.

The <Statistics> node contains the number of records returned from the database(s) searched. It will contain N <Statistic> nodes, where N is the number of databases searched.

If the query was sucessful and returned results, the next node should be the <SearchResults> node. This node contains all of the individual search results. Each record is returned in a <rec> node, within the <records> node. A search query will return X number of <rec> nodes, where X is the number of search results returned.

For non-EBSCO database records, article metadata such as the title, abstract and the URL to the full text can be found within the <ControlInfo> section. See the Search method for sample output for all EBSCO database records.

The <ehis> node will only appear if the record belongs to a non-EBSCO database. Testing for the presence of this node allows developers to quickly determine whether a record comes from a non-EBSCO database. Within this node, the URL to the full text content can be found via the <url> element.

When issuing multi-database requests using both EBSCO and non-EBSCO database codes, the full or partial set of the XML elements will be applied to the records depending on whether they are EBSCO database records or not.

The exact structure of the XML returned from the web service will depend on the format used (i.e. Brief, Detailed, Full) and which databases are searched.

REST Sample

Hide | Back to Top

This is a sample of the Search method using the REST protocol.

Call:
http://eit.ebscohost.com/Services/SearchService.asmx/Search?
	prof=[Your EIT Profile ID]
	&pwd=[Your Profile Password]
	&query=[Your Search Query]
Response:
<?xml version="1.0">
<searchResponse>
   <Statistics>
      <Statistic>
         <Database>
         </Database>
         <Hits>
         </Hits>
      </Statistic>
   </Statistics>
   <SearchResults>
      <records>
         <rec recordID="xs:int">
            <pdfLink></pdfLink>
            <pubinfo></pubinfo>
            <aug></aug>
            <su></su>
            <ab></ab>
            <atl></atl>
            <abody></abody>
         </rec>
      </records>
   </SearchResults>
</searchResponse>

SOAP Sample

Hide | Back to Top

This is a sample of the Search methods output using the SOAP protocol.

Call:
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" >
  <soap:Header>
    <eit:AuthorizationHeader soap:mustUnderstand="1" xmlns:eit="http://epnet.com/webservices/SearchService/2007/07/">
      <eit:Profile>[Your EIT Profile ID]</eit:Profile>
      <eit:Password>[Your  Profile Password]</eit:Password>
    </eit:AuthorizationHeader>
  </soap:Header>
  <soap:Body>
    <eit:Search xmlns:eit="http://epnet.com/webservices/SearchService/2007/07/">
      <eit:searchRequest>
        <eit:Query>[Search Query]</eit:Query>
      </eit:searchRequest>
    </eit:Search>
  </soap:Body>
</soap:Envelope>
				


Response:
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <soap:Body>
    <SearchResponse xmlns="http://epnet.com/webservices/SearchService/2007/07/">
      <searchResponse>
        <Statistics>
          <Statistic>
            <Database>
            </Database>
            <Hits>
            </Hits>
          </Statistic>
        </Statistics>
        <SearchResults>
          <records>
            <rec recordID="xs:int">
              <pdfLink></pdfLink>
              <pubinfo></pubinfo>
              <aug></aug>
              <su></su>
              <ab></ab>
              <atl></atl>
              <abody></abody>
            </rec>
          </records>
        </SearchResults>
      </searchResponse>
    </SearchResponse>
  </soap:Body>
</soap:Envelope>