IPQS
Retrieving CSV List

About

You can retrieve a list of all CSVs that you have uploaded and their current state using this API. If you want to download any of the results of a CSV, you'll need to use the status API to fetch a list of all available downloads for a CSV. Call the URL below to retrieve a list of CSVs. The API will deliver 50 results per page, with the most recent upload displayed first.

Warning

This API will return responses containing your API key. Treat these responses like passwords and do not share them with third parties.

Note

This API does not return download links for the CSVs displayed. To get the download links, you must query the status URL of specific CSVs provided in the results.

Request URLs

JSON

https://ipqualityscore.com/api/json/csv/YOUR_API_KEY_HERE/list

XML

https://ipqualityscore.com/api/xml/csv/YOUR_API_KEY_HERE/list

Optional Request Parameters

You can include optional parameters to your request to retrieve specific CSVs.

Field Value
type The type of CSVs to list. ("proxy", "email", "url", or "phone")
page The page number of results to return. Each page lists 50 CSVs in order of most recently uploaded.

Example Responses

Success

This is an example success response in JSON format. Responses are also available in XML format.

{
    "message": "Success",
    "success": true,
    "csvs": [
        {
            "id": 827748,
            "file_name": "example_email.csv",
            "type": "email",
            "strictness": 0,
            "status": "NEW",
            "aborted": false,
            "invalid_records": 0,
            "status_url": "https://ipqualityscore.com/api/json/csv/YOUR_API_KEY_HERE/status/827748"
        }
    ],
    "total_csvs": 1,
    "total_pages": 1,
    "page": 1,
    "request_id": "HDzXqjnJZ9"
}

Failure

This is an example failure response you would receive if you did not provide a valid type variable.

{
    "success": false,
    "message": "Invalid type specified. CSV type must be one of: email, proxy, phone or url.",
    "request_id": "HDzi4etwqG"
}

Response Field Definitions

Field Description Possible Values
message Messages about the status of your request, including potential errors. string
success Was the request successful? boolean
csvs An array of CSVs you've requested to be processed by our system.

csvs fields

Field Description Possible Values
message Messages about the status of your request, including potential errors. string
success Was the request successful? boolean
id The unique, numeric ID of the file being processed. int64
file_name The name of the file or an automatically generated name if no name was specified during upload. string
type The type of CSV that was uploaded. Value can be: "proxy", "url", "email", or "phone". string/enum
strictness The strictness level of this file's processing. (Integer 0 to 3, 0 = default). We recommend the default strictness level. int
status The current status of the CSV's processing. NEW, PROCESSING, UNIQUE_RESULTS, FINALIZING, FINISHED
aborted Was processing cancelled before completion? boolean
invalid_records The current number of invalid records detected in the CSV. int
status_url The URL where you can retrieve the current status of this specific CSV and retrieve links to download the results of processing if this CSV is completed. string/url
<?php

/*
* Retrieve a list of CSVs.
*/

//Initialise the cURL var
$ch = curl_init();

//Get the response from cURL
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);

// Set the URL to upload a proxy file.
curl_setopt($ch, CURLOPT_URL, 'https://ipqualityscore.com/api/xml/csv/YOUR_API_KEY_HERE/list');

// Execute the request
$raw_response = curl_exec($ch);

// Decode the response.
$response = json_decode($raw_response, true);

// Print out the result or error.
if($response['success']){
    echo "List of CSVs retrieved successfully!";

    /*
    * At this point you'll probably want to iterate over the csv array.
    */
    foreach($response['csvs'] as $csv){
        echo "CSV ID: ".$csv['id']." is currently: ".$csv['status']."<br>";
    }
} else {
    echo "CSV upload failed: ".$response['message'];
}

Ready to eliminate fraud?

Start fighting fraud now with 1,000 Free Lookups!

We're happy to answer any questions or concerns.

Chat with our fraud detection experts any day of the week.

Call us at: (800) 713-2618