CoolFace
Apppublic

apiguyy/text-to-json-api

sourceHugging Faceupdated 5mo agoView on Hugging Face
0likes
App README

Text-to-JSON API

A lightweight and fast API that converts unstructured text into structured JSON. Designed for AI Agents such as LangChain, AutoGPT, CrewAI, Devin, and automation systems.


๐Ÿ”— API Endpoint

https://green-bush-10.iikingoliver10.workers.dev

๐Ÿš€ What This API Does

This API takes messy or unstructured text and converts it into clean JSON. Useful for:

  • โ€”AI agents
  • โ€”Automation pipelines
  • โ€”Data extraction
  • โ€”Preprocessing text
  • โ€”Converting human-written notes into machine-readable format

๐Ÿ“˜ How to Use

Request

POST /
Content-Type: application/json

Body:

json
{
  "task": "jsonify",
  "input": "Name: John Doe\nAge: 30\nLocation: Germany"
}

Response

json
{
  "success": true,
  "original_text": "Name: John Doe\nAge: 30\nLocation: Germany",
  "json": {
    "name": "John Doe",
    "age": "30",
    "location": "Germany"
  }
}

๐Ÿงฉ Integration Files

OpenAPI Specification

https://raw.githubusercontent.com/use-Bitly/text-to-json-api/main/openapi.json

AI Plugin Manifest

https://raw.githubusercontent.com/use-Bitly/text-to-json-api/main/ai-plugin.json

These files allow AI agents to automatically discover and use the tool.


๐Ÿค– LangChain Example

python
from langchain.tools import Tool
import requests

def jsonify(text):
    res = requests.post(
        "https://green-bush-10.iikingoliver10.workers.dev",
        json={"task": "jsonify", "input": text}
    )
    return res.json()

json_tool = Tool(
    name="text_to_json",
    func=jsonify,
    description="Convert unstructured text into structured JSON."
)

๐Ÿงช Quick Test (cURL)

curl -X POST \
  -H "Content-Type: application/json" \
  -d '{"task":"jsonify","input":"Title: Developer\nExperience: 5 years"}' \
  https://green-bush-10.iikingoliver10.workers.dev

๐Ÿ’ฐ Pricing

The API is currently free to use. Automated USDC/USDT billing will be added soon.