Whisk Docs
Whisk HomeHelp CenterDeveloper Tools
v2.0.0
v2.0.0
  • The Whisk Platform
  • Whisk API Overview
    • Introduction
    • Integration
    • Authentication
      • Server Token
      • User Access Token
        • Auth Flow Example
      • Client Token
      • Anonymous Access from Client Apps
    • Whisk Sandbox
    • Getting Started
  • Whisk API Reference 2.0
    • Provisioning
      • Get provisioning
    • Autocomplete
    • Community
      • Get your Communities
      • Get Communities from a Topic
      • Discover Recommended Communities
      • Search Communities
      • Get a Community
      • Get Recipes from a Community
      • Add Recipes to a Community
      • Remove a Recipe from a Community
      • Join a Community
      • Leave a Community
    • Posts and Reviews
      • Get reviews for a recipe
      • Create or edit review
      • Create a Post
      • Get Post by id
      • Delete a Post
      • Edit a Post
      • Report a Post
      • Create a Post Reply
      • Get Post Replies
      • Delete a Post reply
      • Report a Post reply
      • Like a Post or Reply
      • Users who liked a Post or Reply
    • Public profiles
      • Hide recipe in Public profile
      • Get Recipes for Public Profile
      • Get User's public profile by user_id
      • Get User's public profile by username
    • Custom Label
    • Feed
      • Obtain a Recipe Feed
    • Food DB
      • Autocomplete
      • Search
      • Get Food
    • Food List
    • Food Log
    • Foodpairing
    • Healthy meal recommendations
      • Healthy recipe only recommendations for DA
      • Recipe recommendations for SH
      • Tailored Plan API request for Samsung TV
    • Meal Plan
      • Generate a Meal Plan
      • Meal Object
        • Get Meals
        • Delete Meal
        • Add a Meal
      • Meal Plan Settings Object
        • Get Meal Plan Settings
        • Update Meal Plan Settings
      • Meal Plan Batch
    • Recipe
      • Get a Recipe
      • Search a Recipe
      • User Recipes & Collections
        • Add User Recipe
        • Create A Recipe
        • Update External Recipe
        • Get All User Recipes
        • Update User Recipe
        • Remove Recipe from Favorites
        • Create Collection
        • Get All User Collections
        • Get Collection
        • Get Recipes from a Collection
        • Remove Collection
        • Get Smart Collection
        • Get Recipes from a Smart Collection
    • Shopping List
      • Get your Shopping Lists
      • Get a Shopping List
      • Create a Shopping List
      • Delete a Shopping List
      • Update basic details of a Shopping List
      • Move Items between Shopping Lists
      • Add Items to a Shopping List
      • Delete an Item from a Shopping List
      • Update an Item in a Shopping List
      • Clear Items from a Shopping List
    • Media
    • Store Item
    • Unit Conversion
    • Users
      • Get a User
      • Update User Settings using Patch
      • Update User Settings using Post
    • Try it out!
  • Shopping List SDK
    • Overview
    • Examples
      • Shoppable Recipes
      • Shoppable Products
      • Shoppable Media
    • Basic Setup
      • Basic Setup
      • Methods
      • Event Listeners
      • Widget
      • Subscriptions
      • Global Configuration
      • UTM Parameters
      • Using With SPA
  • Shopping List Mobile API
    • Overview
    • Examples
    • Reference
  • API Resources
    • Authentication Scopes
    • Errors and Troubleshooting
    • Cursor Pagination
    • Limits
    • Nutrients
    • Recipe Labels
    • Filtering Recipes using Custom Labels
    • Health Score, Glycemic Index, Glycemic Load
    • Whisk User Data
    • Integrated Retailers
    • Optimizing Image Load
    • Meal Plan
Powered by GitBook
On this page
  • Get Communities by Topic ID
  • Sample Request and Response

Was this helpful?

  1. Whisk API Reference 2.0
  2. Community

Get Communities from a Topic

This endpoint retrieves the list of communities from a specific topic using the topic identifier and pagination filters.

Get Communities by Topic ID

GET https://api.whisk.com/community/v2/by_topic/{topic_id}

You can append the following path and query parameters to the base URL to pull communities from a particular topic:

Path Parameters

Name
Type
Description

topic_id

string

The topic identifier.

Query Parameters

Name
Type
Description

paging.limit

string

The maximum number of communities to retrieve from the topic.

paging.cursors.after

string

This parameter is used for cursor-based pagination. It takes a community ID as its value and retrieves only those communities that appear after it in the database.

paging.cursors.before

string

This parameter is used for cursor-based pagination. It takes a community ID as its value and retrieves only those communities that appear before it in the database

