---
updatedAt: 2026-05-04T14:51:47.000Z
agentTools:
  projectIndex: https://support.regrid.com/llms.txt
---

# Using an LLM with Regrid API

Integrating the Regrid Parcel API into an LLM (Large Language Model) or AI Agent system requires a different architectural approach than standard web integrations. Because LLMs are non-deterministic and can "loop" or perform broad searches, unoptimized usage can lead to rapid credit depletion and unexpected overages.

This guide outlines best practices for developers building AI-driven property tools to ensure efficiency and cost-control.

***

### **1. Understanding Usage in an LLM Context**

Unlike a human user who clicks a single button, an LLM agent might interpret a prompt like *"Find all properties owned by John Smith in Texas"* by making dozens of API calls.

* **Billing Metric:** Regrid bills based on **Parcel Records Returned**, not just the number of API requests.
  * **The LLM Risk:** If an LLM is given a broad tool (e.g., `query`), it may inadvertently trigger a search that returns 500+ records (the maximum is 1,000 per request). If the agent does this across multiple counties, you could consume your entire monthly quota in minutes.
    * **Default Behavior:** By default, Regrid returns **20 records** per request. If your LLM doesn't specify a limit, it will pull 20 records even if it only needs one, doubling or tripling your expected cost. <br />

### **2. How Overages Occur (Self-Serve Plans)**

Self-serve plans come with a pre-set number of monthly parcel records of 2,000 parcel records and 200,000 tiles however the Self-serve API is a hybrid model and overages start after the pre-set has been consumed.

* **The "Above and Beyond" Factor:** Once your monthly quota is met, the API does not necessarily hard-stop (depending on your plan configuration).
  * **Automatic Top-offs:** Many self-serve systems are designed to allow "overage buckets" to ensure your application doesn't break. If an LLM agent gets stuck in a logic loop—repeatedly querying the same area or expanding a search radius—it can trigger multiple overage charges before you receive a billing alert.
    * **Broad Geometries:** In LLM systems using spatial tools, an agent might draw a large bounding box or polygon. If that polygon covers a dense urban area, a single "search" could return hundreds of records, each counting against your bill.
  * **Set Usage Limits Manually:** Navigate to your Usage dashboard and change the limit usage to set a maximum spend per month. This will ensure that you are not hit with an unexpected high bill based on using the API in an LLM.
  * **Usage Notifications:** A usage notification is automatically sent when usage has reach 80% of 2,000 parcel records. This is your warning to review your usage. No change to your behavior will automatically start generating overages once the 2,000 parcel records have been surpassed.

### **3. Best Practices for LLM Implementation**

#### **A. Strict Token Engineering (The "Limit" Parameter)**

Never give an LLM "blind" access to the API. Hard-code a `limit` parameter in your tool definition.

* **Best Practice:** Set a system-level `limit=2` or `limit=5` for general lookups.
  * **Example Prompt for the Agent:** *"You are an assistant that finds property data. You must ALWAYS include `limit=1` in your API call if the user is asking about a specific address."* <br />

#### **B. Use the Usage Endpoint for Self-Correction**

Integrate the **Regrid Usage API Endpoint** into your LLM’s "system prompt."

* **Mechanism:** Have the agent check its remaining balance before performing "expensive" operations (like polygon searches).
  * **Agent Logic:** *"If remaining\_balance < 1000, warn the user that broad searches are restricted."* <br />

#### **C. Implement "Human-in-the-loop" for Large Queries**

If the LLM determines it needs to pull more than 50 records to answer a question:

* **Best Practice:** Program the agent to stop and ask: *"This search will return 450 parcel records. Do you wish to proceed?"* This prevents automated "hallucinations" from draining your account.
  * Invoke the `return_count` parameter to check the number of parcel records the specific request would return to determine the decision <br />

#### **D. Spatial Constraints**

LLMs are notoriously bad at estimating latitude/longitude coordinates.

* **The Fix:** Use a geocoding service (like Google or Mapbox) to convert addresses to precise points *before* calling Regrid. Use the **Point-in-Polygon** or **Radius** search with a very small radius (e.g., 10 meters) to ensure you only return the single, correct parcel. <br />

### **4. Summary Checklist for Reducing Usage**

| Feature                | Best Practice                                                    | Impact |
| :--------------------- | :--------------------------------------------------------------- | :----- |
| **Limit Parameter**    | Always append `&limit=x` to every request.                       | High   |
| **Search Specificity** | Use `address` or `apn` (parcel number) over `owner_name`.        | Medium |
| **Cache Results**      | Store GeoJSON responses in a local DB for 30 days.               | High   |
| **Usage Monitoring**   | Programmatically call the `/usage` endpoint daily.               | Medium |
| **Radius Control**     | Set a maximum allowable radius (e.g., <0.5 miles) for LLM tools. | High   |

***

**Developer Note:** If you are building a high-traffic LLM application, contact Regrid at `parcels@regrid.com` to discuss an **Enterprise License**. Enterprise plans offer more predictable pricing and higher rate limits (standard is \~200 requests/min), which are often necessary for the "bursty" nature of AI agents.