> For the complete documentation index, see [llms.txt](https://docs.datafiniti.co/llms.txt).
> Use it to discover all available pages before exploring further.

# Property Data

Search millions of property records using the Datafiniti API.



<PlaygroundComponent />

<AuthParams schemes={["BearerAuth"]}>
<AuthType scheme="BearerAuth">
<ParamField header="Authorization" param-type="string" required="true">
Bearer token. Bearer token obtained from the /auth endpoint. Include in requests as: Authorization: Bearer \<token>
</ParamField>
</AuthType>
</AuthParams>

<BodyParams contentTypes={["application/json"]} defaultType="application/json">
  <ContentType type="application/json">
<ParamField showLocation="false" body="query" param-type="string" required="true">
The search query using Datafiniti query syntax (e.g., `country:US AND province:FL`)
</ParamField>

<ParamField showLocation="false" body="num_records" param-type="integer" required="false">
The number of records your request will return, and the number of credits that will be deducted from your account. For non-downloads, the maximum is 10 records.
</ParamField>

<ParamField showLocation="false" body="format" param-type="string" required="false" enum="json,csv">
Must be either `json` or `csv`. Defaults to `json`.
</ParamField>

<ParamField showLocation="false" body="fuzzy_match" param-type="string" required="false" enum="on,off,retry">
Controls how the `address` field is matched against Datafiniti's records.

- `on`: Datafiniti attempts to match the `address` field using its own normalization standard, autocorrecting the supplied value to a matching record.
- `off`: The `address` field value is matched exactly as supplied, with no normalization.
- `retry`: Datafiniti first matches as if `off`. If no match is found, it then attempts to fuzzy match as if `on`.

Defaults to `on`. You can choose not to declare this value.
</ParamField>

<ParamField showLocation="false" body="download" param-type="boolean" required="false">
Whether or not to start a download for this search.
</ParamField>

<ParamField showLocation="false" body="view" param-type="string" required="false">
Specify a view you have created, or use a pre-made view. The view filters what data is displayed in your search results. If using `auto_trace=true`, leave blank or include `people.people_keys:*` in your view.
</ParamField>

<ParamField showLocation="false" body="auto_trace" param-type="boolean" required="false">
Whether to autotrace property data with people data records that match. Set to `true` or `false`.
</ParamField>

<ParamField showLocation="false" body="only_traceable" param-type="boolean" required="false">
Whether the records returned must have people data in the dataset. Set to `true` or `false`.
</ParamField>
  </ContentType>
</BodyParams>

<Request tabs="curl,python,javascript,go,ruby">

```bash
curl -X POST "https://api.datafiniti.co/v4/properties/search" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -d '{
  "query": "country:US AND province:FL",
  "num_records": 1,
  "format": "JSON"
}'
```

```python
import requests
import json

url = "https://api.datafiniti.co/v4/properties/search"
headers = {
  "Content-Type": "application/json",
  "Authorization": "Bearer YOUR_API_TOKEN"
}
data = {
  "query": "country:US AND province:FL",
  "num_records": 1,
  "format": "JSON"
}

response = requests.post(url, headers=headers, json=data)
print(response.json())
```

```javascript
const response = await fetch("https://api.datafiniti.co/v4/properties/search", {
  method: "POST",
  headers: {
  "Content-Type": "application/json",
  "Authorization": "Bearer YOUR_API_TOKEN"
},
  body: JSON.stringify({
  "query": "country:US AND province:FL",
  "num_records": 1,
  "format": "JSON"
})
});

const data = await response.json();
console.log(data);
```

```go
package main

import (
    "fmt"
    "net/http"
    "bytes"
    "encoding/json"
)

func main() {
    data := []byte(`{
  "query": "country:US AND province:FL",
  "num_records": 1,
  "format": "JSON"
}`)

    req, err := http.NewRequest("POST", "https://api.datafiniti.co/v4/properties/search", bytes.NewBuffer(data))
    if err != nil {
        panic(err)
    }

    req.Header.Set("Content-Type", "application/json")
    req.Header.Set("Authorization", "Bearer YOUR_API_TOKEN")

    client := &http.Client{}
    resp, err := client.Do(req)
    if err != nil {
        panic(err)
    }
    defer resp.Body.Close()

    fmt.Println("Response Status:", resp.Status)
}
```

```ruby
require 'net/http'
require 'json'

uri = URI('https://api.datafiniti.co/v4/properties/search')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true

request = Net::HTTP::Post.new(uri)
request['Content-Type'] = 'application/json'
request['Authorization'] = 'Bearer YOUR_API_TOKEN'
request.body = '{
  "query": "country:US AND province:FL",
  "num_records": 1,
  "format": "JSON"
}'

response = http.request(request)
puts response.body
```

</Request>

### Responses

<div data-component="ResponsesCollection"><Expandable title="200 - Successful search returning matching property records" default-open="true">

<ResponseField name="num_found" field-type="integer" required="false">
Total number of matching records found
</ResponseField>

<ResponseField name="total_cost" field-type="number" required="false">
Total credit cost for this request
</ResponseField>

<ResponseField name="records" field-type="object[]" required="false">
Array of matching records
</ResponseField>

<ResponseField name="download_id" field-type="string" required="false">
Download ID if download was requested (only present when download: true)
</ResponseField>

</Expandable>

<Expandable title="400 - Invalid query syntax or malformed parameters" default-open="false">

<ResponseField name="error" field-type="string" required="false">
Error message describing what went wrong
</ResponseField>

</Expandable>

</div>

<Response tabs="200,400">

```json
{
  "num_found": 42,
  "total_cost": 3.14,
  "records": [
    {}
  ],
  "download_id": "example_string"
}
```

```json
{
  "error": "Bad Request",
  "message": "The request contains invalid parameters or malformed data",
  "code": 400,
  "details": [
    {
      "field": "email",
      "message": "Invalid email format"
    }
  ]
}
```

</Response>

<Card title="Autotrace" href="/docs/autotrace-property" icon="link" horizontal="false">
  Learn how to use autotrace to combine property and people data.
</Card>

<Callout kind="info" collapsed="false">
  Autotrace property x people data only applies to records with people.title:owner populated. You will not receive any records until this people title is populated.
</Callout>

<Callout kind="alert" collapsed="false">
  Autotrace requires both a people and property data plan to work. One record returned will consume 1 people data and 1 property data credit. If you have questions about how this works please contact [support@datafiniti.co](mailto:support@datafiniti.co).
</Callout>

<Callout kind="alert" collapsed="false">
  The `num_records` parameter is **required** when requesting property data. If it is not included in your request, you will receive the error: `"should have required property 'num_records'"`.
</Callout>

<Callout kind="tip" collapsed="false">
  We recommend using the [count feature](/docs/count-property) first to determine the exact number of records available for your query. You can also set `num_records` to a higher number than expected — you will only be charged for the records you actually download, not the number you request.
</Callout>

