How can we access the Ads Action Stats list in the Facebook Marketing API, using the Python SDK? - facebook-ads-api

I have been trying to access the list on the Facebook Ads API for a few days now but haven't been able to make any headway.
I need to pull the purchase_roas field which is part of the Ads Action Stats List. However, I'm not able to do so.
I'm using the Python SDK and have been looking all over the place for some examples but haven't been able to find any!
Any directions or sample code would really help here. Thanks so much in advance.

This is an example code of fetching the ROAS on an ad account:
insights = FBAdAccount(fbid=adaccount_fb_id).get_insights(
params={'date_preset':AdsInsights.DatePreset.lifetime},
fields=[AdsInsights.Field.actions,
AdsInsights.Field.website_purchase_roas,
AdsInsights.Field.mobile_app_purchase_roas,
])
Note that the website_purchase_roas returns a list rather than a number. In addition - if your ad account has no ROAS no list would be returned.

Related

How to get place description using Google API or any other API?

I am using Google API to get the place information and store it into database. Using Google API I am able to get address, opening hours, rating and reviews as shown in below image.
But, I am not able to get place description which is highlighted in below image in red circle. ("Quaint Italian mainstay for deep-dish, Chicago-style pizza, calzones, pastas & hot dogs.")
I want that information in my application. I think google is taking those information from
Freebase https://developers.google.com/freebase/guide/basic_concepts
Wikipedia https://www.mediawiki.org/wiki/How_to_contribute
But I am not sure.
Can any one help me suggest me that how I can get that information or any other API that I can use to get that information based on google place_id.
Any help would be highly appreciated.
Thank you
Accordingly to the documentation and #xomena, currently you cannot obtain this data via Places API. There is a feature request in Google issue tracker to make the detailed business type available in Places API, however Google doesn't expose any ETA (estimation time of arrival:
https://issuetracker.google.com/issues/35822953
Feel free to star this feature request to express your interest and subscribe to notification from Google.
To my knowledge it is not possible to get this information from the Google Places API. The API documentation does not display the venue description. Try to have a look here: https://developers.google.com/places/web-service/details (it might be that Google does not share all information from their platform with other developers..).
I would suggest you to do one of the following (or perhaps both):
Scrape Google the old school way; i.e. by getting the information from the HTML. There is a quite decent guide for doing that here (you would of course have to adjust the example to scraping Google instead): https://medium.freecodecamp.org/how-to-scrape-websites-with-python-and-beautifulsoup-5946935d93fe.
What I would recommend and which probably is the fastest: enrich your current data with other data. You could e.g. use Foursquare and search for the places you get from Google. It should be possible to get the description for each place on Foursquare. See here: https://developer.foursquare.com/docs/api/venues/details. If you have problems with matching the places after your query has returned, because the venue names are not exactly the same - but close, then you could use an algorithm to match strings that are close; perhaps using the levenstein distance (https://en.wikipedia.org/wiki/Levenshtein_distance).

Outlook/Exchange RoomFinder (w/ Lex)

I'm an intern and I've been tasked with creating a RoomFinder API for Outlook that works with Amazon's Lex/Lambda to find a location and schedule meetings given a list of participants. The API is supposed to be able to pull the calendars from Outlook for the individual participants, find a time that works for all of them and a location with a proper seating capacity, and then schedule the meeting+add it to the calendars of those involved. I have a pretty good understanding of how Lex works and have created my own functions using Lambda before but I don't even know where to begin when it comes to pulling the calendars from Outlook for the participants.
I have been trying to get an idea of how to go about this for a few days now and found some information on Outlook's REST API which it sounds like can be used to gather some of the needed information but I'm not sure how to actually begin doing that. Here are links to a few of those pages:
https://msdn.microsoft.com/en-us/office/office365/api/use-outlook-rest-api#RegAuthConverged
https://msdn.microsoft.com/en-us/library/office/dn643730(v=exchg.150).aspx
I also managed to find a few pages on GitHub of similar, more basic scripts using Python to acquire things like Room Availability from Outlook but I couldn't get any of those to work. I don't have enough reputation to post more links but if seeing those would help I can maybe comment them later.
I'm really looking for any advice on where to begin or tips on how to get this done. I think I may be on the right track with the REST API idea but I have no clue how to actually use it or set it up.
Any help is appreciated, thanks.
We are just now rolling out a new REST API to list the roomsIDs(findrooms). You can use this in conjunction with the findmeetingtimes API to schedule meetings. Please take a look at the REST API docs here(remember to choose beta in the top-right)
https://msdn.microsoft.com/en-us/office/office365/api/calendar-rest-operations#GetMeetingRooms

Google play developer API - List all apps from my account

Following this guide https://developers.google.com/android-publisher/api-ref/ i am trying to find out if there is a way to list all games from my google play console but i can't find any. Is there a method to list all apps and package names from my account?
Thanks
Maybe this can help. https://stackoverflow.com/a/51984202
As a summary, there are no methods exist in official api. Instead you can use Google Play search functionality.
Alternatively you can also use https://github.com/facundoolano/google-play-scraper project.
For a cloud based solution there is a commercial api https://serpapi.com/google-play-api which has 100 query/month.

Google+ API to get insights data of Google+ pages

For a project, I need to get following information from a Google+ brand page
count reviews
get rating
get reviews
get reviews time stamps
contact information
I have tried finding some API on developers.google.com but failed to get such API. Is there any other way around to get this data? It sounds like a dumb question, but unfortunately I stuck and getting no help from anywhere, that's why I am writing here.
Thanks
Saurabh
You can download a bunch of libraries here that make using these api's pretty simple.
https://developers.google.com/+/downloads/
Look around the pages they also have plenty of example.
https://developers.google.com/+/web/
https://developers.google.com/+/web/api/javascript

Add user review to Google map from my application(Android)

I am trying to create a location-based services Android application. I had successfully getting the user reviews from Google Places API by following the guidance from this link.
https://developers.google.com/places/documentation/details
I also found many posts regarding how to get user reviews from Google Places. But Now I want to create a function which user can insert reviews from my application. Is there anyway to do that?
Thanks.
No. There is no API for writing review. Also the Google+ mobile URL doesn't have the write review option from last year. Its a bug , but Google is not fixing this.
There is only one way to write review is through desktop URL. I have a similar location base app in play store where I have done some workaround to show desktop site to write review.

Resources