Extract Website Source Code

This API helps you extract the fully rendered source code of a webpage.

Authentication

Authentication for this API is done using an x-api-key header.

x-api-key: YOUR_API_KEY

API Endpoints

POST https://api.goonlinetools.com/api/extract-source-code

Parameters:

  • url (required) - The website url (e.g - https://goonlinetools.com/).

Headers:

  • x-api-key (required) - Your API Key.

Response:

{
  "sourceCode": "Full Rendered HTML Code"
}

Playground

Method: POST

Headers:

KeyValue
x-api-key

Paramas:


Nodejs Sample Request

const axios = require('axios');
  const FormData = require('form-data');
  let data = new FormData();
  
  let config = {
      method: 'post',
      url: 'https://api.goonlinetools.com/api/extract-source-code?url=https://goonlinetools.com/',
      headers: {
          'x-api-key': 'Your API Key',
          ...data.getHeaders()
      },
      data: data
  };
  
  axios.request(config)
      .then((response) => {
          console.log(JSON.stringify(response.data));
      })
      .catch((error) => {
          console.log(error);
});

Credit Consumption

Each successful request to the API consumes 1 credit.

Important Information

This API does not work if the website uses any type of captcha. Request allowed only to https internet protocol.