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
92 changes: 92 additions & 0 deletions pages/toolkits/search/google_jobs.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
# 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 job openings with Google Jobs."
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 Google Jobs toolkit provides a pre-built set of tools for interacting with Google Jobs. These tools make it easy to build agents and AI apps that can:

- Search for job openings with Google Jobs.

## 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={[["SearchJobs", "Search for job openings with Google Jobs."]]}
/>

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

## SearchJobs

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

Search for job openings with Google Jobs.

**Auth:**

- **Environment Variables Required:**
- `SERP_API_KEY`: Your SerpAPI API key.

**Parameters**

- **`query`** _(string, required)_ Search query. Provide a job title, company name, and/or any keywords in general representing what kind of jobs the user is looking for.
- **`location`** _(string, optional, Defaults to `None`)_ Location to search for jobs. E.g. 'United States' or 'New York, NY'. Defaults to None.
- **`language`** _(string, optional, Defaults to 'en' English)_ 2-character language code to use in the Google Maps search.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't this about Jobs? Why are we talking about maps search?

- **`limit`** _(int, optional, Defaults to 10)_ Maximum number of results to retrieve. Defaults to 10 (max supported by the API).
- **`next_page_token`** _(string, optional, Defaults to `None`)_ Next page token to paginate results. Defaults to None (start from the first page).

## Auth

The Arcade Google Maps toolkit uses the [SerpAPI](https://serpapi.com/) to get directions and search Google Maps.

**Global Environment Variables:**

- `SERP_API_KEY`: Your SerpAPI API key.
20 changes: 20 additions & 0 deletions pages/toolkits/search/reference.mdx
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand why we need this page. Should we link to it from other places? Why not embed this with maps tool

Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Reference for Search Toolkit

## GoogleMapsDistanceUnit

Distance unit to use in the Google Maps search.

- **`KM`**: Kilometers.
- **`MI`**: Miles.

## GoogleMapsTravelMode

Travel mode to use in the Google Maps search.

- **`BEST`**: Best mode.
- **`DRIVING`**: Driving mode.
- **`MOTORCYCLE`**: Motorcycle mode.
- **`PUBLIC_TRANSPORTATION`**: Public transportation mode.
- **`WALKING`**: Walking mode.
- **`BICYCLE`**: Bicycling mode.
- **`FLIGHT`**: Flight mode.
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import { Arcade } from "@arcadeai/arcadejs";

const client = new Arcade(); // Automatically finds the `ARCADE_API_KEY` env variable

const USER_ID = "[email protected]";
const TOOL_NAME = "Search.SearchJobs";

const toolInput = {
query: "software engineer",
location: "United States",
language: "en",
limit: 10,
};

const response = await client.tools.execute({
tool_name: TOOL_NAME,
input: toolInput,
user_id: USER_ID,
});

console.log(response);
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
from arcadepy import Arcade

client = Arcade() # Automatically finds the `ARCADE_API_KEY` env variable

USER_ID = "[email protected]"
TOOL_NAME = "Search.SearchJobs"

tool_input = {
"query": "software engineer",
"location": "United States",
"language": "en",
"limit": 10,
}

response = client.tools.execute(
tool_name=TOOL_NAME,
input=tool_input,
user_id=USER_ID,
)
print(response)
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import OpenAI from "openai";

const USER_ID = "[email protected]";
const PROMPT =
"Search for 'software engineer' job openings in the United States.";
const TOOL_NAME = "Search.SearchJobs";

const client = new OpenAI({
baseURL: "https://api.arcade.dev",
apiKey: process.env.ARCADE_API_KEY,
});

const response = await client.chat.completions.create({
messages: [{ role: "user", content: PROMPT }],
model: "gpt-4o-mini",
user: USER_ID,
tools: [TOOL_NAME],
tool_choice: "generate",
});

console.log(response.choices[0].message.content);
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import os
from openai import OpenAI

USER_ID = "[email protected]"
PROMPT = "Search for 'software engineer' job openings in the United States."
TOOL_NAME = "Search.SearchJobs"

client = OpenAI(
base_url="https://api.arcade.dev", api_key=os.environ.get("ARCADE_API_KEY")
)

response = client.chat.completions.create(
messages=[
{"role": "user", "content": PROMPT},
],
model="gpt-4o-mini",
user=USER_ID,
tools=[TOOL_NAME],
tool_choice="generate",
)
print(response.choices[0].message.content)
Binary file added public/images/icons/google_maps.png
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs to be a square 96 x 96 pixels. If you need help getting that, let me know

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as you were reviewing, I was migrating everything to another PR: #193

I'm applying all your suggestions there, thanks!

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
19 changes: 14 additions & 5 deletions src/components/custom/Toolkits/toolkits-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ export const categories: Category[] = [
{ id: "social", name: "Social & Communication" },
{ id: "development", name: "Developer Tools" },
{ id: "entertainment", name: "Entertainment" },
{ id: "search", name: "Search" },
];

export const tools: Tool[] = [
Expand Down Expand Up @@ -118,11 +119,19 @@ export const tools: Tool[] = [
type: "arcade",
},
{
name: "Search",
image: "serpapi",
summary: "Perform web searches and retrieve relevant information",
link: "/toolkits/development/search",
category: "development",
name: "Google Search",
image: "google_search",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does this image exist?

summary: "Perform Google searches and retrieve relevant information",
link: "/toolkits/search/google_search",
category: "search",
type: "arcade",
},
{
name: "Google Jobs",
image: "google_jobs",
summary: "Search for job openings with Google Jobs",
link: "/toolkits/search/google_jobs",
category: "search",
type: "arcade",
},
{
Expand Down