Skip to main content

Scenario

You need a quick sentiment read on a specific business — is the trend positive or negative? Yelp’s API returns up to 3 review excerpts per business (full reviews require scraping, which violates ToS). You pull these excerpts and send them to Mavera Chat for rapid sentiment classification. It’s a fast signal — not deep analysis — useful for screening competitors or monitoring your own listings. Flow: Yelp GET /businesses/{id}/reviews → Up to 3 excerpts → Mavera POST /responses → Quick sentiment classification

Architecture

Code

Example Output

Error Handling

Yelp’s API returns a maximum of 3 review excerpts per business. This is a ToS limitation — do not scrape for more. Use the excerpts as a directional signal only.
Yelp uses URL-slug-style IDs (e.g., houndstooth-coffee-austin). Find them via business search or from Yelp page URLs.
With only 3 excerpts, confidence should be interpreted loosely. Flag any result with confidence below 0.6 as “insufficient data.”