| Recommend this page to a friend! | 
|  Download | 
| Info | Documentation |  Files |  Install with Composer |  Download | Reputation | Support forum | Blog | Links | 
| Ratings | Unique User Downloads | Download Rankings | ||||
| Not enough user ratings | Total: 135 | All time:  9,293 This week: 57  | ||||
| Version | License | PHP version | Categories | |||
| ddg-api 1.0.0 | GNU General Publi... | 7 | Searching, Web services, Parsers, PHP 7 | 
| Description | Author | |
| This package can search for data and related topics from DuckDuckGo. | 
Multiple search engine search retrieval and storage
Need a engine to query different search engines
composer.json
{
    "require" : {
        "php" : ">=7.0",
        "nkey/ddg-api" : "dev-master"
    }
}
Example php script:
use Nkey\DDG\API\JsonProvider;
use Nkey\DDG\API\QueryResultParser;
$provider = new JsonProvider();
$json = $provider->query("mount rushmore");
$parser = new QueryResultParser();
$results = $parser->parseQueryResult($json);
foreach($results->getRelatedTopics() as $relatedTopic) {
    printf('<a href="%s">%s</a>', $relatedTopic->getFirstURL(), $relatedTopic->getText());
}
|  Files (15) | 
| File | Role | Description | ||
|---|---|---|---|---|
|  src (3 files, 1 directory) | ||||
|  tests (2 files) | ||||
|    .scrutinizer.yml | Data | Auxiliary data | ||
|    .travis.yml | Data | Auxiliary data | ||
|    composer.json | Data | Auxiliary data | ||
|    phpunit.xml | Data | Auxiliary data | ||
|    README.md | Data | Auxiliary data | ||
|    Usage.md | Doc. | Usage description | ||
|  Files (15) | / | src | 
| File | Role | Description | ||
|---|---|---|---|---|
|  Model (4 files) | ||||
|  ApiException.php | Class | Class source | ||
|  JsonProvider.php | Class | Class source | ||
|  QueryResultParser.php | Class | Class source | ||
|  Files (15) | / | src | / | Model | 
| File | Role | Description | 
|---|---|---|
|  Icon.php | Class | Class source | 
|  Metadata.php | Class | Class source | 
|  QueryResult.php | Class | Class source | 
|  Result.php | Class | Class source | 
|  Files (15) | / | tests | 
| File | Role | Description | 
|---|---|---|
|    JsonProviderTest.php | Test | Unit test | 
|    test-data.json | Data | Auxiliary data | 
| The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page. | 
|  Install with Composer | 
| Version Control | Unique User Downloads | Download Rankings | |||||||||||||||
| 100% | 
 | 
 | 
| Applications that use this package | 
 If you know an application of this package, send a message to the author to add a link here.
 If you know an application of this package, send a message to the author to add a link here.