Skip to content

API - Accounts Search

Introduction to Account Search API

Account Search API provides developers with a programmatic way to search for your YGL account information.

Account Request Syntax

To retrieve data using the YGL Account API, you need to send a SECURE HTTP POST request to the follow URL: https://www.yougotlistings.com/api/accounts/search.php

You can use the following list of POST parameters to retrieve account info returned from the API Server. All parameters are case sensitive.
Name Required? Default Value Possible Values Purpose
key Required N/A Exactly as provided by YGL Authentication. Unauthorized requests are rejected.
listings_count Optional Null "Y" If specified, agency total listings count is included in the results.
photos_count Optional Null "Y" If specified, agency total photos count is included in the results.
page_index Optional Null Integer Paging index, if specified only accounts starting on that page are returned. Must be used in conjunction with page_count.
page_count Optional Null Integer Specifies the number of accounts returned per page. Can be used for paging when defined in conjunction with page_index. If used alone, it limits the total number of results returned.
Account Response Syntax

Response from the YGL Account API will be in XML format. Each response from the API includes a "responseCode" field. This is a number between 200 - 399, which indicates the response status of your request. A number between 200 - 299 indicates successful requests, and 300 - 399 indicates failure requests. Please see the response codes section below for a list of possible response codes and what each means. If a field is not available, the corresponding XML element will not be included in the response XML.

XML Response to a Successful Request
<?xml version=\"1.0\" encoding=\"UTF-8\"?>
<YGLResponse responseCode="200">

   <SubTotal>1</SubTotal> -- Total account results returned in the current request
   <Total>10</Total> -- Total number of accounts matching the request criteria
   <PageIndex>1</PageIndex> -- Pass through parameter, returned as is from your request
   <PageCount>100</PageCount> -- Pass through parameter, returned as is from your request
 
   <Accounts>
      <Account>
         <ID />  -- The ID of the account retrieved.
         <MLSID />
         <Name /> 
         <Status /> -- The status of the account, ACT (active), INA (inactive)
         <PrimaryPhone /> 
         <SecondaryPhone1 /> 
         <SecondaryPhone2 /> 
         <PrimaryFax /> 
         <SecondaryFax />
         <Email />
         <Address1 />
         <Address2 />
         <City />
         <State />
         <Zip />
         <Latitude />
         <Longitude />
         <Website />
         <TotalListingsCount /> -- Total number of listings the account has access in YGL
         <TotalPhotosCount /> -- Total number of photos the account has in YGL
         <Logo /> -- The URL to the account logo 
         <DefaultCityNeighborhood rentalCount=100> -- The default cities and neighborhoods of the agent
            <City rentalCount=10>
               <Name /> -- Name of a city
               <Neighborhood rentalCount=3 /> -- Name of a neighborhood in the city
               ...
            </City>
            ...
         </DefaultCityNeighborhood>
      </Account>
   </Accounts>

</YGLResponse>
XML Response to a Failed Request
<yglresponse responsecode="300">

   <error>Account retrieving failed.</error>

</yglresponse>

Feedback and Knowledge Base