Gemini, Microsoft Copilot, Perplexity & the AI Tool LandscapePerplexity and research engines · Lesson 12 of 19

Perplexity for teams: Spaces, Comet and the Sonar API

Article · 18 min · 8 min lecture

Video lecture

Perplexity for teams: Spaces, Comet and the Sonar API

15 chapters · about 8 min · full transcript

Coming soon

Chapter 1 of 15

Perplexity for teams

  • Spaces
  • Comet
  • The Sonar API

The narrated lecture is in production

Every chapter is scripted and ready. Browse the chapters and read the full transcript now — the video will appear here when it’s published.

Chapters

Spaces: organised, reusable research

Spaces group research threads around a topic, client or project, with custom instructions and uploaded files (file uploads require a paid plan; limits vary). Use them to:

  • Keep all research for a client in one place with instructions like "Prefer official Saudi and UAE sources; always give dates; flag commercial sources".
  • Combine web search with your own files (a brief, previous reports) in one answer.
  • Share with colleagues so research is not repeated.

Enterprise plans add admin controls such as SSO, user management, and organisational data settings; check Perplexity's enterprise documentation for current details.

Comet: an agentic browser

Comet is Perplexity's AI browser, free to download on desktop and mobile. Its assistant can summarise pages, compare tabs, and carry out multi-step tasks on websites (filling forms, navigating, collecting information), with your permission. Safety rules for agentic browsers:

  • Start with logged-out, low-risk tasks (comparing public product pages).
  • Avoid letting the agent act on banking, ad accounts, admin consoles or email unless your organisation approves.
  • Watch for prompt injection: pages can contain hidden instructions aimed at AI agents.
  • Review before submitting anything; take over manually for logins and payments.
  • On work devices, follow your IT policy; enterprise deployment options exist.

The Sonar API: cited answers inside your products

Perplexity's developer platform offers the Sonar family of search-grounded models (for example sonar, sonar-pro, and reasoning and deep-research variants) through a chat-completions-style API, plus a Search API that returns ranked web results. Responses include citations and search results your application can display. Check the docs for current model names and pricing (requests are priced per token and per search).

Hands-on: competitor news digest with the Sonar API

pip install perplexityai
export PERPLEXITY_API_KEY="pplx-..."    # never commit it
import os
from perplexity import Perplexity

client = Perplexity()  # reads PERPLEXITY_API_KEY
MODEL = os.environ.get("PPLX_MODEL", "sonar")

def competitor_digest(company: str, market: str) -> str:
    try:
        resp = client.chat.completions.create(
            model=MODEL,
            messages=[
                {"role": "system", "content": (
                    "You are a market analyst. Use only information from the last 30 days. "
                    "Five bullets maximum, each with a date. Say 'No notable news' if none.")},
                {"role": "user", "content": f"Notable news about {company} in {market}."},
            ],
            search_recency_filter="month",
        )
    except Exception as e:  # log and fall back gracefully in production
        return f"Digest unavailable for {company}: {type(e).__name__}"

    answer = resp.choices[0].message.content
    sources = [f"- {r.title} ({r.date or 'no date'}): {r.url}" for r in (resp.search_results or [])]
    return f"## {company}\n{answer}\n\nSources:\n" + "\n".join(sources)

if __name__ == "__main__":
    for c in ["Competitor A", "Competitor B"]:
        print(competitor_digest(c, "UAE"))

You can restrict sources with search_domain_filter (for example, to official domains) and schedule the script weekly, posting results to Slack or email through your automation tool. Always show the source links in the digest so readers can verify.

The Search API for your own pipelines

If you want raw ranked results (to feed your own model or analysis), the Search API returns titles, URLs, dates and snippets:

results = client.search.create(query="UAE influencer advertising permit requirements", max_results=5)
for r in results.results:
    print(r.title, r.url)

Worked example: an agency's Monday digest

A Dubai agency runs the digest script every Monday for eight clients' top competitors, restricted to the last month, and posts it into each client's Slack channel via n8n. Account managers open any source before mentioning it to a client. Research time for weekly updates drops substantially, and clients comment on the timeliness of competitor insights.

Cost and reliability tips for the API

  • Start with the smallest Sonar model that meets quality; use reasoning or deep-research variants only where needed.
  • Cache results for identical queries within a day to avoid paying twice.
  • Handle errors and timeouts with a clear fallback message, as in the script.
  • Log the query, model, cost and sources for every digest so you can audit what was sent to clients.
  • Review a sample of digests weekly against their sources; tighten the system prompt when you see drift.

Choosing between Spaces, Comet and the API

Use Spaces when people research interactively and want shared context; Comet when a person needs help on live web pages; the Sonar API when the same research runs on a schedule or inside another product. Many teams use all three: analysts research in Spaces, the API produces weekly digests, and Comet handles one-off web chores.

Pitfalls

  • Letting an agentic browser act on logged-in, high-risk sites.
  • Hard-coding API keys.
  • Publishing API answers without showing sources.
  • Uploading confidential files to personal accounts or unapproved Spaces.

How to measure success

Research lives in shared Spaces instead of scattered tabs, agentic browsing stays within safe tasks, and automated digests arrive on schedule with verifiable sources.

Key takeaways

  • Spaces organise shared research with custom instructions and files; enterprise plans add admin controls.
  • Comet is an agentic AI browser: start with logged-out, low-risk tasks and avoid high-risk logged-in sites; beware prompt injection.
  • The Sonar API returns search-grounded answers with citations and search results; the Search API returns ranked results.
  • Automate digests with recency and domain filters, keep keys in environment variables, and always show sources.

Check your understanding

Quick questions to lock in the lesson. They don’t count towards your certificate.

  1. Which task is the safest first use of an agentic browser like Comet?
  2. Your Sonar API digest will be posted to clients. What must it include?

Put it into practice

Create a Space for one client or topic with source instructions, or run the Sonar digest script for two competitors. Open every cited source and note any claim that was outdated or unsupported.

Enrol for free to save your progress

Reading is always free. Enrol to keep your place, take the final assessment and earn a verifiable certificate.