fields

array

Any additional community details to retrieve. You can choose one or more of these supported values: - COMMUNITY_FIELD_DESCRIPTION - COMMUNITY_FIELD_TOPICS - COMMUNITY_FIELD_SOCIAL_SETTINGS - COMMUNITY_FIELD_PERMISSIONS - COMMUNITY_FIELD_MEMBERS_COUNT - COMMUNITY_FIELD_RECIPES_COUNT - COMMUNITY_FIELD_SPONSORED Note: For performance reasons, we recommend using this parameter only when required.

Headers

Name
Type
Description

Authentication

string

User token to authorize the API usage. For more information, see Authentication.

{
  "topic": {
    "id": "string",
    "display_name": "string"
  },
  "communities": [
    {
      "id": "string",
      "name": "string",
      "image": {
        "url": "string",
        "width": 0,
        "height": 0,
        "selection": {
          "x": 0,
          "y": 0,
          "width": 0,
          "height": 0
        }
      },
      "description": "string",
      "topics": [
        {
          "id": "string",
          "display_name": "string"
        }
      ],
      "social_settings": {
        "website_url": "string",
        "instagram_username": "string",
        "youtube_channel_url": "string",
        "tiktok_username": "string"
      },
      "permissions": {
        "role": "COMMUNITY_ROLE_INVALID",
        "mode": "COMMUNITY_CONTRIBUTION_PERMISSION_MODE_INVALID",
        "visibility": "COMMUNITY_VISIBILITY_INVALID"
      },
      "members": {
        "count": 0
      },
      "recipes": {
        "count": 0
      },
      "is_sponsored": true
    }
  ],
  "paging": {
    "cursors": {
      "after": "string",
      "before": "string"
    },
    "total": "string"
  }
}
{
  "error_code": "REAL_CODES_ARE_IN_ENDPOINT_DESCRIPTION",
  "message": "Additional details about error are not static and can be changed"
}
{
  "code": "auth.tokenNotFound"
}
This is unexpected response, something is wrong on our side, please contact: [email protected]

Sample Request and Response

curl -X GET "https://api.whisk.com/community/v2/by_topic/914d167bb1754adbbcd1f085cdcc4f6c?paging.limit=2&fields=COMMUNITY_FIELD_DESCRIPTION&fields=COMMUNITY_FIELD_TOPICS&fields=COMMUNITY_FIELD_SOCIAL_SETTINGS&fields=COMMUNITY_FIELD_PERMISSIONS&fields=COMMUNITY_FIELD_MEMBERS_COUNT&fields=COMMUNITY_FIELD_RECIPES_COUNT&fields=COMMUNITY_FIELD_SPONSORED"
    -H "Accept: application/json"
    -H "Authorization: Bearer <YOUR-API-ACCESS-KEY>"
{
  "topic": {
    "id": "914d167bb1754adbbcd1f085cdcc4f6c",
    "display_name": "Family Friendly"
  },
  "communities": [
    {
      "id": "3a6c952a99ac404f9905c042819be9b9",
      "name": "Toddler Treats",
      "image": {
        ...
      },
      "description": "Healthy toddler treats from snacks to freeze ahead meals.",
      "topics": [
        {
          "id": "914d167bb1754adbbcd1f085cdcc4f6c",
          "display_name": "Family Friendly"
        }
      ],
      "permissions": {
        ...
      },
      "members": {
        "count": 8569
      },
      "recipes": {
        "count": 102
      }
    },
    {
      "id": "948ec40b144845169a21d844b68fa4ce",
      "name": "Fussy Kids",
      "image": {
        ...
      },
      "description": "Healthy dishes my kids go for every time - without realising",
      "topics": [
        {
          "id": "914d167bb1754adbbcd1f085cdcc4f6c",
          "display_name": "Family Friendly"
        }
      ],
      "permissions": {
        ...
      },
      "members": {
        "count": 4702
      },
      "recipes": {
        "count": 25
      }
    }
  ],
  "paging": {
    "cursors": {
      "after": "eyJpZCI6Ijk0OGVjNDBiMTQ0ODQ1MTY5YTIxZDg0NGI2OGZhNGNlIiwiaW5kZXgiOjF9"
    },
    "total": "109"
  }
}
PreviousGet your CommunitiesNextDiscover Recommended Communities

Last updated 4 years ago

Was this helpful?

Note: Whisk allows you to discover and understand its API capabilities on the Swagger interface with the ability to try out the API calls directly in your browser. You can call this endpoint .

Note: To understand the data structure of a community definition, see .

here
Community Object