troubleshooting Question

Return results from two countrys in Adwords API

Avatar of Pedro Chagas
Pedro ChagasFlag for Portugal asked on
Web Development SoftwarePHP
2 Comments1 Solution496 ViewsLast Modified:
Hi E's, For get relation keywords I use Adwords API.
# Create seed keyword structure.
$seed_keyword =
  '<negative>false</negative>' .
  '<text>'.$wordforapi.'</text>' .
$use_synonyms = '<useSynonyms>true</useSynonyms>';

# Get keyword variations.
$request_xml =
  '<getKeywordVariations>' .
  '<seedKeywords>' . $seed_keyword . '</seedKeywords>' .
  $use_synonyms .
  '<languages>pt</languages>' .
  '<countries>PT</countries>' .
In line of code you can see above, I tell to the API, I want relation keywords of word "europe", from Portuguese language and from Portugal country.
I want extend the result for two country's at the same time. I don't know if adwords api accept this.

So, if I want extend the country to Portugal and Brazil at the same time what I put between <countries>....</countries>.
I try to put PT-BR and PT, BR, and the system return this error: This country code is not valid.  PT-BR.
Maybe what I want is not possible, but I have to make sure.

Regards, JC

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 2 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 2 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros