Clay Icon

Troubleshooting Apify Actor JSON Input Error

ยท
ยท

Hey Team, I'm trying to set up an Apify actor and am getting this error:

{
"error": {
"type": "invalid-input",
"message": "Cannot parse input JSON body: Unexpected token 'h', "https://hr"... is not valid JSON"
}
}

What am I doing wrong here? Help is appreciated, thanks!

  • Avatar of Channeled
    Channeled
    APP
    ยท
    ยท

    This error occurs because the input data for your Apify actor isn't properly formatted as JSON. Here's how to fix it:1. Make sure all text values are enclosed in double quotes 2. Remove any trailing commas 3. Ensure proper JSON structureFor example:Wrong format::LBKS{LBKSname:: John,url: [URL],}Correct format::LBKS{LBKS"name":: "John","url": "https://example.com"}When using the Apify integration in Clay, you need to enter the data body in JSON format in the Input Data section. If you're using column tokens from your Clay table, keep the key in quotes but don't put quotes around the token itself.To validate your JSON, you can use a tool like JSONLint (jsonlint.com) to check for formatting issues. Sources: FAQ: Why am I seeing the "failed to parse body" error when using the HTTP API enrichment? Apify - Clay University

  • Avatar of Channeled
    Channeled
    APP
    ยท
    ยท

    Hi Aamir! This thread was recently closed by our Support team. If you have a moment, please share your feedback:

  • Avatar of Channeled
    Channeled
    APP
    ยท
    ยท

    Thank you so much for sharing your feedback Aamir!

  • Avatar of Channeled
    Channeled
    APP
    ยท
    ยท

    Great! I'm glad I could help. I'm here if you have any more questions.