@juanshishido - since you are very active, I’m going to tag you in this.
I have some feedback from developers in regards to the recent reach_estimate keyword support feature you released:
As shown below, the standard is to send empty space character encoding “%20” - but this does not work - it interprets the '%20" as part of a keyword, see twurl below:
twurl -H 'ads-api.twitter.com' '/1/accounts/18ce53yrq2p/reach_estimate?product_type=PROMOTED_TWEETS&bid_amount_local_micro=150000¤cy=USD&campaign_daily_budget_amount_local_micro=550000&objective=TWEET_ENGAGEMENTS&phrase_keywords=game%20of%20thrones' | python -m json.tool
{
"errors": [
{
"code": "NOT_FOUND",
"message": "Keyword(s) game%20of%20thrones was not found"
}
],
"request": {
"params": {}
}
}
When attempting to format x-www-form-urlencoded type requests with “+” encoding as blank space does not output desired phrase. It also believes “game+of+thrones” is a giant keyword that would be present in a tweet. See twurl below:
twurl -H 'ads-api.twitter.com' '/1/accounts/18ce53yrq2p/reach_estimate?product_type=PROMOTED_TWEETS&bid_amount_local_micro=150000¤cy=USD&campaign_daily_budget_amount_local_micro=550000&objective=TWEET_ENGAGEMENTS&phrase_keywords=game+of+thrones' | python -m json.tool
{
"data": {
"count": null,
"engagements": null,
"estimated_daily_spend_local_micro": null,
"impressions": null,
"infinite_bid_count": {
"max": 0,
"min": 0
}
},
"data_type": "reach_estimate",
"request": {
"params": {
"account_id": "18ce53yrq2p",
"bid_amount_local_micro": 150000,
"campaign_daily_budget_amount_local_micro": 550000,
"currency": "USD",
"followers_of_users": null,
"objective": "TWEET_ENGAGEMENTS",
"phrase_keywords": [
"game+of+thrones"
],
"product_type": "PROMOTED_TWEETS"
}
}
}
An empty space character is considered an “unsafe” character per IETF RFC1738. However, empty spaces are currently the only way that the API endpoint receives phrases with spaces.
twurl -H 'ads-api.twitter.com' '/1/accounts/18ce53yrq2p/reach_estimate?product_type=PROMOTED_TWEETS&bid_amount_local_micro=150000¤cy=USD&campaign_daily_budget_amount_local_micro=550000&objective=TWEET_ENGAGEMENTS&phrase_keywords=game of thrones' | python -m json.tool
{
"data": {
"count": {
"max": 313,
"min": 209
},
"engagements": {
"max": 11,
"min": 7
},
"estimated_daily_spend_local_micro": {
"max": 660000,
"min": 440000
},
"impressions": {
"max": 395,
"min": 263
},
"infinite_bid_count": {
"max": 979237,
"min": 652824
}
},
"data_type": "reach_estimate",
"request": {
"params": {
"account_id": "18ce53yrq2p",
"bid_amount_local_micro": 150000,
"campaign_daily_budget_amount_local_micro": 550000,
"currency": "USD",
"followers_of_users": null,
"objective": "TWEET_ENGAGEMENTS",
"phrase_keywords": [
"game of thrones"
],
"product_type": "PROMOTED_TWEETS"
}
}
}
Can we add support to having ‘%20’ characters as part of the keyword phrase to go along with the standard? Let me know if you have any questions.