### LunaProxy Client Startup Source: https://doc.lunaproxy.com/free-tools/luna-s5-proxy/integration-tutorial/linux Instructions on how to start the LunaProxy client with necessary parameters. ```APIDOC ## Start the client ### Description Starts the LunaProxy client with the specified API port, account email, password, and optional local intranet address. ### Command ```bash ./LunaProxy -api_port= -email= -pwd= -local= (default 127.0.0.1) ``` ### Parameters * **-api_port** (integer) - Required - The port for the API. * **-email** (string) - Required - The account email for login. * **-pwd** (string) - Required - The login password. * **-local** (string) - Optional - The local intranet address. Defaults to `127.0.0.1`. ``` -------------------------------- ### Start LunaProxy Client (Bash) Source: https://doc.lunaproxy.com/free-tools/luna-s5-proxy/integration-tutorial/linux Command to start the LunaProxy client on Linux. Requires specifying the API port, account email, password, and optionally the local intranet address. This initializes the proxy service. ```Bash ./LunaProxy -api_port=API port -email=account email -pwd=login password -local=intranet address (default 127.0.0.1) ``` -------------------------------- ### Use SSL Certificate with cURL Source: https://doc.lunaproxy.com/proxies/residential-proxies/cache-proxy/how-to-install-an-ssl-certificate This example demonstrates how to use the `--cacert` option with cURL to specify the path to the SSL certificate when making a request through a proxy. Ensure you replace placeholders with your actual proxy details and certificate path. ```shell curl --proxy pr.ckbtbql3.lunaproxy.net:12234 --proxy-user : --cacert "https://myip.lunaproxy.io" ``` -------------------------------- ### POST /request Source: https://doc.lunaproxy.com/advanced-proxy-solutions/universal-scraping-api/getting-started This endpoint allows you to scrape web pages using the Universal Scraper API. You need to provide your API token and the target URL. ```APIDOC ## POST /request ### Description This endpoint facilitates web scraping by accepting an API token and a target URL to extract data from web pages. It supports various configurations like rendering method (HTML/PNG), JavaScript rendering, and country/region selection. ### Method POST ### Endpoint https://unlocker-api.lunaproxy.com/request ### Parameters #### Query Parameters None #### Request Body - **url** (string) - Required - The target URL you want to scrape. - **type** (string) - Required - The rendering method, either 'html' or 'png'. - **js_render** (boolean) - Optional - Enable or disable JavaScript rendering. Defaults to 'False'. ### Request Example ```json { "url": "https://www.google.com/", "type": "html", "js_render": "False" } ``` ### Headers - **Authorization**: Bearer YOUR_API_TOKEN - **content-type**: application/json ### Response #### Success Response (200) - **content** (string) - The scraped content of the web page. #### Response Example ```html ...... ``` ### Error Handling - **401 Unauthorized**: Invalid API Token. - **400 Bad Request**: Missing or invalid parameters. ``` -------------------------------- ### Configure Resource Blocking Source: https://doc.lunaproxy.com/advanced-proxy-solutions/universal-scraping-api/making-requests/blocking-resource-loading This example demonstrates how to block image and script resources when requesting HTML content. ```APIDOC ## POST /websites/doc_lunaproxy ### Description Allows configuring the blocking of specific resource types (e.g., images, scripts) to optimize web scraping performance and reduce bandwidth usage. ### Method POST ### Endpoint /websites/doc_lunaproxy ### Parameters #### Request Body - **actor** (string) - Required - Specifies the actor to use for the request, typically 'unlocker.webunlocker'. - **input** (object) - Required - Contains the input parameters for the web unlocker. - **url** (string) - Required - The URL of the website to scrape. - **type** (string) - Required - The type of content to retrieve, e.g., 'html'. - **allow_redirects** (boolean) - Optional - Whether to allow redirects. Defaults to true. - **block_resources** (string) - Optional - A comma-separated string of resource types to block (e.g., 'image,script'). ### Request Example ```json { "actor": "unlocker.webunlocker", "input": { "url":"https://www.google.com/", "type":"html", "allow_redirects":"False", "block_resources":"image,script" } } ``` ### Response #### Success Response (200) - **result** (object) - The result of the web unlocker operation. - **content** (string) - The retrieved content of the webpage. #### Response Example ```json { "result": { "content": "..." } } ``` ```