# IP History — ViewDNS.info

> Retrieves the IP address history for a domain. See the documentation

- Key: `viewdns_info-ip-history`
- Type: Action (Read-only)
- Version: 0.0.2
- App: ViewDNS.info (`viewdns_info`) — https://pipedream.com/apps/viewdns-info.md
- This page (HTML): https://pipedream.com/apps/viewdns-info/actions/ip-history
- Hints: read-only · open-world
- Source: https://github.com/PipedreamHQ/pipedream/blob/master/components/viewdns_info/actions/ip-history/ip-history.mjs

## Description

Retrieves the IP address history for a domain. [See the documentation](https://viewdns.info/api/ip-history/)

## Props

| Prop | Type | Required | Description |
|---|---|---|---|
| `domain` | `string` | Yes | The domain name to retrieve the historical IP addresses for (e.g., example.com). |

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

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: "viewdns_info-ip-history",
  arguments: {
    domain: "Domain",
  },
})
```

**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: "viewdns_info-ip-history",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    viewdns_info: { authProvisionId: "apn_xxxxxxx" },
    domain: "Domain",
  },
})

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": "viewdns_info-ip-history",
    "configured_props": {
      "viewdns_info": { "authProvisionId": "apn_xxxxxxx" },
      "domain": "Domain"
    }
  }'
```

---

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