Have you asked 65bit (support mail)? They are really helpful and reply very fast.
I have and their answer assumed you have a license for their scripting module. The customer doesn't want to purchase an additional module. We just ended up exporting the document to IDML and scraping the ids ourselves.