Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.tryprofound.com/llms.txt

Use this file to discover all available pages before exploring further.

Most “us vs. them” recipes need to know which assets in a category belong to you. This call returns every asset with its is_owned flag plus its website and alternate domains — everything you need for filtering and domain matching.

How this example works

  1. One call per category. Cache the result if you’re going to make many report calls — assets change infrequently.
  2. Filter by is_owned to get just your assets.
  3. Combine website + alternate_domains to build the full set of domains you own (used by the Citation Share recipe).
import os
from profound import Profound

client = Profound(api_key=os.environ["PROFOUND_API_KEY"])

# What to fetch — replace with your own values.
CATEGORY_NAME = "<your-category-name>"


def list_owned(category_id):
    """Return (owned_asset_names, owned_domains) for the category."""
    names, domains = [], []
    for a in client.organizations.categories.assets(category_id):
        if not a.is_owned:
            continue
        names.append(a.name)
        if a.website:
            domains.append(a.website)
        domains.extend(a.alternate_domains or [])
    return names, domains


# Helper — translate the category name to the UUID the report API expects.

def find_category_id(name):
    """Return the UUID of the category whose name matches (case-insensitive)."""
    for c in client.organizations.categories.list():
        if c.name.lower() == name.lower():
            return c.id
    raise ValueError(f"No category named {name!r}")


# Resolve name → ID, then list owned assets and domains.
category_id = find_category_id(CATEGORY_NAME)
owned_names, owned_domains = list_owned(category_id)

print("Owned assets:")
for n in owned_names:
    print(f"  - {n}")

print("\nOwned domains:")
for d in owned_domains:
    print(f"  - {d}")

Companion lookups

The same categories/{id}/... pattern works for other category resources:
PathReturns
/categories/{id}/assetsAssets in the category (used above)
/categories/{id}/topicsTopics covered by the category
/categories/{id}/tagsTags configured for the category
/categories/{id}/personasPersonas configured for the category
/categories/{id}/promptsPrompts the category runs against