Skip to content

Create a Bulkjob

POSThttps://kg.diffbot.com/kg/v3/enhance/bulk

Enhance multiple records in bulk asynchronously.

Accepts a JSON array of input data on organizations or persons and returns a status response.

An input JSON array is constructed with a type declaration and one or more accepted inputs for Enhance.

json
[{
    "type": "Organization",
    "name": "IBM",
    "location": "Austin, Texas"
},
{
    "type": "Organization",
    "name": "Diffbot",
    "url": "www.diffbot.com"
}]

You can also specify alternative name and url parameters for an entity. Those parameters can also be specified as an array. For example:

json
[{
    "type": "Organization",
    "name": ["Twitter", "X"],
    "url": ["twitter.com", "x.com"],
    "location": "San Francisco, CA"
}]

Example

bash
curl --location --request POST 'https://kg.diffbot.com/kg/v3/enhance/bulk?token=<DIFFBOT_TOKEN>' \
  --header 'Content-Type: application/json' \
  --data-raw '[{
    "type": "Organization",
    "name": "Optimizely"
},
{
    "type": "Organization",
    "name": "Diffbot"
},
{
    "type": "Organization",
    "name": "Whizzimo"
}]'
json
{
  "job_id": "abc123"
}

API Definition

Generated from v3.0.0 of the ENHANCE API OpenAPI specification.

Enhance multiple records in bulk asynchronously

Request

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

Enhance Bulkjob name

sizeinteger (int32)

Maximum number of results to return (default: 1)

thresholdnumber (double)

Enhance similarity threshold

refreshboolean

refresh=true indicates that Diffbot will attempt to recrawl all the origins of the identified entity and reconstruct the returned entity from this refreshed data. (default: false)

searchboolean

search=true indicates that Diffbot will attempt to search the web for origins for the search query and merge relevant results with whats found in the KG. (default: false)

nonCanonicalFactsboolean

nonCanonicalFacts=true returns non-canonical facts. (default: false)

jsonmodestring

jsonmode=extended returns origin information for facts.

One of: extended

webhookurlstring

Webhook URL

Request body application/json
typestring

Diffbot entity type

namestring[]

Name of the entity to enhance. Parameter can be used with types Person and Organization

urlstring[]

Origin or homepage URI of entity to enhance. Parameter can be used with types Person and Organization

locationstring

Location of the entity to enhance. Parameter can be used with types Person and Organization

ipstring

IP address of the entity to enhance. Parameter can be used with types Person and Organization

phonestring

Phone of the entity to enhance. Parameter can be used with types Person and Organization

descriptionstring

Description of the entity to enhance. Parameter can be used with types Person and Organization

emailstring[]

Email of the entity to enhance. Parameter can be used only with type Person

employerstring

Employer of the entity to enhance. Parameter can be used only with type Person

titlestring

Title of the entity to enhance. Parameter can be used only with type Person

schoolstring

School of the entity to enhance. Parameter can be used only with type Person

Example request

bash
curl --request POST \
  --url 'https://kg.diffbot.com/kg/v3/enhance/bulk?size=1&refresh=false&search=false&nonCanonicalFacts=false&token=<DIFFBOT_TOKEN>' \
  --header 'Accept: application/json' \
  --header 'Content-Type: application/json' \
  --data-raw '{}'

Response

202Acknowledgement with bulkjobId
job_idstring

Bulkjob Id for checking status and downloading results

400Error parsing request
codeinteger (int32)

Status code (same as the HTTP status code)

messagestring

Status message

request_ctxobject

Request context

queryobject | object | string

Submitted query

typestring

Diffbot entity type

namestring[]

Name of the entity to enhance. Parameter can be used with types Person and Organization

urlstring[]

Origin or homepage URI of entity to enhance. Parameter can be used with types Person and Organization

locationstring

Location of the entity to enhance. Parameter can be used with types Person and Organization

ipstring

IP address of the entity to enhance. Parameter can be used with types Person and Organization

phonestring

Phone of the entity to enhance. Parameter can be used with types Person and Organization

