I have a problem with getting reach estimate, especially with geo location id.
It does not work with location id that I retrieve from geo location search api.
result for search query: ‘los angeles’ is below
it’s id is 3b77caf94bfc81fe
{ "id": "3b77caf94bfc81fe", "url": "https://api.twitter.com/1.1/geo/id/3b77caf94bfc81fe.json", "place_type": "city", "name": "Los Angeles", "full_name": "Los Angeles, CA", "country_code": "US", "country": "United States", "contained_within": [{ "id": "e4315a8602024dcb", "url": "https://api.twitter.com/1.1/geo/id/e4315a8602024dcb.json", "place_type": "admin", "name": "Los Angeles CA", "full_name": "Los Angeles CA", "country_code": "US", "country": "United States", "centroid": [-117.27758603727, 35.4554705], "bounding_box": { "type": "Polygon", "coordinates": [ [ [-119.500953, 32.75039], [-119.500953, 38.160551], [-114.29889, 38.160551], [-114.29889, 32.75039], [-119.500953, 32.75039] ] ] }, "attributes": {} }], "centroid": [-118.28758739337, 34.0207895], "bounding_box": { "type": "Polygon", "coordinates": [ [ [-118.668404, 33.704538], [-118.668404, 34.337041], [-118.155409, 34.337041], [-118.155409, 33.704538], [-118.668404, 33.704538] ] ] }, "attributes": {} }
So I put this ID to reach estimate api.
"data": { "product_type": "PROMOTED_TWEETS", "currency": "USD", "objective": "TWEET_ENGAGEMENTS", "campaign_daily_budget_amount_local_micro": 10000, "broad_keywords": "dog", "locations": "3b77caf94bfc81fe" }
I get the result with error that saying
“Location(s) 3b77caf94bfc81fe was not found”
So I tried to use contained_with.id instead. It works.
What is a difference between those two?