Hi R users,
Does anyone have tried to use Askyourpdf in R ?
My colleague accesses the API service through python thus I was wondering whether it would be possible to do something similar in R
Thank you for your help !!
Hi R users,
Does anyone have tried to use Askyourpdf in R ?
My colleague accesses the API service through python thus I was wondering whether it would be possible to do something similar in R
Thank you for your help !!
Yes, but it'll take some work.
You need to look at the API documentation: AskYourPDF API Documentation - AskYourPDF Docs
As you can see, most of it is just sending http requests. In R, there are several packages to send such requests, the easiest one to get started right now is probably {httr2}.
So, some untested code that may work:
req <- request("https://api.askyourpdf.com/v1/api/download_pdf") |>
req_headers("x-api-key" = "YOUR_API_KEY") |>
req_url_query("url" = "https://www.example.com/document.pdf")
See also this blog post for more examples, including how to treat the response.
This topic was automatically closed 42 days after the last reply. New replies are no longer allowed.
If you have a query related to it or one of the replies, start a new topic and refer back with a link.