Data Transform
Parse .env file API
Parses a .env file into a JSON object, handling export prefixes, single/double quotes with escapes, inline comments, and key validation. Answers 'How do I parse a .env file into JSON?', 'How do I read dotenv variables programmatically?'.
Price$0.01per request
MethodPOST
Route/v1/data-transform/dotenv-parse
StatusLive
MIME typeapplication/json
Rate limit120/minute
Cache0s public
data-transformdotenvenvparseconfigvariableswrangle
API URL
Integration docshttps://x402.hexl.dev/v1/data-transform/dotenv-parseExample request
{
"text": "# comment\nexport API_URL=https://x.io\nKEY=\"a b\"\nNUM=42"
}Example response
{
"result": {
"API_URL": "https://x.io",
"KEY": "a b",
"NUM": "42"
},
"keys": [
"API_URL",
"KEY",
"NUM"
]
}Input schema
{
"type": "object",
"required": [
"text"
],
"properties": {
"text": {
"type": "string",
"examples": [
"# comment\nexport API_URL=https://x.io\nKEY=\"a b\"\nNUM=42"
]
}
}
}Output schema
{
"type": "object",
"additionalProperties": true
}