Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
},
"devDependencies": {
"@cloudflare/next-on-pages": "1.13.7",
"@eslint/js": "^9.22.0",
"@next/eslint-plugin-next": "^15.1.3",
"@types/mdx": "^2.0.13",
"@types/node": "22.10.5",
Expand All @@ -58,9 +59,12 @@
"@typescript-eslint/eslint-plugin": "^8.19.0",
"@typescript-eslint/parser": "^8.19.0",
"autoprefixer": "^10.4.20",
"eslint": "^9.22.0",
"eslint-config-next": "^15.1.3",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-prettier": "^5.2.1",
"eslint-plugin-react": "^7.37.4",
"eslint-plugin-react-hooks": "^5.2.0",
"globals": "^15.14.0",
"husky": "^9.1.7",
"lint-staged": "^15.3.0",
Expand Down
10 changes: 10 additions & 0 deletions pages/toolkits/search/reference.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -356,3 +356,13 @@ Defines the sorting options for hotel search results.
- **`ye`**: Yemen
- **`zm`**: Zambia
- **`zw`**: Zimbabwe


## WalmartSortBy

- **`RELEVANCE`**: `'relevance'` - Sort by relevance.
- **`PRICE_LOW_TO_HIGH`**: `'lowest_price_first'` - Sort by price from low to high.
- **`PRICE_HIGH_TO_LOW`**: `'highest_price_first'` - Sort by price from high to low.
- **`BEST_SELLING`**: `'best_selling_products_first'` - Sort by best selling.
- **`RATING_HIGH`**: `'highest_rating_first'` - Sort by rating from high to low.
- **`NEW_ARRIVALS`**: `'new_arrivals_first'` - Sort by new arrivals.
121 changes: 121 additions & 0 deletions pages/toolkits/search/walmart.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
# Walmart Search

import ToolInfo from "@/components/ToolInfo";
import Badges from "@/components/Badges";
import TabbedCodeBlock from "@/components/TabbedCodeBlock";
import TableOfContents from "@/components/TableOfContents";

<ToolInfo
description="Enable agents to search for products with Walmart."
author="Arcade"
codeLink="https://github.com/ArcadeAI/arcade-ai/tree/main/toolkits/search"
authType="API Key"
versions={["0.1.0"]}
/>

<Badges repo="arcadeai/arcade_search" />

The Arcade Walmart Search toolkit provides a pre-built set of tools for interacting with Walmart. These tools make it easy to build agents and AI apps that can:

- Search for products listed on Walmart stores;
- Get details about a product.

## Install

```bash
pip install arcade_search
```

<Note>
pip installing the toolkit is only needed if you are [self-hosting](/home/install/overview) Arcade. You do not need to install the toolkit if you're using Arcade Cloud.
</Note>

## Available Tools

<TableOfContents
headers={["Tool Name", "Description"]}
data={
[
["SearchWalmartProducts", "Search for products listed on Walmart stores."],
["GetWalmartProductDetails", "Get details about a product listed on Walmart."],
]
}
/>

<Tip>
If you need to perform an action that's not listed here, you can [get in touch
with us](mailto:[email protected]) to request a new tool, or [create your
own tools](/home/build-tools/create-a-toolkit).
</Tip>

## SearchWalmartProducts

<br />
<TabbedCodeBlock
tabs={[
{
label: "Call the Tool Directly",
content: {
Python: ["/examples/integrations/toolkits/search/walmart/search_walmart_products_example_call_tool.py"],
JavaScript: ["/examples/integrations/toolkits/search/walmart/search_walmart_products_example_call_tool.js"],
},
},
{
label: "Execute the Tool with OpenAI",
content: {
Python: ["/examples/integrations/toolkits/search/walmart/search_walmart_products_example_llm_oai.py"],
JavaScript: ["/examples/integrations/toolkits/search/walmart/search_walmart_products_example_llm_oai.js"],
},
},
]}
/>

Search for products listed on Walmart stores.

**Parameters**

