Thanks for the clarification, @AlonDvirPlus500.
Below is an example of how to do what @majoritasdev described.
To get details for the campaigns associated with your account (this returns 200 results by default):
$ twurl -H ads-api.twitter.com "/1/accounts/XXXXX/campaigns" | jq .
Choose the campaign IDs you want to look up. Use the campaign_ids param and pass in a comma-separated list of IDs to get the line items associated with those campaigns (this returns a max of 1,000 per request):
$ twurl -H ads-api.twitter.com "/1/accounts/XXXXX/line_items?campaign_ids=aaaa,bbbb,cccc" | jq .
(Note: if you want the line items for every campaign, omit the campaign_ids param.)
Finally, you’ll want to get the targeting criteria associated with each line item. You’ll do this for each line item ID (you’ll have to write a loop).
$ twurl -H ads-api.twitter.com "/1/accounts/XXXXX/targeting_criteria?line_item_id=yyyy" | jq '.data | .[] | select(.location_type=="COUNTRY")'
Each line item can have multiple targeting criteria. Because we only want the country information, we use jq '.data | .[] | select(.location_type=="COUNTRY")'.
Hope this helps.