Website to Text API Documentation


# Use this endpoint to make a requests to the API
# POST Request
https://api.apiverve.com/v1/websitetotext
                 

Website to Text is a simple tool for converting a website to text. It returns the text extracted from the website.

To use this API, you need an API key. You can get one by creating an account on apiverve.com and visiting your dashboard.

Important: Ensure that this API is enabled from within your dashboard to use it in your application. If not, you may receive a 403 error

Most of our APIs are also available on and


Example Response :

{
  "status": "ok",
  "error": null,
  "data": {
    "date": null,
    "description": "Use Amazon EC2 for scalable computing capacity in the AWS Cloud so you can develop and deploy applications without hardware constraints.",
    "title": "What is Amazon EC2?",
    "title_alt": "What is Amazon EC2?",
    "text": "Amazon Elastic Compute Cloud (Amazon EC2) provides on-demand, scalable computing capacity in the Amazon Web \t\tServices (AWS) Cloud. Using Amazon EC2 reduces hardware costs so you can develop and deploy \t\tapplications faster. You can use Amazon EC2 to launch as many or as few virtual servers as you \t\tneed, configure security and networking, and manage storage. You can add capacity (scale up) \t\tto handle compute-heavy tasks, such as monthly or yearly processes, or spikes in website \t\ttraffic. When usage decreases, you can reduce capacity (scale down) again.  The following diagram shows a basic architecture of an Amazon EC2 instance deployed within an \t\tAmazon Virtual Private Cloud (VPC). In this example, the EC2 instance is within an Availability Zone in the \t\tRegion. The EC2 instance is secured with a security group, which is a virtual firewall that \t\tcontrols incoming and outgoing traffic. A private key is stored on the local computer and a \t\tpublic key is stored on the instance. Both keys are specified as a key pair to prove the \t\tidentity of the user. In this scenario, the instance is backed by an Amazon EBS volume. The VPC \t\tcommunicates with the internet using an internet gateway. For more information about Amazon VPC, \t\tsee the Amazon VPC User Guide.  Amazon EC2 supports the processing, storage, and transmission  of credit card data by a merchant or service provider, and has been  validated as being compliant with Payment Card Industry (PCI) Data Security Standard (DSS).  For more information about PCI DSS, including how to request a copy of the AWS PCI Compliance Package,  see PCI DSS Level 1.  If you are looking for technical guidance about Amazon EC2, try AWS re:Post.  For more information about cloud computing, see What is cloud computing?  Amazon EC2 provides the following high-level features:  For details about all of the features of Amazon EC2, see Amazon EC2 features.  For options to run your website on AWS, see Web Hosting.  The following topics can help you get started with Amazon EC2. After you set up to use EC2, you \t\t\tcan walk through Tutorial: Get started with Amazon EC2 Linux  instances to \t\t\tlaunch, connect to, and clean up an instance. The remaining topics point to more \t\t\tinformation about the high-level features of EC2.  You can create and manage your Amazon EC2 instances using the following interfaces:  Amazon EC2 provides the following pricing options:  For a complete list of charges and prices for Amazon EC2 and more information about the purchase \t\t\tmodels, see Amazon EC2 pricing.  To create estimates for your AWS use cases, use the AWS Pricing Calculator.  To see your bill, go to the Billing and Cost Management  Dashboard in the AWS Billing and Cost Management  console. Your bill contains links to usage reports that provide details \t\t\t\tabout your bill. To learn more about AWS account billing, see AWS Billing and Cost Management User  Guide.  If you have questions concerning AWS billing, accounts, and events, contact AWS Support.  To calculate the cost of a sample provisioned \t\t\t\t\tenvironment, see . When calculating the cost of a provisioned \t\t\t\tenvironment, remember to include incidental costs such as snapshot storage for EBS \t\t\t\tvolumes.  You can optimize the cost, security, and performance of your AWS environment \t\t\t\tusing AWS Trusted Advisor.",
    "language": "en",
    "url": "https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/concepts"
  }
}
                
Convert Website to Text

Convert a given webiste content to simple text

REQUEST BODY JSON PARAMETERS

Field Type Description
url string (Required) The URL of the website to convert to text

SAMPLE REQUEST BODY


{
  "url": "https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/concepts"
}
                

RESPONSE CONTENT TYPES

The Website to Text API supports the following response content types:

application/json, application/xml, application/yaml

You can specify the response content type by setting the Accept header in your request. If you don't specify a content type, the API will default to application/json.

Authentication


# Here is a curl example
curl \
-X POST https://api.apiverve.com/v1/websitetotext \
-H 'x-api-key={{YOUR-API-KEY}}' \
-F 'auth=true' \
                

The Website to Text API uses an API Key to authenticate requests. You can view and manage your API key by visiting your dashboard.

Your API keys carry many privileges. To keep them from being abused, please do not share the keys on client-side code or Github etc. Keep them very secure.

To use any API, you must have it enabled from within your dashboard. Disabled APIs will fail to respond to your requests.

All requests made to the API must contain the header x-api-key in each of your requests. API requests without authentication will fail.

All API requests must also be made over secure HTTPS. Requests made over plain HTTP will fail.

Error Code Meaning
401 Your request was made with invalid credentials. This error also appears when you don't pass the x-api-key header in your request.
403 Typically, this occurs when you are trying to access an API that you have not enabled.

Rate Limits



{
    "status": "error",
    "data": null,
    "error": "Rate limit exceeded. Please upgrade your subscription plan."
}
                

Each subscription has its own rate limit. Your limit is based on your subscription plan (free or paid). If you exceed your limits, don't worry. You can always upgrade or downgrade at any time.

When you reach your limit, the service will stop responding and typically return an HTTP 429 response status code. The error will also contain a details JSON.

The Website to Text API uses the following error code:

Error Code Meaning
429 You have exceeded your rate limit and further requests will be denied until the next cycle.

Errors

For reference, the Website to Text API uses the following error codes:

Error Code Meaning
Code Message
200 The request was successful. The response will include the requested data.
400 The request was invalid. The response will include a message that explains the error.
401 The request was not authorized. Usually, this means that the API key is missing or invalid.
403 This means that the request was trying to access a resource that it does not have permission to access.
404 This means that the resource you are trying to access does not exist.
429 This means that you have reached the rate limit. The response will include a Retry-After header that indicates how many seconds you need to wait before making a new request.
500 This means that there was an error on the server side. We are alerted when this happens and we will work to fix it as soon as possible.