🚀 We are hiring! See open positions

How to Copy as cURL With Safari?

by Mazen Ramadan Sep 27, 2024 1 min read

In this guide, we'll explain how to copy requests as cURL with Safari. We'll copy requests for the review data on web-scraping.dev. However, the same approach can be applied to other websites as well:

  1. Go to the page URL where you want to copy the requests.
  2. Open the browser developer tools on Safari by pressing the F12 key.

  3. Select the Network tab from the top bar.
  4. Empty the request log (Ctrl + L) to clear it for the desired request.

  5. Activate the request to record it. It can differ based on the target, such as:

    • Scrolling down.
    • Clicking on a specific link.
    • Clicking on the next pagination button.
    • Filtering the data using filter buttons.
    • Searching for specific data.
  6. Filter the requests by the target request type, `Doc` (HTML) or `Fetch/XHR` (JSON). You will find the requests recorded:
requests on safari developer tools
  • Identify the target request to copy by clicking it and reviewing its response.
  • Right-click on the request, select copy, and then copy as cURL (bash):

  • copy request as cURL
    Copy request as cURL
  • The request is now copied as cURL in the clipboard.
  • Optional: convert the cURL request into Python using the [cURL to Python tool](https://scrapfly.io/web-scraping-tools/curl-python).
  • Optional: convert the request into ScrapFly API requests from the [ScrapFly API player](https://scrapfly.io/dashboard/player).
  • ScrapFly API player screenshot
    Import cURL request into ScrapFly's API player

    We have explained converting cURL requests into Python. However, the same apporach can be used to convert cURL into Node.js and other programming languages using HTTP clients. For further details, refer to our dedicated guide on Postman.

    Scale Your Web Scraping
    Anti-bot bypass, browser rendering, and rotating proxies — all in one API. Start with 1,000 free credits.
    No credit card required 1,000 free API credits Anti-bot bypass included
    Not ready? Get our newsletter instead.