Import data
Import URL
Explore the seamless process of importing websites with the ChatFly API.
API Endpoint
The API endpoint for obtaining a streaming response is:
https://backend.chatfly.co/api/scraping/url
Request Body
To import a website, send a POST request to the API endpoint with a JSON request. Here’s an example JSON request:
{
"bot_id": "your_bot_id",
"user_id": "your_user_id",
"scrape_url": "string",
"scrape_type": 1
}
- bot_id (string): ID of your bot.
- user_id (string): ID of your account.
- scrape_url (string): Website to import.
- scrape_type (int): Type of scraping (If scrape_type is 1, it will scrape the current page with depth = 0 and all child websites recursively until depth = 2)
Example Request
Explore here for example commands to import a website using the ChatFly API.
Response Body
The streaming response is as follows:
{
"url": "string",
"progress": "float",
"num_token": "int"
}
- url (string): Current page.
- progress (float): Current progress (from 0 to 1)
- num_token (int): Number token of the current page
Was this page helpful?