Skip to content

Coverage Report by Query (GET)

GEThttps://kg.diffbot.com/kg/v3/dql/report

Download a coverage report for a DQL query.

To fetch a previously generated report by its id, use Coverage Report by ID.

Example

bash
curl --request GET \
  --url 'https://kg.diffbot.com/kg/v3/dql/report?token=<DIFFBOT_TOKEN>&query=type%3AOrganization%20locations.city.name%3A%22San%20Francisco%22%20nbEmployees%3E5000&size=3&filter=%24.name%3B%24.nbEmployees'
text
DiffbotID,Name,$.name,$.nbEmployees
"",,1.0,1.0
El0wZJw_cOn-MAyp_hZZ5Tw,Yandex,1,1
EUFq-3WlpNsq0pvfUYWXOEA,Google,1,1
Ec5P22-6EPLOXo1-z6-4NzA,Instagram,1,1

API Definition

Generated from v1.0.0 of the DQL API OpenAPI specification.

Download coverage report by DQL query

Request

Authentication
tokenquery
Cache and insert token into example requests (15d expiry)
Query parameters
querystring required

DQL Query

frominteger (int32)

Return results starting at from index. from+size <= 10_000 for facet queries.

Please note that the from parameter is no longer applicable to Article queries and has been deprecated. In the future, using this parameter will result in an error.

(default: 0)

sizeinteger (int32)

Maximum number of results to return. -1 to return all results. from+size <= 10_000 for facet queries. (default: 50)

filterstring

Semi-colon separated path filter to filter response json. You can use a simple dot notation skills.name or a JsonPath expression such as $.name;$.locations.country.name. For more advanced options, see JsonPath Filtering for syntax.

filterExcludestring

Semi-colon separated path filter to filter and exclude data from response json. You can use a simple dot notation skills.name or a JsonPath expression such as $.name;$.locations.country.name. For more advanced options, see JsonPath Filtering for syntax.

exportspecstring

The spec defines the columns to export. This is applicable for csv, xls and xslx formats.

Export spec specifies how to export the entity JSON to a csv. A simple export spec looks like name;summary. To specify more complex export spec, including specifying how many of a list of industries to return, or the ideal employment record, see Exporting Columnar Format and JsonPath Filtering.

Example request

bash
curl --request GET \
  --url 'https://kg.diffbot.com/kg/v3/dql/report?query=%3Cquery%3E&from=0&size=50&token=<DIFFBOT_TOKEN>' \
  --header 'Accept: text/csv'

Response

200Coverage report
txt
DiffbotID,Name,$.name,$.nbEmployees
"",,1.0,1.0
El0wZJw_cOn-MAyp_hZZ5Tw,Yandex,1,1
EUFq-3WlpNsq0pvfUYWXOEA,Google,1,1
Ec5P22-6EPLOXo1-z6-4NzA,Instagram,1,1
401Unauthorized
codeinteger
messagestring
requestIdstring
json
{
  "code": 401,
  "message": "Unauthorized. Incorrect token.",
  "requestId": "a9cbf96bb0e2084d5c1595ae8f526576"
}
500Internal Server Error
codeinteger
messagestring
json
{
  "code": 500,
  "message": "HTTP 500 Internal Server Error"
}