CONNECT APP
Build with Search API
Developer Tools
- API key
MCP
Give your agent Search API tools
Every Search API action is exposed as an MCP tool on Pipedream's remote server. Point a client at it with your end user's ID and Connect resolves that user's Search API account for each tool call — you store no tokens.
// accessToken: mint a short-lived token with the Connect SDK — see the MCP guide
const transport = new StreamableHTTPClientTransport(
new URL("https://remote.mcp.pipedream.net/v3"),
{
requestInit: {
headers: {
Authorization: `Bearer ${accessToken}`,
"x-pd-project-id": "{project_id}",
"x-pd-environment": "production",
"x-pd-external-user-id": "{external_user_id}", // any stable ID for this user in your system
"x-pd-app-slug": "search_api",
},
},
},
)
const mcp = new Client({ name: "my-agent", version: "1.0.0" })
await mcp.connect(transport)
const { tools } = await mcp.listTools()
// e.g. run Google Images API:
const result = await mcp.callTool({
name: "search_api-google-images",
arguments: {
q: "Query",
size: "Size",
},
})# access_token: mint a short-lived token with the Connect SDK — see the MCP guide
headers = {
"Authorization": f"Bearer {access_token}",
"x-pd-project-id": "{project_id}",
"x-pd-environment": "production",
"x-pd-external-user-id": "{external_user_id}", # any stable ID for this user in your system
"x-pd-app-slug": "search_api",
}
async with streamablehttp_client("https://remote.mcp.pipedream.net/v3", headers=headers) as (read, write, _):
async with ClientSession(read, write) as session:
await session.initialize()
tools = await session.list_tools()
# e.g. run Google Images API:
result = await session.call_tool("search_api-google-images", {
"q": "Query",
"size": "Size",
})API PROXY
Call the Search API API directly
For an endpoint with no pre-built tool, the Connect proxy forwards your request to the Search API API with the connected user's credentials attached. You store no tokens and write no refresh logic.
const resp = await pd.proxy.get({
externalUserId: "{external_user_id}", // any stable ID for this user in your system
accountId: "apn_xxxxxxx",
url: "https://www.searchapi.io/api/v1/search",
})
// Any allowed Search API endpoint works here. Pipedream attaches the
// connected account's credentials to the outgoing request.# The path segment is the target URL, URL-safe base64 encoded:
# https://www.searchapi.io/api/v1/search
curl "https://api.pipedream.com/v1/connect/{project_id}/proxy/aHR0cHM6Ly93d3cuc2VhcmNoYXBpLmlvL2FwaS92MS9zZWFyY2g?external_user_id={external_user_id}&account_id=apn_xxxxxxx" \
-H "Authorization: Bearer {access_token}" \
-H "x-pd-environment: production"SDK
Run Search API actions from your backend
Connect a user's Search API account once, then run Google Images API on their behalf from your own code — TypeScript, Python, or plain HTTP.
import { PipedreamClient } from "@pipedream/sdk"
const pd = new PipedreamClient({
projectId: process.env.PIPEDREAM_PROJECT_ID!,
clientId: process.env.PIPEDREAM_CLIENT_ID!,
clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
projectEnvironment: "production",
})
const result = await pd.actions.run({
id: "search_api-google-images",
externalUserId: "{external_user_id}", // any stable ID for this user in your system
configuredProps: {
search_api: { authProvisionId: "apn_xxxxxxx" },
q: "Query",
size: "Size",
},
})from pipedream import Pipedream
pd = Pipedream(
client_id="{oauth_client_id}",
client_secret="{oauth_client_secret}",
project_id="{project_id}",
project_environment="production",
)
result = pd.actions.run(
id="search_api-google-images",
external_user_id="{external_user_id}", # any stable ID for this user in your system
configured_props={
"search_api": {"authProvisionId": "apn_xxxxxxx"},
"q": "Query",
"size": "Size",
},
)curl -X POST https://api.pipedream.com/v1/connect/{project_id}/actions/run \
-H "Content-Type: application/json" \
-H "X-PD-Environment: production" \
-H "Authorization: Bearer {access_token}" \
-d '{
"external_user_id": "{external_user_id}",
"id": "search_api-google-images",
"configured_props": {
"search_api": { "authProvisionId": "apn_xxxxxxx" },
"q": "Query",
"size": "Size"
}
}'TOOLS
Search API actions
On-demand operations your product or agent can configure and run on behalf of a connected user.
-
Google Images API
actionRun a Google Images search. Returns animagesarray; thumbnails are inlined, so keepnumsmall to limit the response size. See the documentationRead-onlyv0.0.4 -
Google Jobs API
actionSearch real-time Google Jobs listings. Returns ajobsarray. Each page returns about 10 jobs; pass a previous run'spagination.next_page_tokenas Next Page Token for more. See the documentationRead-onlyv0.0.2 -
Google Search API
actionRun a Google web search. Returnsorganic_resultsalongside whichever other blocks Google included for the query See the documentationRead-onlyv0.0.4 -
Google Trends API
actionGet Google Trends data for one or more terms; compare terms by passing them comma-separated inq, e.g.HubSpot,Salesforce.dataTypedecides the block returned:TIMESERIESgivesinterest_over_time,GEO_MAPgivesinterest_by_region,RELATED_QUERIESgivesrelated_queries,RELATED_TOPICSgivesrelated_topics. Values are relative popularity indices (0-100), not search volumes. See the documentationRead-onlyv0.0.4 -
List Locations
actionList the Google locations supported for geo-targeting. See the documentationRead-onlyv0.0.2
EVENTS
Search API triggers
Event sources your backend can deploy for users and receive through a webhook.
No Search API triggers are available yet.
MULTI-APP
Use Search API with other popular apps
Most products don't stop at one integration. Pair Search API with the other apps your users rely on, and ship use cases that span both.
- App slug
- search_api
- Authentication
- API key
- Categories
- Developer Tools
- Actions
- 5
- Triggers
- 0
- API proxy
- Available