A lot of Laravel apps end up with the same feature: a user pastes a YouTube, TikTok or podcast link, and the app needs the transcript or the file. It usually works on your machine. Then it runs on a server and the media job is the one that breaks: sites block datacenter IPs, and plenty of videos have no captions to read.
I built Importly for this, so that's what this post calls. You send it a link and get back the transcript, a download link for the file, or the video's details, and it works from servers. The part worth getting right in Laravel is the queue side, so that's most of this post.
Long imports can take a few minutes, so don't hold a worker for them. One job starts the Importly job and stores its ID, and a second job checks the status and dispatches itself again 20 seconds later until it's done.…