# Search Products by Parameters — Barcode Lookup

> Search for products by parameters. See the documentation

- Key: `barcode_lookup-search-products-by-parameters`
- Type: Action (Read-only)
- Version: 0.0.3
- App: Barcode Lookup (`barcode_lookup`) — https://pipedream.com/apps/barcode-lookup.md
- This page (HTML): https://pipedream.com/apps/barcode-lookup/actions/search-products-by-parameters
- Hints: read-only · open-world
- Source: https://github.com/PipedreamHQ/pipedream/blob/master/components/barcode_lookup/actions/search-products-by-parameters/search-products-by-parameters.mjs

## Description

Search for products by parameters. [See the documentation](https://www.barcodelookup.com/api-documentation)

## Props

| Prop | Type | Required | Description |
|---|---|---|---|
| `mpn` | `string` | No | MPN parameter is the manufacturer part number. E.g. **LXCF9407** |
| `asin` | `string` | No | ASIN parameter is the Amazon Standard Identification Number. E.g. **B079L4WR4T** |
| `title` | `string` | No | Search by product name (title) for any item. E.g. **Red Running Shoes** |
| `category` | `string` | No | Search by category - based on Google's product taxonomy. E.g. **Home & Garden > Decor** |
| `manufacturer` | `string` | No | search by manufacturer - use double quotes ("") around value for an exact match. E.g. **"Samsung"** |
| `brand` | `string` | No | Search by brand - use double quotes ("") around value for an exact match. E.g. **"Calvin Klein"** |
| `search` | `string` | No | Query all the search fields including title, category, brand and MPN. E.g. **"Air Jordan Red Shoes Size 40"** |
| `geo` | `string` | No | Filter online store results by geographical location |
| `maxResults` | `integer` | No | The maximum number of results to return |

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

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: "barcode_lookup-search-products-by-parameters",
  arguments: {
    mpn: "MPN",
    asin: "ASIN",
  },
})
```

**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: "barcode_lookup-search-products-by-parameters",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    barcode_lookup: { authProvisionId: "apn_xxxxxxx" },
    mpn: "MPN",
    asin: "ASIN",
  },
})

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": "barcode_lookup-search-products-by-parameters",
    "configured_props": {
      "barcode_lookup": { "authProvisionId": "apn_xxxxxxx" },
      "mpn": "MPN",
      "asin": "ASIN"
    }
  }'
```

---

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