For AI Agents & LLM Browsers
How ChatGPT, Claude, Perplexity, and other AI agents can discover, understand, and efficiently retrieve data from ParcelPlan
Quick Start
-
1
Discover the API →
/api/meta -
2
Read API docs →
/docs -
3
Explore data →
/api/v1/plots -
4
Fetch details →
/api/v1/plots/{id}
For AI Agents & LLM Browsers
This guide explains how AI agents (ChatGPT, Claude, Perplexity, etc.) can discover, understand, and efficiently retrieve data from ParcelPlan.
Quick Start
- Discover the API →
/api/meta - Read API docs →
/docs - Explore data →
/api/v1/plots - Fetch details →
/api/v1/plots/{id}
Discovery Sequence
Step 1: Understand the System
Visit the LLM discovery manifest:
GET /llms.txt
GET /.well-known/llms.txt
This file explains:
- Product name and status
- Supported languages
- Public vs. private content
- API base URLs
- Authentication methods
Step 2: Get API Metadata
Fetch system information:
curl https://parcelplan.laravel.cloud/api/meta
Response:
{
"name": "Parcel Plan API",
"version": "1.0",
"supports_geojson": true,
"authentication": ["sanctum"],
"formats": ["json", "geojson"],
"endpoints": {
"health": "/api/health",
"plots": "/api/v1/plots"
},
"documentation": {
"openapi": "/api/openapi.json",
"openapi_v1": "/api/v1/openapi.json",
"html": "/docs",
"sitemap_xml": "/sitemap.xml"
}
}
Step 3: Review API Documentation
-
Interactive Docs →
/docs- Try out endpoints in browser
- See request/response examples
- Read endpoint descriptions
-
OpenAPI Spec (JSON) →
/api/openapi.json- Machine-readable schema
- Use for code generation
- Recommended for agent parsing
-
Sitemap →
/sitemap.xml- Discover all crawlable URLs
- See update frequency and priority
Step 4: Health Check
Verify API is operational:
curl https://parcelplan.laravel.cloud/api/health
Response:
{
"status": "ok",
"version": "1.0",
"timestamp": "2026-06-05T12:00:00Z"
}
Data Retrieval Patterns
List All Public Plots
Endpoint:
GET /api/v1/plots
Query Parameters:
| Parameter | Type | Default | Example |
|-----------|------|---------|---------|
| page | integer | 1 | ?page=2 |
| per_page | integer | 15 | ?per_page=50 |
| sort_by | string | created_at | ?sort_by=name |
| sort_order | string | desc | ?sort_order=asc |
| search | string | - | ?search=agriculture |
| country | string | - | ?country=PT |
| soil_type | string | - | ?soil_type=Clay |
| owner | integer | - | ?owner=5 |
Example:
# Get Portuguese agricultural plots, sorted by name
curl "https://parcelplan.laravel.cloud/api/v1/plots?country=PT&land_use_category=agriculture&sort_by=name"
Response:
{
"data": [
{
"id": 1,
"slug": "vale-agricola-dao",
"name": "Vale Agrícola do Dão",
"external_id": "PT-2026-001",
"country": "PT",
"state": "Viseu",
"city": "Dão",
"land_use_category": "agriculture",
"intended_species": "wheat",
"soil_type": "Clay loam",
"area_hectares": 45.5,
"purchase_price": 150000.00,
"is_active": true,
"owner": {...},
"created_at": "2026-05-15T10:30:00Z",
"updated_at": "2026-05-20T14:45:00Z"
}
],
"links": {...},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 3,
"per_page": 15,
"to": 15,
"total": 45
}
}
Pagination Notes:
- Default page size: 15 plots
- Use
pageparameter to navigate - Response includes
meta.last_pageto know total pages - Use
per_pageto adjust batch size (max recommended: 100)
Get Single Plot Details
Endpoint:
GET /api/v1/plots/{id}
Example:
curl https://parcelplan.laravel.cloud/api/v1/plots/1
Complete Response Structure:
{
"id": 1,
"slug": "vale-agricola-dao",
"name": "Vale Agrícola do Dão",
"external_id": "PT-2026-001",
"country": "PT",
"state": "Viseu",
"city": "Dão",
"latitude": 40.5234,
"longitude": -7.4567,
"land_use_category": "agriculture",
"intended_species": "wheat",
"soil_type": "Clay loam",
"terrain_type": "rolling hills",
"climate_zone": "temperate",
"annual_rainfall_mm": 650,
"water_availability": "moderate",
"area_hectares": 45.5,
"accessibility_description": "accessible via dirt road",
"purchase_price": 150000.0,
"estimated_land_value": 160000.0,
"is_active": true,
"owner": {
"id": 5,
"name": "João Silva",
"email": "[email protected]"
},
"created_at": "2026-05-15T10:30:00Z",
"updated_at": "2026-05-20T14:45:00Z"
}
Get Specific Plot Data Categories
ParcelPlan provides focused endpoints for each plot attribute group:
Geometry & Location:
GET /api/v1/plots/{id}/geojson # GeoJSON boundaries
GET /api/v1/plots/{id}/geometry # Geometry only
GET /api/v1/plots/{id}/location # Location coordinates
Physical Characteristics:
GET /api/v1/plots/{id}/dimensions # Size and area
GET /api/v1/plots/{id}/soil # Soil type and properties
GET /api/v1/plots/{id}/terrain # Topography
GET /api/v1/plots/{id}/climate # Climate and rainfall
Resources & Access:
GET /api/v1/plots/{id}/water # Water availability
GET /api/v1/plots/{id}/land-use # Land use classification
GET /api/v1/plots/{id}/accessibility# Access routes
Economic Information:
GET /api/v1/plots/{id}/pricing # Price information
GET /api/v1/plots/{id}/summary # Quick overview
Example - Get GeoJSON for mapping:
curl https://parcelplan.laravel.cloud/api/v1/plots/1/geojson
Response (GeoJSON):
{
"type": "Feature",
"geometry": {
"type": "Polygon",
"coordinates": [
[
[-7.4567, 40.5234],
[-7.45, 40.5234],
[-7.45, 40.53],
[-7.4567, 40.53],
[-7.4567, 40.5234]
]
]
},
"properties": {
"id": 1,
"name": "Vale Agrícola do Dão",
"area_hectares": 45.5
}
}
Response Formats
Default: JSON
All endpoints return JSON by default. Example:
curl -H "Content-Type: application/json" \
https://parcelplan.laravel.cloud/api/v1/plots
GeoJSON: Geospatial Queries
Available on plot endpoints for mapping:
curl https://parcelplan.laravel.cloud/api/v1/plots/1/geojson
Format: RFC 7946 compliant GeoJSON Coordinate System: WGS84 (EPSG:4326) Projection: Lat/Long (not projected)
Best Practices
✅ DO
-
Respect rate limiting
- Check response headers:
X-RateLimit-Limit,X-RateLimit-Remaining - If you hit limits, wait before retrying
- Implement exponential backoff for retries
- Check response headers:
-
Cache responses appropriately
- Check
Cache-Controlheaders in responses - Re-fetch infrequently updated data (e.g., plot name) after cache expires
- Don't cache error responses
- Check
-
Batch requests efficiently
- Fetch
/api/v1/plots?per_page=50to get 50 records per request - Reduces number of API calls needed
- Recommended max: 100 plots per request
- Fetch
-
Use specific endpoints for targeted data
- Need GeoJSON? Use
/plots/{id}/geojson, not full/plots/{id} - Need just summary? Use
/plots/{id}/summary - Reduces response size and parsing overhead
- Need GeoJSON? Use
-
Paginate through results
- Don't try to fetch 10,000 plots in one request
- Use pagination:
?page=1&per_page=100, then?page=2&per_page=100, etc. - Check
meta.last_pageto know when to stop
-
Follow canonical URLs
- Use URLs from responses and documentation
- Don't construct URLs manually (they may change in future versions)
❌ DON'T
-
Don't hammer the API with concurrent requests
- Maximum recommended: 5-10 concurrent requests
- Use request queuing for bulk operations
-
Don't retry immediately on failure
- Implement exponential backoff: 1s, 2s, 4s, 8s...
- Stop after 5-6 retries
-
Don't cache dynamically updated data indefinitely
- Plot data updates in real-time
- Cache TTL: 1 hour recommended for most data
-
Don't parse HTML pages instead of using API
- HTML structure may change without notice
- API provides stable, versioned data
- HTML pages are for humans; APIs are for machines
-
Don't share API tokens in code or logs
- Treat tokens like passwords
- Rotate regularly if compromised
Common Use Cases
Use Case 1: Build a Search Index
Crawl all plots and index in your search engine:
import requests
import time
def crawl_all_plots(base_url="https://parcelplan.laravel.cloud"):
page = 1
while True:
response = requests.get(
f"{base_url}/api/v1/plots",
params={"page": page, "per_page": 100}
)
plots = response.json()["data"]
if not plots:
break
for plot in plots:
# Index plot in your search engine
yield plot
page += 1
time.sleep(0.5) # Rate limiting: 0.5s between requests
for plot in crawl_all_plots():
print(f"Indexed: {plot['name']} ({plot['id']})")
Use Case 2: Monitor New Plots
Check for new plots periodically:
# Get latest plots (ordered by created_at desc)
curl "https://parcelplan.laravel.cloud/api/v1/plots?sort_by=created_at&sort_order=desc&per_page=10"
Use Case 3: Filter by Region & Land Use
Find all agricultural plots in Portugal:
curl "https://parcelplan.laravel.cloud/api/v1/plots?country=PT&land_use_category=agriculture"
Use Case 4: Export All Plot Boundaries as GeoJSON
Create a GeoJSON FeatureCollection:
# Pseudo-code:
# 1. Get all plots
# 2. For each plot, fetch /api/v1/plots/{id}/geojson
# 3. Combine into FeatureCollection
# 4. Save as .geojson file
curl "https://parcelplan.laravel.cloud/api/v1/plots?per_page=100" | \
jq -r '.data[].id' | \
while read id; do
curl "https://parcelplan.laravel.cloud/api/v1/plots/$id/geojson"
done
Use Case 5: Multilingual Content
ParcelPlan supports 6 languages:
# Portuguese
curl -H "Accept-Language: pt" https://parcelplan.laravel.cloud/api/v1/plots
# Spanish
curl -H "Accept-Language: es" https://parcelplan.laravel.cloud/api/v1/plots
# English (default)
curl https://parcelplan.laravel.cloud/api/v1/plots
Troubleshooting
Problem: 403 Forbidden or Redirects to Login
Cause: You're trying to access protected pages (e.g., /plots/my-plot)
Solution: Use the public API instead:
- ❌
GET /plots/my-plot(protected) - ✅
GET /api/v1/plots?search=my-plot(public)
Problem: Rate Limit Exceeded
Cause: Too many concurrent requests or requests per second
Solution:
- Reduce concurrency (max 5-10 concurrent requests)
- Add delays between requests (0.5s recommended)
- Check
X-RateLimit-Remainingheader - Implement exponential backoff on retry
Problem: Stale Data
Cause: Response is cached longer than expected
Solution:
- Check
Cache-Controlheader in response - Wait until cache expires before re-fetching
- Plot data updates in real-time but is cached per request
Problem: Can't Find a Specific Plot
Cause: Plot may be inactive or not exist
Solution:
- Use search:
GET /api/v1/plots?search=plot-name - Verify
is_active=truein response - Check the exact spelling of plot name
- Try searching by owner name instead
API Health & Status
Monitor API availability:
curl https://parcelplan.laravel.cloud/api/health
Response:
{
"status": "ok",
"version": "1.0",
"timestamp": "2026-06-05T12:00:00Z"
}
Check status page regularly to ensure continuous availability.
Support & Feedback
- Documentation:
/docs(interactive) - Support:
/supportpage - Terms & Privacy:
/termsand/policy - Report Issues: Use support form with clear example
Next Steps
- Review the full API documentation at
/docs - Try endpoints in the interactive API tester
- Fetch your first data:
GET /api/v1/plots - Build your integration!
Last Updated: 2026-06-05
API Version: 1.0
Status: Production
Ready to integrate?
Start with the interactive API documentation or review the OpenAPI specification.