Location Filter is borderline useless in the API

NOTE THAT I HAD TO REMOVE THE H FROM HTTPS LINKS BECAUSE THAT THIS FORUM SAID “NEW USERS CAN ONLY HAVE 2 LINKS PER POST”.

:bug: Describe the Bug

Instead of giving actual recommendations of nearby restaurants or being able to do thing like tell fun facts of what’s nearby, it just googles random articles online and doesn’t seem to factor any of the location in. I am in SF, I am using SF coordinates, it still recommends coffee shops in Pittsburgh etc.

:white_check_mark: Expected Behavior

Give food recommendations or answer questions about “where am I”, based off of the given coordinates and country.

:cross_mark: Actual Behavior

It recommends random stuff based off of articles rather than location.

:counterclockwise_arrows_button: Steps to Reproduce

  1. Call the API with the following request:
  2. Observe the unexpected behavior.

:pushpin: API Request & Response (if applicable)

curl --location ‘ttps://api.perplexity.ai/chat/completions’
–header ‘Authorization: Bearer (key redacted)’
–header ‘Content-Type: application/json’
–data ‘{
“model”: “sonar”,
“messages”: [
{“role”: “system”, “content”: “You are a helpful local guide.”},
{“role”: “user”, “content”: “What are some good coffee shops nearby?”}
],
“web_search_options”: {
“user_location”: {
“latitude”: (redacted somewhere in SF),
“longitude”: (redacted somewhere in SF),
“country”: “US”
},
“search_context_size”: “high”
}
}’
{“id”: “fd6c3781-a189-4b01-a833-285878180033”, “model”: “sonar”, “created”: 1750270152, “usage”: {“prompt_tokens”: 15, “completion_tokens”: 383, “total_tokens”: 398, “search_context_size”: “high”}, “citations”: [“ttps://indianapoliscoffeeguide.com/coffee-shops/”, “ttps://periodicadventures.com/best-coffee-shops-in-knoxville-tn/”, “ttps://ww.discovertheburgh.com/pittsburgh-coffee-shops/”, “ttps://www.tripadvisor.com/Restaurants-g60956-zfg9900-San_Antonio_Texas.html”, “ttps://thefresnan.com/good-coffee-shops-in-fresno/”, “ttps://jessicalynnwrites.com/2021/03/the-best-coffee-shops-in-albuquerque/”], “search_results”: [{“title”: “The Best Coffee Shops in Indianapolis”, “url”: “ttps://indianapoliscoffeeguide.com/coffee-shops/”, “date”: null}, {“title”: “Local’s Favorite Coffee Shops in Knoxville, TN - Periodic Adventures”, “url”: “ttps://periodicadventures.com/best-coffee-shops-in-knoxville-tn/”, “date”: “2024-05-03”}, {“title”: “46 Pittsburgh Coffee Shops to Grab a Delicious Brew”, “url”: “ttps://www.discovertheburgh.com/pittsburgh-coffee-shops/”, “date”: “2025-05-25”}, {“title”: “THE BEST Coffee & Tea in San Antonio - Tripadvisor”, “url”: “ttps://www.tripadvisor.com/Restaurants-g60956-zfg9900-San_Antonio_Texas.html”, “date”: null}, {“title”: “Good Coffee Shops In Fresno - The Fresnan”, “url”: “ttps://thefresnan.com/good-coffee-shops-in-fresno/”, “date”: “2024-12-17”}, {“title”: “The Best Coffee Shops in Albuquerque - Jessica Lynn Writes”, “url”: “ttps://jessicalynnwrites.com/2021/03/the-best-coffee-shops-in-albuquerque/”, “date”: null}], “object”: “chat.completion”, “choices”: [{“index”: 0, “finish_reason”: “stop”, “message”: {“role”: “assistant”, “content”: “Finding a good coffee shop can be a challenge, but I’m here to help you discover some great spots near major cities. Here are some recommendations:\n\n## Indianapolis, Indiana\n- Monon Coffee Company: Known for its cozy atmosphere and excellent coffee.\n- Open Society: Offers a variety of coffee drinks and supports local artists.\n- You can find more great spots in the city by checking out local coffee guides like the one at Indianapolis Coffee Guide [1].\n\n## Knoxville, Tennessee\n- Awaken Coffee: Offers a beautiful setting with local art and seasonal coffee specials. They have two locations, one in Old City and another in Kern\u2019s Food Hall [2].\n- Honeybee Coffee and Brewery: Combines coffee with a brewery, offering a relaxed atmosphere and board games. They have multiple locations in Knoxville [2].\n\n## Pittsburgh, Pennsylvania\n- Delanie’s Coffee: Features a spacious interior with local art and a diverse menu including juices and sandwiches [3].\n- Yinz Coffee: Offers a Pittsburgh-themed experience with a casual vibe and great nitro cold brew [3].\n\n## San Antonio, Texas\n- Local Coffee at the Pearl Brewery: Highly rated for its atmosphere and coffee quality [4].\n- Commonwealth Coffeehouse: Known for its cozy setting and excellent service [4].\n\n## Fresno, California\n- Alchemist Coffee Lab: Offers a unique coffee experience with a focus on quality and craftsmanship [5].\n- Kuppa Joy: Popular for its multiple locations and great coffee options [5].\n\n## Albuquerque, New Mexico\n- Little Bear Coffee: Cozy atmosphere and limited but excellent coffee menu [6].\n- Satellite Coffee: Known for its extensive menu and cozy coffee shop feel [6].\n\nThese are just a few of the many great coffee shops in these cities. You can explore more based on local preferences and reviews”}, “delta”: {“role”: “assistant”, “content”: “”}}]}%

:globe_showing_europe_africa: Environment

  • API Version: Sonar API
  • SDK (if applicable): General API
  • Operating System: MacOS w/ curl call in terminal.

:paperclip: Logs or Screenshots (if applicable)

Add any logs or screenshots that can help debug the issue.

:memo: Additional Context

Add any other context about the problem here.