descriptionstring

Description of the entity to enhance. Parameter can be used with types Person and Organization

emailstring[]

Email of the entity to enhance. Parameter can be used only with type Person

employerstring

Employer of the entity to enhance. Parameter can be used only with type Person

titlestring

Title of the entity to enhance. Parameter can be used only with type Person

schoolstring

School of the entity to enhance. Parameter can be used only with type Person

query_ctxobject

Query context. Example: submitted query parameters etc.

bulkjobStatusobject

Bulkjob status

job_idstring

Bulkjob Id

namestring

Bulkjob name

refreshboolean

Is Refresh enabled for this job?

searchstring

Is Search enabled for this job?

messagestring

Bulkjob status message

jobs_totalinteger (int32)

Number of jobs in bulkjob

jobs_completedinteger (int32)

Number of jobs completed in bulkjob.

statusstring

Status of Bulkjob. One of {NOT_STARTED, IN_PROCESS, COMPLETE, COMPLETE_WITH_FAILURES, STOPPED, ERROR_FINALIZING, UNKNOWN}

estimate_remaining_timeinteger (int64)

Estimated remaining time for bulkjob to complete (in seconds). null if job is completed or not started.

submit_time_msinteger (int64)

Bulkjob submit time

start_time_msinteger (int64)

Bulkjob start time

completed_time_msinteger (int64)

Bulkjob completed time

total_resultsinteger (int32)

Total results

bulkjobIdstring
totalJobsinteger (int32)
finishedJobsinteger (int32)
estimateRemainingTimeSecinteger (int64)
submitTimeMsinteger (int64)
startTimeMsinteger (int64)
completedTimeMsinteger (int64)
totalResultsinteger (int32)
fileSizeBytesinteger (int64)

Size of download file in bytes

reportsobject[]

Coverage reports generated for this bulkjob

reportIdstring

Coverage Report ID

statusstring

Status of report generation. One of {NOT_STARTED, IN_PROCESS, COMPLETE, UNKNOWN}

formatstring

Export format

specstring

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.

exportfilestring
exportSeparatorstring

Separator for multi-value fields when exporting columnar results

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.

onlyMatchesboolean

Return only records that have a match

errorboolean

true if error

401Token not specified or other client errors
requestIdstring

Identifier of the rejected request, also returned in the X-Diffbot-RequestId header

codeinteger (int32)

Status code (same as the HTTP status code)

messagestring

Status message

429Insufficient credits
codeinteger (int32)

Status code (same as the HTTP status code)

messagestring

Status message

request_ctxobject

Request context

queryobject | object | string

Submitted query

typestring

Diffbot entity type

namestring[]

Name of the entity to enhance. Parameter can be used with types Person and Organization

urlstring[]

Origin or homepage URI of entity to enhance. Parameter can be used with types Person and Organization

locationstring

Location of the entity to enhance. Parameter can be used with types Person and Organization

ipstring

IP address of the entity to enhance. Parameter can be used with types Person and Organization

phonestring

Phone of the entity to enhance. Parameter can be used with types Person and Organization

descriptionstring

Description of the entity to enhance. Parameter can be used with types Person and Organization

emailstring[]

Email of the entity to enhance. Parameter can be used only with type Person

employerstring

Employer of the entity to enhance. Parameter can be used only with type Person

titlestring

Title of the entity to enhance. Parameter can be used only with type Person

schoolstring

School of the entity to enhance. Parameter can be used only with type Person

query_ctxobject

Query context. Example: submitted query parameters etc.

bulkjobStatusobject

Bulkjob status

job_idstring

Bulkjob Id

namestring

Bulkjob name

refreshboolean

Is Refresh enabled for this job?

searchstring

Is Search enabled for this job?

messagestring

Bulkjob status message

jobs_totalinteger (int32)

Number of jobs in bulkjob

jobs_completedinteger (int32)

Number of jobs completed in bulkjob.

statusstring

Status of Bulkjob. One of {NOT_STARTED, IN_PROCESS, COMPLETE, COMPLETE_WITH_FAILURES, STOPPED, ERROR_FINALIZING, UNKNOWN}

