Requesting Datadata/products

data/products

Search and download product data using the Datafiniti API v3.

curl -X GET "https://api.datafiniti.co/v3/data/products?q=categories:hotels AND country:US&records=10&format=JSON&download=false&view=businesses_all" \
  -H "Content-Type: application/json" \
  -H "Authorization: Basic YOUR_CREDENTIALS"
{
  "num_found": 95378,
  "total_cost": 1,
  "records": [
    {}
  ]
}
GET
/data/products
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.
query
qstring

Search query using Datafiniti query syntax. Supports boolean operators (AND, OR), exact match with quotes, wildcards (*), negation (-), range queries, and nested field queries. Example: categories:hotels AND country:US

query
recordsinteger

Number of records to return. For preview (download=false): 0-10, defaults to 10. For download (download=true): 1 to total matching records. If omitted during download, all matching records will be downloaded.

Min: 0
query
formatstring

Output format for the data. JSON returns data as JSON objects. CSV returns data in CSV format.

Options: JSON, CSV
query
downloadboolean

Set to true to initiate a bulk download. When false (default), returns up to 10 preview records immediately. When true, returns a 303 redirect to the /requests endpoint to monitor download progress.

query
viewstring

The view determines which fields are returned in the response and the order they appear. Different views are available for each data type. Examples for businesses: businesses_all, businesses_all_nested. Examples for products: products_all, products_basicFields, products_pricesFlat. Examples for properties: properties_all, properties_all_nested.

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.

Query Parameters

qstring

Search query using Datafiniti query syntax. Supports boolean operators (AND, OR), exact match with quotes, wildcards (*), negation (-), range queries, and nested field queries. Example: categories:hotels AND country:US

recordsinteger

Number of records to return. For preview (download=false): 0-10, defaults to 10. For download (download=true): 1 to total matching records. If omitted during download, all matching records will be downloaded.

formatstring

Output format for the data. JSON returns data as JSON objects. CSV returns data in CSV format.

Allowed values:JSONCSV
downloadboolean

Set to true to initiate a bulk download. When false (default), returns up to 10 preview records immediately. When true, returns a 303 redirect to the /requests endpoint to monitor download progress.

viewstring

The view determines which fields are returned in the response and the order they appear. Different views are available for each data type. Examples for businesses: businesses_all, businesses_all_nested. Examples for products: products_all, products_basicFields, products_pricesFlat. Examples for properties: properties_all, properties_all_nested.

Responses

num_foundinteger

Total number of records in Datafiniti matching the query

total_costinteger

Number of credits consumed by this request

recordsobject[]

Array of matching records. The fields present depend on the data type and view used.

The data endpoint lets you run preview searches and initiate downloads for product data.

If you set download=false (or don't set it), the API call will return a list of matching products for your query. If you don't set records when download=false, it will return up to 10 products. You can set records to a value between 0 and 10.

If you set download=true, it will return a request object that can be used to monitor the status of the download request. If you don't set records when download=true, it will initiate a download request for all matching products. You can set records to a value between 1 and the number of matching products.