# Request Bulk Number Lookup — CommPeak

> Perform a bulk number lookup, to later fetch the results when the operation is finished. See the documentation

- Key: `commpeak-request-bulk-number-lookup`
- Type: Action (Read-only)
- Version: 0.0.3
- App: CommPeak (`commpeak`) — https://pipedream.com/apps/commpeak.md
- This page (HTML): https://pipedream.com/apps/commpeak/actions/request-bulk-number-lookup
- Hints: read-only · open-world
- Source: https://github.com/PipedreamHQ/pipedream/blob/master/components/commpeak/actions/request-bulk-number-lookup/request-bulk-number-lookup.mjs

## Description

Perform a bulk number lookup, to later fetch the results when the operation is finished. [See the documentation](https://lookup.api-docs.commpeak.com/?_gl=1*50xs02*_gcl_au*MTMxMzgzMzA3Ny4xNjk3NTY0NDE3#cda1e4c3-963e-4d9e-b9a7-16b6616bdda5)

## Props

| Prop | Type | Required | Description |
|---|---|---|---|
| `keys` | `integer[]` | Yes | The numbers to perform the lookup on. Up to 200 phone numbers are supported per a single request. |
| `requestType` | `string` | Yes | The lookup type. |
| `respondUrl` | `string` | No | The URL to which results will be sent as a callback once they're ready. This can be the URL of an HTTP source. Alternatively, you can use the Get Bulk Lookup Results action to fetch the results manually. |

## 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": "commpeak",
      },
    },
  },
)

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: "commpeak-request-bulk-number-lookup",
  arguments: {
    keys: [10],
    requestType: "Request Type",
  },
})
```

**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: "commpeak-request-bulk-number-lookup",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    commpeak: { authProvisionId: "apn_xxxxxxx" },
    keys: [10],
    requestType: "Request Type",
  },
})

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": "commpeak-request-bulk-number-lookup",
    "configured_props": {
      "commpeak": { "authProvisionId": "apn_xxxxxxx" },
      "keys": [10],
      "requestType": "Request Type"
    }
  }'
```

---

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