Overview
The Request Source API is a powerful method to process source data requests in a “Self Service” and integrated manner. Using this API, you can send lists of sources and continuously monitor and track the results of your request. You can also integrate this functionality in the services and tools you provide your customers. This will allow you automation of source additions from request to coverage. they exist, automatically added or require custom parser.
First Step: Request Sources
To use the API, you need to call an endpoint post request with your private access token.
Call this API to post a Request Sources task
URL Structure -
https://api.webz.io/addSourceRequest?domain_type=news_and_blogs&token=xxxxx-xxxx-xxxxx&list_name=agur_test123&domains=cnn.com,ynet.co.il
HTTP POST Parameters
Parameter | Description | Example |
---|---|---|
token | Your private access token that you received when you signed up. | &token=[MY TOKEN] |
domain_type | The type of sites/domains in this source request. Available types are: news_and_blogs discussions | &site_type=discussions |
list_name | Name of the list. If not provided, the default name will be the request date and the provided site_type. Example: "May 8 2022 news_and_blogs" | &list_name=david_Jun_news_list |
domains | list of the required domains / sites | &domains:newonnews.com,tumblr.com,foxnews.com |
Request Output
Parameter | Description |
---|---|
list_id | The unique id/token you will use in the API that will track and present the results. |
{
estimatedTotalPostCount: "376499",
confirmationToken: "e7044de3-e611-4e3c-9817-78e09e2cbb2e"
}
Second Step: Get the Sources Request status
Call the following endpoint to get the status of your Sources Request from the first step. The results will cover the whole list status and the status of each domain in the list.
URL Structure -
https://api.webz.io/getSourceResults?list_id=xxx-xxxx-xxx
HTTP GET Parameters
Parameter | Description |
---|---|
token | Your private access token that you received when you signed up. |
list_id | The id/token you received as an output from the first step |
Request Output
Parameter | Description |
---|---|
list_id | The list Id |
list_name | The list name |
list_date | The date the list was requested |
list_status | The list current status |
domain | domain name |
domain_status | Current domain status |
domain_status_info | Additional details related to the domain status |
{
confirmationToken: "e7044de3-e611-4e3c-9817-78e09e2cbb2e"
}
{
statusCode: "2"
downloadLink: "https://s3.amazonaws.com/xxxxxxxxx.zip"
statusText: "Complete"
}