Content Targeting with User Segments just works with Content Search Web Parts but some additional work is needed if you want to leverage it with the Search REST API.
Leveraging SharePoint 2013 Search REST API for anonymous users allows you to build powerful search-driven solutions. Often, particularly in the early stages of the project, queries might not work as expected. So how do you find out what’s wrong?
Leveraging the Search REST API allows you to build rich search-driven solutions. If you’re not careful however, you might get results other than intended even though everything seems to be working correctly.
When working with search-driven solutions, or even if you just want to be able to search for people, SharePoint Search has to be granted access to that information in order to crawl it. Generally all of this is being automatically taken care of when provisioning the Search Service Application. On rare occasions you might however need to grant this permission manually.
Recently I wrote a blog post on how standard Managed Properties are not enough for supporting particular scenarios. For example, when building content aggregations sorted on dates or numbers you would need a custom Managed Property. The reason for that is the fact that, although there are some Refinable and Sortable Managed Properties available out of the box with SharePoint, despite the type communicated in Search Schema, they return string data which makes them useless for sorting on numbers.