How to Copy as cURL With Firefox?

In this guide, we'll explain how to copy requests as cURL with Firefox. We'll copy the requests on 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 Firefox 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 firefox developer tools

7. Identify the target request to copy by clicking it and reviewing its response.
8. Right-click on the request, select copy, and then copy as cURL (POSIX):

copy request as cURL
Copy request as cURL
  • The request is now copied as cURL in the clipboard.
  • Optional: convert the request into Python using the cURL to Python tool.
  • Optional: convert the request into ScrapFly API requests from the ScrapFly API 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.

Using API Clients For Web Scraping: Postman

Using API Clients For Web Scraping: Postman

postman article banner

Provided by Scrapfly

This knowledgebase is provided by Scrapfly — a web scraping API that allows you to scrape any website without getting blocked and implements a dozens of other web scraping conveniences. Check us out 👇