Activities are detailed records of a user’s actions within the supported data sources. They include a chronological log of interactions such as videos watched on Netflix, purchases made on Amazon, or rides taken with Uber. This data chronicles a user’s behavior and preferences, offering a time-stamped history of their activity.

Retrieving Activities

Connect (Client-Side)

To retrieve activities, you’ll need:

  1. Data Source: In the example below, the data source is uber, you can see a list of valid sources here.
  2. Activity Type: In the example below, the activity type is trip. This varies across data sources. You can find out what activity type on the reference page of the data source in question. For example, on the Booking.com page, you’ll see that it supports trip & stay activity types.

Sauron (Server-Side)

getActivity and lookupActivity let you request end-users activities using a data key.

Activity Response

For a getActivity or lookupActivity request, the response body’s data field is structured like this:

id
string

Unique identifier for the activity.

metadata
ActivityMetadata

Metadata associated with the activity.

Metadata varies by service. See ActivityMetadata for more details.

Pagination

getActivity also responds with pagination information.

limit
int
required

The number of activity records retrieved (per page). The maximum limit is 1000 records.

total
int
required

The total number of activity records.

page
int
required

The current page.

Subject Identifiers

[ActivityMetadata] always includes a subject field, which represents the item your user interacted e.g the products purchased on Amazon.

Gandalf aims to provide a comprehensive list of third-party Identifiers for these subjects, making it easy to fetch related data.

We include commonly recognized identifiers when available. For example:

  • IMDB, TVmaze etc. identifiers for TV Shows & Movies.
  • ASIN identifier for Amazon products.

These identifiers allow you to extract detailed data about these subjects from the respective APIs.

Request a data source

We’re constantly adding new sources and we’d love to hear from you.