> ## Documentation Index
> Fetch the complete documentation index at: https://api.docs.dealmachine.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Claude Code

> Use DealMachine as a Claude Code skill for natural language property search

# Claude Code Integration

Use DealMachine directly from Claude Code to search properties, find contacts, and build lists using natural language. The DealMachine CLI acts as a Claude Code skill that translates your requests into API calls.

## Setup

### 1. Install the CLI

```bash theme={null}
npm install -g dealmachine
```

### 2. Authenticate

```bash theme={null}
dm login
```

### 3. Use with Claude Code

Once authenticated, you can reference DealMachine data in your Claude Code conversations:

```
You: Use the DealMachine API to find properties in Austin, TX
     with high equity that are owned by out-of-state owners.

Claude: I'll use the DealMachine CLI to search for those properties.
        Let me first check what filters are available...
```

## What the Agent Can Do

### Property Search

Describe the properties you're looking for and the agent will:

1. Query the API for available filter fields
2. Match your description to the correct filters
3. Execute the search and return results

```
"Find single family homes in Dallas County worth over $300k
 with at least 60% equity, owned for 10+ years"
```

### Contact Lookup

Find property owners and their contact information:

```
"Get the owners of these 5 properties and their phone numbers"
```

### Filter Discovery

The agent can help you understand what's available:

```
"What filters can I use to search for distressed properties?"
"Show me all the demographic filters available"
```

### List Management

Build and manage targeted lists:

```
"Create a list called 'High Equity Austin' with these results"
"Add the pre-foreclosure properties to my existing list"
```

## How Natural Language Filtering Works

The DealMachine API exposes filter and field metadata that AI agents use to translate natural language into structured queries:

```
Your request:
  "Absentee owners in Austin with 40%+ equity owned 10+ years"

Agent generates:
  {
    "location": { "cities": ["Austin"] },
    "absenteeOwner": true,
    "equityPercent": { "min": 40 },
    "yearsOwned": { "min": 10 }
  }

API returns:
  1,247 matching properties
```

The agent knows:

* **Available filters** - from `GET /v1/filters`
* **Available fields** - from `GET /v1/fields`
* **Field types** - number ranges, booleans, multi-select options
* **Valid options** - property types, MLS statuses, location formats
* **Your context** - organization, credits remaining, saved filters

## Best Practices

<AccordionGroup>
  <Accordion title="Start broad, then refine">
    Begin with a general search and let the agent help you narrow down:

    ```
    "Find investment properties in Houston"
    -> "Now filter to just the ones with pre-foreclosure status"
    -> "Show me only the ones owned by individuals, not corporations"
    ```
  </Accordion>

  <Accordion title="Ask about available filters">
    If you're not sure what's possible, ask:

    ```
    "What demographic filters are available?"
    "Can I filter by lien amount?"
    "What MLS statuses can I search for?"
    ```
  </Accordion>

  <Accordion title="Check credits before large exports">
    ```
    "How many credits do I have left?"
    "How many results would this search return before I export?"
    ```
  </Accordion>

  <Accordion title="Use saved filters">
    Reference your saved filters by name:

    ```
    "Run my 'High Equity Austin' filter"
    "Update my saved filter to also include multi-family"
    ```
  </Accordion>
</AccordionGroup>

## Related Agent Options

For direct AI-client integration, use the [DealMachine MCP Server](/ai-assistants/mcp-server). The CLI is best when a coding agent can run shell commands. The MCP server is best when an AI client can connect to remote MCP Tools directly.
