Skip to main content
POST
/
json
/
extract
Extract JSON from text
curl --request POST \
  --url https://{deployment}/api/v1/json/extract \
  --header 'Content-Type: application/json' \
  --header 'X-API-KEY: <api-key>' \
  --data '
{
  "text": "Sure! Here is the data: {\"name\": \"manju\", \"count\": 3} — hope that helps."
}
'
{
  "json": "{\"name\":\"manju\",\"count\":3}",
  "parsed_json": {
    "name": "manju",
    "count": 3
  },
  "is_array": false
}

Authorizations

X-API-KEY
string
header
required

Your deployment's API key (MMK_API_KEY). Routes that accept OAuth2 also allow Authorization: Bearer <token>.

Body

application/json
text
string
required

Text that contains an embedded JSON object or array.

Response

Extracted JSON (object or array)

json
string

The extracted JSON as a string.

parsed_json
object

Parsed object (when not an array).

parsed_json_array
any[]

Parsed array (when is_array is true).

is_array
boolean
error
string