Skip to main content
Data files expire after 7 days. Download them as soon as the pre-signed URL is ready.

Export flow

Call the Data API

Send a GET request to https://portal.webless.ai/query-data with:
  • company
  • start_date
  • end_date
  • x-api-key in the request headers

Store the pre-signed URL

A successful request returns 202 Accepted and a presigned_url. That URL becomes valid once the export file is written.

Poll until the file is ready

Poll the presigned_url every 10 seconds with the Range: bytes=0-0 header. Stop polling when the response returns 200 OK or 206 Partial Content.

Download the full file

Reuse the same pre-signed URL to download the completed file.

Request parameters

ParameterRequiredFormatDescription
companyYesstringYour client code
start_dateYesYYYY-MM-DDStart of the date range, inclusive
end_dateYesYYYY-MM-DDEnd of the date range, inclusive

Example request

GET https://portal.webless.ai/query-data?company=webless&start_date=2025-07-01&end_date=2025-07-03
x-api-key: YOUR_API_KEY

Example response

{
  "presigned_url": "https://webless-client-data.s3.us-west-1.amazonaws.com/athena-results/<QUERY_ID>.csv?X-Amz-..."
}

Sample code

import time
import requests

API_KEY = "YOUR_API_KEY"
API_URL = "https://portal.webless.ai/query-data"

response = requests.get(
    API_URL,
    params={
        "company": "webless",
        "start_date": "2025-07-01",
        "end_date": "2025-07-03",
    },
    headers={"x-api-key": API_KEY},
    timeout=30,
)
response.raise_for_status()
url = response.json()["presigned_url"]

while True:
    probe = requests.get(url, headers={"Range": "bytes=0-0"})
    if probe.status_code in (200, 206):
        break
    time.sleep(10)

download = requests.get(url, stream=True)
download.raise_for_status()

with open("webless_results.csv", "wb") as outfile:
    for chunk in download.iter_content(8192):
        outfile.write(chunk)

Error handling

StatusMeaning
400Missing or invalid parameter
403Invalid or missing API key
404Incorrect endpoint
429Rate limit exceeded
500Server error
For assistance, email tech@webless.ai. The source guide states a business-day response target of 4 hours.