# Search Places on Google Maps — Outscraper

> Searches for places on Google Maps using queries. See the documentation

- Key: `outscraper-search-places`
- Type: Action (Read-only)
- Version: 0.0.3
- App: Outscraper (`outscraper`) — https://pipedream.com/apps/outscraper.md
- This page (HTML): https://pipedream.com/apps/outscraper/actions/search-places
- Hints: read-only · open-world
- Source: https://github.com/PipedreamHQ/pipedream/blob/master/components/outscraper/actions/search-places/search-places.mjs

## Description

Searches for places on Google Maps using queries. [See the documentation](https://app.outscraper.com/api-docs#tag/Businesses-and-POI/paths/~1maps~1search-v3/get)

## Props

| Prop | Type | Required | Description |
|---|---|---|---|
| `query` | `string` | Yes | You can use anything that you would use on a regular Google Maps site. Additionally, you can use google_id (feature_id), place_id, or CID. Examples of valid queries: Real estate agency, Rome, Italy, The NoMad Restaurant, NY, USA, restaurants, Brooklyn 11203, 0x886916e8bc273979:0x5141fcb11460b226, ChIJrZhup4lZwokRUr_5sLoFlDw, etc. |
| `limit` | `integer` | No | The limit of organizations to take from one query search. |
| `coordinates` | `string` | No | The latitude and longitude of the location where you want your query to be applied, e.g. 37.427074,-122.1439166 |
| `language` | `string` | No | The language to use. |
| `region` | `string` | No | The country to use, recommended for a better search experience. |

## Run it

**MCP**

```ts
import { Client } from "@modelcontextprotocol/sdk/client/index.js"
import { StreamableHTTPClientTransport } from "@modelcontextprotocol/sdk/client/streamableHttp.js"
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 accessToken = await pd.rawAccessToken

const transport = new StreamableHTTPClientTransport(
  new URL("https://remote.mcp.pipedream.net/v3"),
  {
    requestInit: {
      headers: {
        Authorization: `Bearer ${accessToken}`,
        "x-pd-project-id": process.env.PIPEDREAM_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": "outscraper",
      },
    },
  },
)

const mcp = new Client({ name: "my-agent", version: "1.0.0" })
await mcp.connect(transport)

const { tools } = await mcp.listTools()

// listTools() hands your model this tool's input schema, so it can
// fill the arguments itself:
const result = await mcp.callTool({
  name: "outscraper-search-places",
  arguments: {
    query: "Query",
    limit: 10,
  },
})
```

**TypeScript**

```ts
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: "outscraper-search-places",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    outscraper: { authProvisionId: "apn_xxxxxxx" },
    query: "Query",
    limit: 10,
  },
})

console.log(result)
```

**cURL**

```bash
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": "outscraper-search-places",
    "configured_props": {
      "outscraper": { "authProvisionId": "apn_xxxxxxx" },
      "query": "Query",
      "limit": 10
    }
  }'
```

---

- App: https://pipedream.com/apps/outscraper.md · All apps: https://pipedream.com/apps
