Skip to main content

How to find and extract all links in a PDF

How to find and extract all links in a PDF

Links can be extracted using the /pdf/convert/to/json2 endpoint. To filter out redundant data you can use the OutputStructure profile parameter. And, the OutputTransformation JSON filter can make list of links more compact.

[https://api.pdf.co/v1/pdf/convert/to/json2](https://api.pdf.co/v1/pdf/convert/to/json2){
    "url": "YOUR_URL",
    "inline": true,
    "profiles": "{ 'OutputStructure': 'OnlyLinks', 'OutputTransformation': '$..text' }"
}

If you are using PDF.co through Zapier or integromat, add the following string to "Custom Profiles" field:

{ 'OutputStructure': 'OnlyLinks', 'OutputTransformation': '$..text' }
Did this answer your question?