Skip to main content
Required ACL: browse This helper method iterates over the paginated API response from the Browse API operation and lets you run an aggregator function on every iteration. You can use this, for example, to retrieve all records from your index.

Usage

using Algolia.Search.Clients;
using Algolia.Search.Models.Search;

var appID = "ALGOLIA_APPLICATION_ID";
var apiKey = "ALGOLIA_API_KEY";

var client = new SearchClient(appID, apiKey);

var results = await client.BrowseObjectsAsync<Hit>("ALGOLIA_INDEX_NAME", new BrowseParamsObject { Query = "test" });

results.ToList().ForEach(record => Console.WriteLine($"  - Record: {record.ObjectID}"));

Parameters

  • C#
  • Go
  • Java
  • JavaScript
  • Kotlin
  • PHP
  • Python
  • Ruby
  • Scala
  • Swift
indexName
string
required
Index name from which to retrieve the records.
browseParams
BrowseParamsObject
required
Parameters for the Browse for records request.
T
typeparam
The model for your records, for example, Algolia.Search.Models.Search.Hit.
requestOptions
RequestOptions
Additional request options.
I