Skip to content

API - Users Search

Introduction to Users Search API

Users Search API provides developers with a programmatic way to search for your users in your YGL account.

Users Request Syntax

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

You can use the following list of POST parameters to filter users returned from the API Server. Large result sets are generally slower to retrieve than smaller result sets. The maximum number of results returned in any request is 100. 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.
id Required N/A Valid YGL user ID.
is_include_private Optional 1 0 or 1 Indicates if users with private profiles should be retrieved. For example, if using for display available agents on agency website, some agents might not want to be listed.
Users Response Syntax

Response from the Users Search 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>100</SubTotal> -- Total users records returned in the current response xml
   <Total>630</Total> -- Total number of user records 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
   <SortName>name</SortName> -- Pass through parameter, returned as is from your request
   <SortDir>asc</SortDir> -- Pass through parameter, returned as is from your request

   <Agents>
      <Agent>
         <ID />
         <MLSID /> -- Agent's MLS id if available.
         <IncludeMLSRentals /> -- Can MLS rentals data be included.
         <IncludeMLSSales /> -- Can MLS sales data be included.
         <LicenseNumber /> -- If license number is available.
         <FirstName />
         <LastName />
         <Title />
         <Bio />
         <Phone1 />  -- Primary phone number.
         <Phone2 />  -- Secondary phone number if available.
         <Phone3 />  -- Secondary phone number if available.
         <Fax1 /> -- Primary fax number.
         <Fax2 />
         <Email />
         <Address1 />
         <Address2 />
         <City />
         <State />
         <Zip />
         <PersonalWebsite />
         <ProfilePhoto />
         <DefaultCityNeighborhood> -- The default cities and neighborhoods of the agent
            <City>
               <Name /> -- Name of a city
               <Neighborhood /> -- Name of a neighborhood in the city
               ...
            </City>
            ...
         </DefaultCityNeighborhood>
         <IsDisplayCompanyContact /> -- Indicates if the user wants to display company contact, "Yes" or "No".
         <IsDiscloseFee /> -- Indicates if the user wants to display fee info to the renters, "Yes" or "No".
         <Facebook />
         <Twitter />
         <LinkedIn />
      </Agent>
      ...
   </Agents>

</YGLResponse>
XML Response to a Failed Request
<?xml version=\"1.0\" encoding=\"UTF-8\"?>
<YGLResponse responseCode="300"> -- Error code indicating the type of the error that occurred.

   <Error>Landlord retrieving failed.</Error> -- Error message

</YGLResponse>
Response Codes

The response codes are current work in progress. Please check back periodically to see if new ones are added.
Code Reason
200 Successful request.
201 Successful request, but no matching results are found.
300 Failed request. Reason Unknown.
301 Invalid request parameter.

Feedback and Knowledge Base