Skip to content
Go to file

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time

Diffbot API Powershell client


This module allows to call DiffBot APIs from the command line and operate on output with all of the Powershell's flexibility. The module supports common parameters and you can get a man page by running get-help Get-DiffBot.


  1. Obtain a developer token from

  2. Open DiffBot.psm1 and change line 6 to your generated token

    $token = "DIFFBOT_TOKEN";

Next, create DiffBot directory in C:\Windows\System32\WindowsPowerShell\v1.0\Modules and place DiffBot.psm1 there. You will then be able to to run

	import-module DiffBot

Alternatively you can run

	import-module C:\somepath\DiffBot.psm1

where C:\somepath\DiffBot.psm1 is path to your newly downloaded module.


That's it :)


Assuming that you followed above instructions you can now use the new Get-DiffBot cmdlet.

Syntax is as follows

    Get-DiffBot [-url] <String> [-api] <String> [[-fields] <String>] [[-timeout] <Int32>] [<CommonParameters>]

with -url and -api being required parameters ie.

	Get-DiffBot -url -api analyze

with result

title          : Customer FAQs - Hachette Book Group                              
type           : faq                                                              
resolved_url   :                  
human_language : en                                                               
url            :              

-url and -api are positional parameters so you can run the following

	Get-DiffBot  analyze

Valid APIs are: article, frontpage, image, product, analyze ie.

Get-DiffBot article
Get-DiffBot image
Get-DiffBot frontpage
Get-DiffBot product
Get-DiffBot analyze

Here is an example calling article API and requesting only 2 fields: images and supertags

Get-DiffBot article -fields "images,supertags"


tags      : {Semantic Web, AOL, Computer vision, Technology}                      
author    : Wade Roush                                                            
images    : {@{primary=true; caption=Diffbot; url= 
            @{caption=NPR's top news page as interpreted by Diffbot; url=http://w 
            7-25-at-9.13.27-AM-300x332.png}, @{caption=Diffbot robot; url=http:// 
date      : Wed, 25 Jul 2012 07:00:00 GMT                                         
supertags : {@{id=29123; positions=System.Object[]; name=Semantic Web;            
            score=0.9; contentMatch=1; categories=; type=1; senseRank=1;          
            depth=0.5882352941176471; variety=0.7283018867924529}, @{id=1397;     
            positions=System.Object[]; name=AOL; score=0.7; contentMatch=1;       
            categories=; type=1; senseRank=1; depth=0.5882352941176471;           
            variety=0.4830188679245283}, @{id=6596; positions=System.Object[];    
            name=Computer vision; score=0.7; contentMatch=0.9172413793103449;     
            categories=; type=1; senseRank=1; depth=0.6470588235294117;           
            variety=0.7358490566037736}, @{id=29816; positions=System.Object[];   
            name=Technology; score=0.7; contentMatch=1; categories=; type=1;      
            senseRank=1; depth=0.7647058823529411; variety=0.31320754716981136}}  
type      : article                                                               
url       : 

Error handling

If API call fails a meanigful error message will be outputed to the console rather than throwing an error

Tried calling:                                                                               
But there was an error and nothing will be returned..                         
The remote server returned an error: (500) Internal Server Error.             


Response handling

If you use Powershell 3 or higher the returned response will be of JSON/PSCustomObject type, a hashtable if you are running Powershell 2 which you can pipe or operate on as required.

-Initial commit by Rafal Jankowicz-


A Diffbot API client for Powershell



No releases published
You can’t perform that action at this time.