skip to Main Content

We are trying to get the bid estimation curve of an Ad Account programmatically using the Facebook Ads Python SDK v2.9.

In v2.8 it used to work, but does not work in v2.9 (see examples below). Any ideas?

Return value v2.9:

"daily_outcomes_curve": [
    {
      "spend": 0,
      "reach": 0,
      "impressions": 0,
      "actions": 0
    }
  ]

Return value 2.8:

"curve": [{
            "bid": 0,
            "spend": 0,
            "reach": 0,
            "impressions": 0,
            "actions": 0,
            "predicted_errors_conversions": 1,
            "predicted_errors_reach": 1,
            "reach_lower_bound": 0,
            "reach_upper_bound": 0,
            "actions_lower_bound": 0,
            "actions_upper_bound": 0
        },
        {
            "bid": 1,
            "spend": 646,
            "reach": 3567.9354838954,
            "impressions": 6680.7097528277,
            "actions": 130.80274455903,
            "predicted_errors_conversions": 2.8245606972256,
            "predicted_errors_reach": 2.689207357674,
            "reach_lower_bound": 1263.9466935967,
            "reach_upper_bound": 9763.8390907652,
            "actions_lower_bound": 39.849431346027,
            "actions_upper_bound": 387.70589834293
        },

2

Answers


  1. Using v2.9, I executed the below request and was able to retrieve results:

    curl -i -X GET 
     "https://graph.facebook.com/v2.9/act_<ID>/delivery_estimate?optimization_goal=POST_ENGAGEMENT&targeting_spec=%7B%20%22geo_locations%22%3A%20%7B%22countries%22%3A%20%5B%22US%22%5D%20%7D%2C%20%22age_min%22%3A%2020%2C%20%22age_max%22%3A%2060%7D&access_token="
    

    Response:

    {
      "data": [
        {
          "bid_estimate": {
            "min_bid": 51,
            "median_bid": 67,
            "max_bid": 95
          },
          "daily_outcomes_curve": [
            {
              "bid": 0,
              "spend": 0,
              "reach": 0,
              "impressions": 0,
              "actions": 0
            },
            {
              "bid": 1,
              "spend": 435,
              "reach": 4484.0916784657,
              "impressions": 4538.5274241599,
              "actions": 96.207167683919
            },
    ...
    

    Most probably you received some intermittent failure.

    Login or Signup to reply.
  2. I know this is an old thread, but I found this in the API documentation, it might help someone else who winds up here

    This field will only have data when we are able to provide high confidence predictions. When we do not have high confidence predictions we will return an array of 1 point with all 0s.

    Source:
    https://developers.facebook.com/docs/marketing-api/reference/ad-campaign-delivery-estimate/

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search