Skip to main content

Documentation Index

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

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

DiscoveryService combines two complementary discovery surfaces:
  • Search — full-text query across the catalog.
  • Browse — curated editorial entry points (featured, new releases, charts, genres).
const res = await discovery.search({
  q: "Fairouz",
  types: [ContentType.CONTENT_TYPE_SONG, ContentType.CONTENT_TYPE_ARTIST],
  market: "LB",
  pageSize: 20,
});
ParameterNotes
qThe search string. Required (min length 1).
typesFilter to specific entity kinds. Omit for “everything”.
marketTwo-letter country code (e.g. LB, SA). Defaults to the caller’s market.
page_size / page_tokenStandard cursor pagination, top-level fields.
Results are returned as a list of Content wrappers — branch on the oneof id arm to act on each match.

Browse

RPCWhat it returns
BrowseFeaturedEditorially curated sections (e.g. “Made For You”, “Trending Now”). Each section is a labeled list of Content.
BrowseNewReleasesRecently released items across the catalog.
BrowseChartsAvailable popularity charts with preview entries. Use GetChartEntries for the full chart.
GetChartEntriesPaginated entries for a specific chart.
BrowseGenresList of available genres.
GetGenreContentItems tagged with a genre — paginated and content-type filterable.
Editorial output varies by market — pass market where the RPC accepts it.

When to use which

  • Specific known query? Search. The user typed it.
  • Discovery / open-ended UX? BrowseFeatured for the home screen, BrowseCharts for “what’s hot”, BrowseGenresGetGenreContent for filter-driven browsing.
  • “What’s new?” UX? BrowseNewReleases.

Performance tips

  • Large page_size (up to 100) reduces round-trips for paginated browse output.
  • Search ranking is not stable across queries — don’t paginate deep beyond what your UI actually shows.
  • Charts are recomputed periodically; treat chart entries as a snapshot rather than real-time.