estimate_remaining_timeinteger (int64)

Estimated remaining time for bulkjob to complete (in seconds). null if job is completed or not started.

submit_time_msinteger (int64)

Bulkjob submit time

start_time_msinteger (int64)

Bulkjob start time

completed_time_msinteger (int64)

Bulkjob completed time

total_resultsinteger (int32)

Total results

bulkjobIdstring
totalJobsinteger (int32)
finishedJobsinteger (int32)
estimateRemainingTimeSecinteger (int64)
submitTimeMsinteger (int64)
startTimeMsinteger (int64)
completedTimeMsinteger (int64)
totalResultsinteger (int32)
fileSizeBytesinteger (int64)

Size of download file in bytes

reportsobject[]

Coverage reports generated for this bulkjob

reportIdstring

Coverage Report ID

statusstring

Status of report generation. One of {NOT_STARTED, IN_PROCESS, COMPLETE, UNKNOWN}

formatstring

Export format

specstring

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.

exportfilestring
exportSeparatorstring

Separator for multi-value fields when exporting columnar results

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.

onlyMatchesboolean

Return only records that have a match

errorboolean

true if error

500Internal Server Error
codeinteger (int32)

Status code (same as the HTTP status code)

messagestring

Status message

request_ctxobject

Request context

queryobject | object | string

Submitted query

typestring

Diffbot entity type

namestring[]

Name of the entity to enhance. Parameter can be used with types Person and Organization

urlstring[]

Origin or homepage URI of entity to enhance. Parameter can be used with types Person and Organization

locationstring

Location of the entity to enhance. Parameter can be used with types Person and Organization

ipstring

IP address of the entity to enhance. Parameter can be used with types Person and Organization

phonestring

Phone of the entity to enhance. Parameter can be used with types Person and Organization

descriptionstring

Description of the entity to enhance. Parameter can be used with types Person and Organization

emailstring[]

Email of the entity to enhance. Parameter can be used only with type Person

employerstring

Employer of the entity to enhance. Parameter can be used only with type Person

titlestring

Title of the entity to enhance. Parameter can be used only with type Person

schoolstring

School of the entity to enhance. Parameter can be used only with type Person

query_ctxobject

Query context. Example: submitted query parameters etc.

bulkjobStatusobject

Bulkjob status

job_idstring

Bulkjob Id

namestring

Bulkjob name

refreshboolean

Is Refresh enabled for this job?

searchstring

Is Search enabled for this job?

messagestring

Bulkjob status message

jobs_totalinteger (int32)

Number of jobs in bulkjob

jobs_completedinteger (int32)

Number of jobs completed in bulkjob.

statusstring

Status of Bulkjob. One of {NOT_STARTED, IN_PROCESS, COMPLETE, COMPLETE_WITH_FAILURES, STOPPED, ERROR_FINALIZING, UNKNOWN}

estimate_remaining_timeinteger (int64)

Estimated remaining time for bulkjob to complete (in seconds). null if job is completed or not started.

submit_time_msinteger (int64)

Bulkjob submit time

start_time_msinteger (int64)

Bulkjob start time

completed_time_msinteger (int64)

Bulkjob completed time

total_resultsinteger (int32)

Total results

bulkjobIdstring
totalJobsinteger (int32)
finishedJobsinteger (int32)
estimateRemainingTimeSecinteger (int64)
submitTimeMsinteger (int64)
startTimeMsinteger (int64)
completedTimeMsinteger (int64)
totalResultsinteger (int32)
fileSizeBytesinteger (int64)

Size of download file in bytes

reportsobject[]

Coverage reports generated for this bulkjob

reportIdstring

Coverage Report ID

statusstring

Status of report generation. One of {NOT_STARTED, IN_PROCESS, COMPLETE, UNKNOWN}

formatstring

Export format

specstring

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.

exportfilestring
exportSeparatorstring

Separator for multi-value fields when exporting columnar results

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.

onlyMatchesboolean

Return only records that have a match

errorboolean

true if error