API Endpoints
Available API routes for accessing your cleaned data.
Base URL#
https://dataclean.to/v1Note
All API requests require authentication. Include your API key in the
X-API-Key header.List Items#
GET
/v1/{project-slug}/itemsReturns all items from a project with pagination.
Query Parameters
| Parameter | Type | Description |
|---|---|---|
page | number | Page number (default: 1) |
limit | number | Items per page (default: 50, max: 100) |
sort | string | Field to sort by (e.g., "name", "-created_at") |
filter | string | Filter expression (e.g., "city:Austin") |
Example Request
Request
curl -X GET "https://dataclean.to/v1/my-project/items?page=1&limit=10" \
-H "X-API-Key: dc_your_api_key_here"Example Response
Response
{
"data": [
{
"id": "row_abc123",
"name": "Joe's Plumbing",
"phone": "+15551234567",
"email": "joe@joesplumbing.com",
"city": "Austin",
"_schema": {
"@context": "https://schema.org",
"@type": "LocalBusiness",
"name": "Joe's Plumbing",
"telephone": "+15551234567"
}
}
],
"meta": {
"total": 1250,
"page": 1,
"per_page": 10,
"total_pages": 125
}
}Get Single Item#
GET
/v1/{project-slug}/items/{id}Returns a single item by its ID.
Example Request
curl -X GET "https://dataclean.to/v1/my-project/items/row_abc123" \
-H "X-API-Key: dc_your_api_key_here"Get Schema#
GET
/v1/{project-slug}/schemaReturns JSON-LD schema for all items as an ItemList.
SEO Tip
Use this endpoint to fetch pre-generated JSON-LD for your pages. Just embed the response in a <script type="application/ld+json"> tag.
Search Items#
GET
/v1/{project-slug}/searchFull-text search across all fields.
| Parameter | Type | Description |
|---|---|---|
qrequired | string | Search query |
fields | string | Comma-separated list of fields to search |
limit | number | Max results (default: 20) |
Example Request
curl -X GET "https://dataclean.to/v1/my-project/search?q=plumber&fields=name,description" \
-H "X-API-Key: dc_your_api_key_here"Error Responses#
All errors return a consistent JSON structure:
{
"error": {
"code": "UNAUTHORIZED",
"message": "Invalid or missing API key",
"status": 401
}
}Error Codes
| Status | Code | Description |
|---|---|---|
400 | BAD_REQUEST | Invalid request parameters |
401 | UNAUTHORIZED | Invalid or missing API key |
404 | NOT_FOUND | Project or item not found |
429 | RATE_LIMITED | Too many requests |