Website to Text API Documentation
# Use this endpoint to make a POST requests to the API
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
{
"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. An EC2 instance is a virtual server in the AWS Cloud. When you launch an EC2 instance, \tthe instance type that you specify determines the hardware available to your instance. \tEach instance type offers a different balance of compute, memory, network, and storage \tresources. For more information, see the Amazon EC2 Instance Types Guide. Amazon EC2 provides the following high-level features: 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. 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 estimate the cost of transforming Microsoft workloads to a modern architecture that uses open source and \t\t\t\tcloud-native services deployed on AWS, use the AWS Modernization Calculator for Microsoft Workloads. 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. You can use AWS Cost Explorer to analyze the cost and usage of your EC2 instances. You can view \t\t\t\tdata up to the last 13 months, and forecast how much you are likely to spend for the next \t\t\t\t12 months. For more information, see \t\t\t\tAnalyzing your costs with AWS Cost Explorer in the AWS Cost Management User Guide.",
"language": "en",
"publisher": null,
"url": "https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/concepts"
},
"code": 200
}
Convert Website to Text
Token Usage: 2
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. |