New Feature: Custom Timeouts

The slowest part of any Diffbot API request is the call-response to third-party content. Depending on the third party server’s responsiveness and location, it could be anywhere from a third of a second to tens of seconds before we receive content to process. (Diffbot internal rendering and processing, by comparison, averages just over 100 milliseconds.)

Speed is a concern in many applications, so today we’re rolling out our &timeout parameter, which gives our users control to decrease or increase our default timeout (five seconds) to a setting of their choosing.

https://www.diffbot.com/api/article?token=&url=https://blog.diffbot.com/new-feature-custom-timeouts&timeout=25000

We’ve had a timeout parameter in our Batch API since its launch, but until today haven’t had the equivalent functionality in our core APIs. Now, if you pass a timeout value — in milliseconds — Diffbot will obey your instructions. Need content fast no matter what? Set a 2500 timeout and be guaranteed a response in two-and-a-half seconds — though you will likely get more errors due to timeouts, depending again on your sources. Handling content from less responsive servers? Set your timeout to 15000 and we’ll wait them out for you.

See the timeout parameter in our API documentation (Article API, Frontpage API), and as always let us know if you have any questions or problems.