Bing Ads API Help RRS feed

  • Question

  • Hi,

    I'm very new to the Bing Ads API and APIs in general so please treat me like a new comer. I'm currently trying to create a system which does the following:

    - Accesses an external file to find a a list of campaign names and a bid associated with each name

    - Applies to all the keywords in a campaign the bid which is associated with the particular campaign name

    - Loops through all the campaigns in the account

    Like I said initially, I'm not completely sure how to do this, so any advice is welcome. My current thinking is that similar to the sample PHP scripts found on in the downloads section of the Bing Ads API dev center (wont let me link it for some reason), the best way to do this would be via a PHP script. Can someone provide some sample code which can do the above or similar or help me out with what ever is the right way to do the above.



    Monday, January 27, 2014 6:18 PM

All replies

  • Hello.

    My first question is what is the file format that you are importing from, and is it a one time import or will you bring in ongoing updates from the file? I ask in part because if you are exporting from AdWords, you can import the file via the Bing Ads web application. For more information, see How to import a campaign from AdWords or other programs.

    There are seven services available with Bing Ads API version 9, and I suggest you begin with reading Bing Ads API Overview. For example campaigns are created and modified using the Campaign Management service. A campaign contains ad groups; each ad group contains ads and associated keywords. A bid can be assigned to an ad group and is used as the default bid for all keywords. A bid can also be assigned to keywords individually that will override the ad group’s bid.

    The Bing Ads Ad Intelligence service uses historical performance, web page data, and demographic data to provide data and bid suggestions that you may find helpful as you optimize your campaigns over time. 

    Please clarify your requirements, and let me know how we can help further.

    Best regards,


    Tuesday, January 28, 2014 5:00 PM
  • Hi Eric, 

    Thanks for replying. I have already imported my campaigns from AdWords and I'm looking for a way to automate campaign bid management.

    To clarify, I will be using a file, most likely a csv which will look as follows:

    campaign name 1, bid 1
    campaign name 2, bid 2
    campaign name 3, bid 3
     ....          , ...

    Then any script or service which will look up the campaign name from the csv and then apply to all the keywords (overriding any ad group bid) in that campaign the associated bid. I.e. the bid for all keywords in "campaign name 1" should all be set to "bid 1".

    How would I go about doing this? I don't really have any experience send SOAP requests so a method usin PHP would be best (if that is even possible). But any step in the right direction would be appreciated.

    Thank you, 


    Wednesday, January 29, 2014 10:34 AM
  • Hi Visar.

    I will suggest that you use the Bulk service, which supports either Csv or Tsv. A description of the supported file format is here:

    For details on how to upload and download the bulk file, including which service operations, please see Downloading and Uploading Campaigns.

    Please also see the following code samples in C#, Java, and PHP.

    It sounds like you already know your customer and account identifiers. If you need to get a fresh list of customer and account identifiers (in case you add managed accounts), you could use the customer management service and call GetCustomersInfo and GetAccountsInfo.

    I hope this helps!

    Wednesday, January 29, 2014 1:31 PM
  • Hi Eric,

    That looks good I'll take a look at the Bulk Service. I think also that I might be trying too much all at once.

    Could you show me an example of a PHP script which changes a keyword bid to £1 if the campaign ID, keyword ID and ad group ID are supplied. 

    Thank you,


    Thursday, January 30, 2014 2:49 PM
  • Also, could you show me how a SOAP request is actually made to Bing Ads API?


    Thursday, January 30, 2014 3:40 PM