Actor picture

Link Extractor


Extract links from an Array of different paths/users parsed with a baseUrl and a pageFunction.

To run the actor, you'll need an Apify account. Simply create a new task for the actor by clicking the button below, modify the actor input configuration, click Run and get your results.


To run the actor from your code, send a HTTP POST request to the following API endpoint:


The POST payload including its Content-Type header is passed as INPUT to the actor (usually application/json). The actor is started with the default options; you can override them using various URL query parameters.

curl https://api.apify.com/v2/acts/juansgaitan~link-extractor/runs?token=<YOUR_API_TOKEN> \
-d '{
  "baseUrl": "https://www.instagram.com/",
  "pageFunction": "const anchors = Array.from(document.querySelectorAll('._mck9w._gvoze._f2mse')); return anchors.map(anchor => anchor.firstElementChild.getAttribute('href'));",
  "waitForCssSelector": "._mck9w._gvoze._f2mse",
  "usernames": [
}' \
-H 'Content-Type: application/json' \

To use the API, you'll need to replace <YOUR_API_TOKEN> with the API token of your Apify account (view here).

For more information, view the list of actor's API endpoints or the full API reference.

  • Modified
  • Last run
  • Used326 times