API Documentation

Use the DirtyMarkup API to programmatically clean your code. This service is currently offered free of charge, but is subject to change at any time.

HTML

To clean your HTML, send the following request:

POST https://www.10bestdesign.com/dirtymarkup/api/html

Parameters

CSS

To clean your CSS, send the following request:

POST https://www.10bestdesign.com/dirtymarkup/api/css

Parameters

Note: the “Preferred line length” option doesn’t have any effect on CSS code. It only sets the visual ruler in the editor, so there is nocorresponding API parameter.

JavaScript

To clean your JavaScript, send the following request:

POST https://www.10bestdesign.com/dirtymarkup/api/js

Parameters

API Responses

Every request to the API will return one of the following HTTP codes.

Successful responses will contain a JSON string:

{"clean": "your clean code"}

API Limits

DirtyMarkup has a soft rate limit of 1,000 requests per day per IP address. If you consistently exceed the limit, your IP address will be blacklisted to preserve resources for other users.

Again, DirtyMarkup is a free service. If your application will require significant usage of the API, please contact @10bestdesign about sponsoring the service before launching.

About DirtyMarkup

DirtyMarkup is a free service built by Cory LaViska and provided as a courtesy by his company, A Beautiful Site, LLC. DirtyMarkup is offered without warranty of any kind. Use of DirtyMarkup and its API is strictly at your own risk. DirtyMarkup does not retain any of your code or personal information for any reason.

If you made something cool with the API, need help, or would like to report a bug, please contact @10bestdesign.