- **keywords** _(string, required)_ Keywords to search for. E.g. 'apple iphone' or 'samsung galaxy'
- **sort_by** _(enum ([WalmartSortBy](/toolkits/search/reference#walmartsortby)), optional, Defaults to `WalmartSortBy.RELEVANCE`)_ Sort the results by the specified criteria. Defaults to `WalmartSortBy.RELEVANCE`.
- **min_price** _(float, optional, Defaults to `None`)_ Minimum price to filter the results.
- **max_price** _(float, optional, Defaults to `None`)_ Maximum price to filter the results.
- **next_day_delivery** _(bool, optional, Defaults to `False`)_ Whether to filter the results by next day delivery. Defaults to False (returns all products, regardless of delivery status).
- **page** _(int, optional, Defaults to `1`)_ Page number to fetch. Defaults to 1 (first page of results). The maximum page value is 100.


## GetWalmartProductDetails

<br />
<TabbedCodeBlock
tabs={[
{
label: "Call the Tool Directly",
content: {
Python: ["/examples/integrations/toolkits/search/walmart/get_product_details_example_call_tool.py"],
JavaScript: ["/examples/integrations/toolkits/search/walmart/get_product_details_example_call_tool.js"],
},
},
{
label: "Execute the Tool with OpenAI",
content: {
Python: ["/examples/integrations/toolkits/search/walmart/get_product_details_example_llm_oai.py"],
JavaScript: ["/examples/integrations/toolkits/search/walmart/get_product_details_example_llm_oai.js"],
},
},
]}
/>

Get details about a product listed on Walmart.

**Parameters**

- **item_id** _(string, required)_ Item ID. E.g. '414600577'. This can be retrieved from the search results of the `SearchWalmartProducts` tool.

## Auth

The Arcade Walmart Search toolkit uses the [SerpAPI](https://serpapi.com/) to get product information from Walmart.

- **Secret:**
- `SERP_API_KEY`: Your SerpAPI API key.
<Note>
Setting the `SERP_API_KEY` secret is only required if you are [self-hosting](/home/install/overview) Arcade. If you're using Arcade Cloud, the secret is already set for you. To manage your secrets, go to the [Secrets page](https://api.arcade.dev/dashboard/auth/secrets) in the Arcade Dashboard.
</Note>
146 changes: 146 additions & 0 deletions pages/toolkits/search/youtube.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,146 @@
# YouTube Search

import ToolInfo from "@/components/ToolInfo";
import Badges from "@/components/Badges";
import TabbedCodeBlock from "@/components/TabbedCodeBlock";
import TableOfContents from "@/components/TableOfContents";

<ToolInfo
description="Enable agents to search for products with Walmart."
author="Arcade"
codeLink="https://github.com/ArcadeAI/arcade-ai/tree/main/toolkits/search"
authType="API Key"
versions={["0.1.0"]}
/>

<Badges repo="arcadeai/arcade_search" />

The Arcade YouTube Search toolkit provides a pre-built set of tools for interacting with YouTube. These tools make it easy to build agents and AI apps that can:

- Search for videos on YouTube;
- Get details about a video.

## Install

```bash
pip install arcade_search
```

<Note>
pip installing the toolkit is only needed if you are [self-hosting](/home/install/overview) Arcade. You do not need to install the toolkit if you're using Arcade Cloud.
</Note>

## Available Tools

<TableOfContents
headers={["Tool Name", "Description"]}
data={
[
["SearchYoutubeVideos", "Search for videos on YouTube."],
["GetYoutubeVideoDetails", "Get details about a video on YouTube."],
]
}
/>

<Tip>
If you need to perform an action that's not listed here, you can [get in touch
with us](mailto:[email protected]) to request a new tool, or [create your
own tools](/home/build-tools/create-a-toolkit).
</Tip>

## SearchYoutubeVideos

<br />
<TabbedCodeBlock
tabs={[
{
label: "Call the Tool Directly",
content: {
Python: ["/examples/integrations/toolkits/search/youtube/search_youtube_videos_example_call_tool.py"],
JavaScript: ["/examples/integrations/toolkits/search/youtube/search_youtube_videos_example_call_tool.js"],
},
},
{
label: "Execute the Tool with OpenAI",
content: {
Python: ["/examples/integrations/toolkits/search/youtube/search_youtube_videos_example_llm_oai.py"],
JavaScript: ["/examples/integrations/toolkits/search/youtube/search_youtube_videos_example_llm_oai.js"],
},
},
]}
/>

Search for videos on YouTube.

**Parameters**

- **keywords** _(string, required)_ Keywords to search for. E.g. 'apple iphone' or 'samsung galaxy'
- **`language_code`** _(string, optional, Defaults to 'en' English)_ 2-character language code to use in the YouTube search. A list of supported language codes can be found [here](/toolkits/search/reference#languagecodes).
- **`country_code`** _(string, optional, Defaults to 'us' United States)_ 2-character country code to use in the YouTube search. A list of supported country codes can be found [here](/toolkits/search/reference#countrycodes).
- **`next_page_token`** _(string, optional, Defaults to 'None')_ The next page token to use for pagination. Defaults to `None` (start from the first page).


## GetYoutubeVideoDetails

<br />
<TabbedCodeBlock
tabs={[
{
label: "Call the Tool Directly",
content: {
Python: ["/examples/integrations/toolkits/search/youtube/get_youtube_video_details_example_call_tool.py"],
JavaScript: ["/examples/integrations/toolkits/search/youtube/get_youtube_video_details_example_call_tool.js"],
},
},
{
label: "Execute the Tool with OpenAI",
content: {
Python: ["/examples/integrations/toolkits/search/youtube/get_youtube_video_details_example_llm_oai.py"],
JavaScript: ["/examples/integrations/toolkits/search/youtube/get_youtube_video_details_example_llm_oai.js"],
},
},
]}
/>

Get details about a video on YouTube.

**Parameters**

- **video_id** _(string, required)_ Video ID. E.g. '414600577'. This can be retrieved from the search results of the `SearchYoutubeVideos` tool.
- **`language_code`** _(string, optional, Defaults to 'en' English)_ 2-character language code to use in the YouTube search. A list of supported language codes can be found [here](/toolkits/search/reference#languagecodes).
- **`country_code`** _(string, optional, Defaults to 'us' United States)_ 2-character country code to use in the YouTube search. A list of supported country codes can be found [here](/toolkits/search/reference#countrycodes).

## Auth

The Arcade YouTube Search toolkit uses the [SerpAPI](https://serpapi.com/) to get video information from YouTube.

- **Secret:**
- `SERP_API_KEY`: Your SerpAPI API key.
<Note>
Setting the `SERP_API_KEY` secret is only required if you are [self-hosting](/home/install/overview) Arcade. If you're using Arcade Cloud, the secret is already set for you. To manage your secrets, go to the [Secrets page](https://api.arcade.dev/dashboard/auth/secrets) in the Arcade Dashboard.
</Note>


## Default parameter values

Language and Country are configurable through environment variables. When set, they will be used as default for YouTube tools.

Providing a different value as `language_code` or `country_code` argument in a tool call will override the default value set in the environment variables.

**Language**

The language code is a 2-character code that determines the language in which the API will search and return video information. There are two environment variables:

- `ARCADE_GOOGLE_LANGUAGE`: a default value for all Google Search tools. If not set, defaults to 'en' (English).
- `ARCADE_YOUTUBE_SEARCH_LANGUAGE`: a default value for the YouTube Search tools. If not set, defaults to `ARCADE_GOOGLE_LANGUAGE`.

A list of supported language codes can be found [here](/toolkits/search/reference#languagecodes).

**Country**

The country code is a 2-character code that determines the country in which the API will search for videos:

- `ARCADE_GOOGLE_COUNTRY`: a default value for all Google Search tools. If not set, defaults to `None`.
- `ARCADE_YOUTUBE_SEARCH_COUNTRY`: a default value for the YouTube Search tools. If not set, defaults to `ARCADE_GOOGLE_COUNTRY`. If `ARCADE_GOOGLE_COUNTRY` is not set, the default country for YouTube tools will be `us` (United States).

A list of supported country codes can be found [here](/toolkits/search/reference#countrycodes).
Loading