Product Data
Search over 75 million product records using the Datafiniti API.
curl -X POST "https://api.datafiniti.co/v4/products/search" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-d '{
"query": "keys:*",
"num_records": 1
}'
import requests
import json
url = "https://api.datafiniti.co/v4/products/search"
headers = {
"Content-Type": "application/json",
"Authorization": "Bearer YOUR_API_TOKEN"
}
data = {
"query": "keys:*",
"num_records": 1
}
response = requests.post(url, headers=headers, json=data)
print(response.json())
const response = await fetch("https://api.datafiniti.co/v4/products/search", {
method: "POST",
headers: {
"Content-Type": "application/json",
"Authorization": "Bearer YOUR_API_TOKEN"
},
body: JSON.stringify({
"query": "keys:*",
"num_records": 1
})
});
const data = await response.json();
console.log(data);
package main
import (
"fmt"
"net/http"
"bytes"
"encoding/json"
)
func main() {
data := []byte(`{
"query": "keys:*",
"num_records": 1
}`)
req, err := http.NewRequest("POST", "https://api.datafiniti.co/v4/products/search", bytes.NewBuffer(data))
if err != nil {
panic(err)
}
req.Header.Set("Content-Type", "application/json")
req.Header.Set("Authorization", "Bearer YOUR_API_TOKEN")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
fmt.Println("Response Status:", resp.Status)
}
require 'net/http'
require 'json'
uri = URI('https://api.datafiniti.co/v4/products/search')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Post.new(uri)
request['Content-Type'] = 'application/json'
request['Authorization'] = 'Bearer YOUR_API_TOKEN'
request.body = '{
"query": "keys:*",
"num_records": 1
}'
response = http.request(request)
puts response.body
{
"num_found": 42,
"total_cost": 3.14,
"records": [
{}
],
"download_id": "example_string"
}
{
"error": "Bad Request",
"message": "The request contains invalid parameters or malformed data",
"code": 400,
"details": [
{
"field": "email",
"message": "Invalid email format"
}
]
}
/products/search
Bearer token obtained from the /auth endpoint. Include in requests as: Authorization: Bearer <token>
The media type of the request body
The search query using Datafiniti query syntax (e.g., keys:*, country:US AND province:FL)
The number of records your request will return, and the number of credits that will be deducted from your account. For non-downloads, the maximum is 10 records.
Must be either json or csv. Defaults to json.
Whether or not to start a download for this search.
Specify a view you have created, or use a pre-made view. The view filters what data is displayed in your search results. This allows you to dynamically specify a view to filter the data you get back from your search.
Request Preview
Response
Response will appear here after sending the request
Authentication
Bearer token. Bearer token obtained from the /auth endpoint. Include in requests as: Authorization: Bearer <token>
Body
The search query using Datafiniti query syntax (e.g., keys:*, country:US AND province:FL)
The number of records your request will return, and the number of credits that will be deducted from your account. For non-downloads, the maximum is 10 records.
Whether or not to start a download for this search.
Specify a view you have created, or use a pre-made view. The view filters what data is displayed in your search results. This allows you to dynamically specify a view to filter the data you get back from your search.
Responses
Total number of matching records found
Total credit cost for this request
Array of matching records
Download ID if download was requested (only present when download: true)
Error message describing what went wrong
Last updated Mar 26, 2026
Built with Documentation.AI