SearchCustomers Service Operation - Customer Management

Searches for customers that match a specified criteria.

Request Elements

The SearchCustomersRequest object defines the body and header elements of the service operation request. The elements must be in the same order as shown in the Request SOAP.

Request Body Elements

Element Description Data Type
ApplicationScope A value that determines whether to return results for advertising customers or publishing customers. If you do not specify the scope, the list may include both types of customers. ApplicationType
DateRange Determines the minimum and maximum customer creation date range. DateRange
Ordering Determines the order of results by the specified property of a customer.

You should only specify one OrderBy element in the array. Additional elements are not supported and will be ignored by the service.

For this service operation, the following values are supported in the Field element of a OrderBy object:

Id - The order is determined by the Idelement of the returned Customer.

Name - The order is determined by the Name element of the returned Customer.

Number - The order is determined by the Number element of the returned Customer.
OrderBy array
PageInfo Determines the index and size of results per page. Paging
Predicates Determines the request conditions. This operation's response will include customers that match all of the specified predicates.

You may specify up to 10 predicates. You may use the CreatedDate predicate field twice to specify a created date range, and otherwise may only use each predicate field once.

For a list of supported Field and Operator elements of a Predicate object for this service operation, see Predicate Remarks.
Predicate array

Request Header Elements

Element Description Data Type
AuthenticationToken The OAuth access token that represents a Microsoft Account user who has permissions to Bing Ads accounts. string
DeveloperToken The developer token used to access the Bing Ads API. string
Password The Bing Ads managed user's sign-in password. string
UserName The Bing Ads managed user's sign-in name. You must not set this element to a Microsoft account or email address. string


The UserName and Password header elements are deprecated. In future versions of the API, Bing Ads will transition exclusively to Microsoft Account (email address) authentication. For more information, see Authentication with OAuth. UserName and Password are still required for Bing Ads managed credentials, but they are not applicable for Microsoft account authentication. To authenticate a Microsoft account, use the AuthenticationToken] header instead of UserName and Password.

Response Elements

The SearchCustomersResponse object defines the body and header elements of the service operation response. The elements are returned in the same order as shown in the Response SOAP.

Response Body Elements

Element Description Data Type
Customers A list of customers that meet the specified criteria. Customer array

Response Header Elements

Element Description Data Type
TrackingId The identifier of the log entry that contains the details of the API call. string

Request SOAP

The following template shows the order of the body and header elements for the SOAP request.

<s:Envelope xmlns:i="" xmlns:s="">
  <s:Header xmlns="">
    <Action mustUnderstand="1">SearchCustomers</Action>
    <ApplicationToken i:nil="false">ValueHere</ApplicationToken>
    <AuthenticationToken i:nil="false">ValueHere</AuthenticationToken>
    <DeveloperToken i:nil="false">ValueHere</DeveloperToken>
    <Password i:nil="false">ValueHere</Password>
    <UserName i:nil="false">ValueHere</UserName>
    <SearchCustomersRequest xmlns="">
      <Predicates xmlns:e333="" i:nil="false">
          <e333:Field i:nil="false">ValueHere</e333:Field>
          <e333:Value i:nil="false">ValueHere</e333:Value>
      <DateRange xmlns:e334="" i:nil="false">
        <e334:MinDate i:nil="false">ValueHere</e334:MinDate>
        <e334:MaxDate i:nil="false">ValueHere</e334:MaxDate>
      <Ordering xmlns:e335="" i:nil="false">
      <PageInfo xmlns:e336="" i:nil="false">

Response SOAP

The following template shows the order of the body and header elements for the SOAP response.

