Search Communities

This endpoint allows you to search for communities using keywords and various filters.

Search Communities

GET https://api.whisk.com/community/v2/search

You can append the following query parameters to the base URL to search communities:

Query Parameters

Headers

{
  "communities": [
    {
      "community": {
        "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
      },
      "is_member": true
    }
  ],
  "paging": {
    "cursors": {
      "after": "string",
      "before": "string"
    },
    "total": "string"
  }
}

Here are a few examples of communities search:

Example 1 - Top 3 Oldest Vegan Communities on Whisk

Let's assume that you need to find the top 3 oldest vegan communities on Whisk. You can find it easily using a combination of filter.diets, sorting.by, sorting.direction and paging.limit parameters. Here is how a curl request would look and the sample response you may get:

With time, the response results may differ due to the activity that may have happened on the Whisk platform.

curl -X GET "https://api.whisk.com/community/v2/search?filters.diets=DIET_VEGAN&sorting.by=SEARCH_SORT_BY_CREATED_AT&sorting.direction=SORT_DIRECTION_ASC&paging.limit=3"
    -H "Accept: application/json" 
    -H "Authorization: Bearer <YOUR-API-ACCESS-KEY>"

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 here.

Example 2 - Communities for Asian Cuisine containing Seafood recipes

Let's assume that you want to find communities created specifically for Asian cuisine and has Seafood recipes. Additionally, for each community found, you would like to retrieve its Description and Recipe Count. You can perform this search using the query, filters.cuisines and fields parameters. Here is how a curl request would look and the sample response you may get:

Note: With time, the response results may differ due to the activity that may have happened on the Whisk platform.

curl -X GET "https://api.whisk.com/community/v2/search?query=seafood&filters.cuisines=CUISINE_ASIAN&sorting.by=SEARCH_SORT_BY_INVALID&sorting.direction=SORT_DIRECTION_INVALID&fields=COMMUNITY_FIELD_DESCRIPTION&fields=COMMUNITY_FIELD_RECIPES_COUNT"
    -H "Accept: application/json"
    -H "Authorization: Bearer <YOUR-API-ACCESS-KEY>"

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 here.

Example 3 - Communities for Salad Recipes filtered by User Preferences

Let's assume that you want to find communities created for Salad recipes containing one or more recipes that include Chicken Breast as an ingredient. Additionally, you would also like the search to consider your User Preferences while filtering communities. You can perform this search using the filters.meal_types, filters.ingredients and filters.apply_user_preferences parameters. Here is how a curl request would look and the sample response you may get:

Depending on your user preferences and time, the results in the response may differ.

curl -X GET "https://api.whisk.com/community/v2/search?filters.meal_types=MEAL_TYPE_SALADS&filters.ingredients=chicken%20breast&filters.apply_user_preferences=true&sorting.by=SEARCH_SORT_BY_INVALID&sorting.direction=SORT_DIRECTION_INVALID"
    -H "Accept: application/json" 
    -H "Authorization: Bearer <YOUR-API-ACCESS-KEY>"

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 here.

Last updated