Requesting Datarequests

requests

Monitor the status of your download requests.

curl -X GET "https://api.datafiniti.co/v3/requests" \
  -H "Content-Type: application/json" \
  -H "Authorization: Basic YOUR_CREDENTIALS"
[{
  "id": 6073,
  "records": "example_string",
  "query": "categories:hotels AND country:US",
  "dataType": "businesses",
  "dataFormat": "csv",
  "accountId": "AAAXXXXXXXXXXXX",
  "planId": "free",
  "view": "businesses_all_nested",
  "async": 1,
  "status": "STARTED",
  "error": "",
  "numDownloaded": 0,
  "numFound": 95378,
  "numRequested": 95378,
  "date_started": "2017-1-11 15:52:42",
  "date_completed": "2017-1-11 15:52:43"
}]
GET
/requests
GET
Basic Authentication
Usernamestring
Required

Username for basic authentication

Passwordpassword
Required

Password for basic authentication

V3 uses Basic Authentication with your API token as the username and no password. In URL form: https://YOUR_API_TOKEN:@api.datafiniti.co/v3/... In cURL: --user YOUR_API_TOKEN: (note the trailing colon). Get your token from the Datafiniti Web Portal at https://portal.datafiniti.co.
Request Preview
Response

Response will appear here after sending the request

Authentication

header
Authorizationstring
Required

Basic authentication credentials. V3 uses Basic Authentication with your API token as the username and no password. In URL form: https://YOUR_API_TOKEN:@api.datafiniti.co/v3/... In cURL: --user YOUR_API_TOKEN: (note the trailing colon). Get your token from the Datafiniti Web Portal at https://portal.datafiniti.co.

Responses

idinteger

Unique identifier for the download request

recordsstring

Records field (may be empty)

querystring

The query that was used for this download

dataTypestring

The data type being downloaded

Allowed values:businessesproductsproperties
dataFormatstring

The format of the download files

Allowed values:jsoncsv
accountIdstring

Your API token used for this request

planIdstring

The Datafiniti plan level you're using

viewstring

The view used for this download, determining which fields are included

asyncinteger

Should always be 1. Indicates this is a download (async) request.

statusstring

The current progress of the request. STARTED while running, COMPLETED when finished.

Allowed values:STARTEDCOMPLETED
errorstring

An error message if anything went wrong with the download. Empty string if no errors.

numDownloadedinteger

Number of records that have been downloaded so far. Increases as the download progresses.

numFoundinteger

Total number of records in Datafiniti that matched your query

numRequestedinteger

Number of records you requested to download. If you didn't set records, this equals numFound.

date_startedstring

Date and time the download started

date_completedstring

Date and time the download completed. May match date_started if still in progress.

The requests endpoint lets you monitor the status of all download requests you have initiated. Returns an array of request objects with status, progress, and metadata about each download.