<s:Envelope xmlns:s="">
  <s:Header xmlns="">
    <TrackingId d3p1:nil="false" xmlns:d3p1="">ValueHere</TrackingId>
    <SearchCustomersResponse xmlns="">
      <Customers xmlns:e337="" d4p1:nil="false" xmlns:d4p1="">
          <e337:CustomerAddress d4p1:nil="false">
            <e337:City d4p1:nil="false">ValueHere</e337:City>
            <e337:CountryCode d4p1:nil="false">ValueHere</e337:CountryCode>
            <e337:Id d4p1:nil="false">ValueHere</e337:Id>
            <e337:Line1 d4p1:nil="false">ValueHere</e337:Line1>
            <e337:Line2 d4p1:nil="false">ValueHere</e337:Line2>
            <e337:Line3 d4p1:nil="false">ValueHere</e337:Line3>
            <e337:Line4 d4p1:nil="false">ValueHere</e337:Line4>
            <e337:PostalCode d4p1:nil="false">ValueHere</e337:PostalCode>
            <e337:StateOrProvince d4p1:nil="false">ValueHere</e337:StateOrProvince>
            <e337:TimeStamp d4p1:nil="false">ValueHere</e337:TimeStamp>
          <e337:CustomerFinancialStatus d4p1:nil="false">ValueHere</e337:CustomerFinancialStatus>
          <e337:Id d4p1:nil="false">ValueHere</e337:Id>
          <e337:Industry d4p1:nil="false">ValueHere</e337:Industry>
          <e337:LastModifiedByUserId d4p1:nil="false">ValueHere</e337:LastModifiedByUserId>
          <e337:LastModifiedTime d4p1:nil="false">ValueHere</e337:LastModifiedTime>
          <e337:MarketCountry d4p1:nil="false">ValueHere</e337:MarketCountry>
          <ForwardCompatibilityMap xmlns:e338="" d4p1:nil="false">
              <e338:key d4p1:nil="false">ValueHere</e338:key>
              <e338:value d4p1:nil="false">ValueHere</e338:value>
          <e337:MarketLanguage d4p1:nil="false">ValueHere</e337:MarketLanguage>
          <e337:Name d4p1:nil="false">ValueHere</e337:Name>
          <e337:ServiceLevel d4p1:nil="false">ValueHere</e337:ServiceLevel>
          <e337:CustomerLifeCycleStatus d4p1:nil="false">ValueHere</e337:CustomerLifeCycleStatus>
          <e337:TimeStamp d4p1:nil="false">ValueHere</e337:TimeStamp>
          <e337:Number d4p1:nil="false">ValueHere</e337:Number>

Code Syntax

The example syntax can be used with Bing Ads SDKs. See Bing Ads Code Examples for more examples.

public async Task<SearchCustomersResponse> SearchCustomersAsync(
    ApplicationType applicationScope,
    IList<Predicate> predicates,
    DateRange dateRange,
    IList<OrderBy> ordering,
    Paging pageInfo)
    var request = new SearchCustomersRequest
        ApplicationScope = applicationScope,
        Predicates = predicates,
        DateRange = dateRange,
        Ordering = ordering,
        PageInfo = pageInfo

    return (await CustomerManagementService.CallAsync((s, r) => s.SearchCustomersAsync(r), request));
static SearchCustomersResponse searchCustomers(
    ApplicationType applicationScope,
    ArrayOfPredicate predicates,
    DateRange dateRange,
    ArrayOfOrderBy ordering,
    Paging pageInfo) throws RemoteException, Exception
    SearchCustomersRequest request = new SearchCustomersRequest();


    return CustomerManagementService.getService().searchCustomers(request);
static function SearchCustomers(

    $GLOBALS['Proxy'] = $GLOBALS['CustomerManagementProxy'];

    $request = new SearchCustomersRequest();

    $request->ApplicationScope = $applicationScope;
    $request->Predicates = $predicates;
    $request->DateRange = $dateRange;
    $request->Ordering = $ordering;
    $request->PageInfo = $pageInfo;

    return $GLOBALS['CustomerManagementProxy']->GetService()->SearchCustomers($request);


Service: CustomerManagementService.svc v11