asimov-serpapi-module 0.1.1
ASIMOV module for data import powered by the SerpApi search data platform.
License: Unlicense
Keywords: asimov-module, asimov, ai

# ASIMOV SerpApi Module

[![License](https://img.shields.io/badge/license-Public%20Domain-blue.svg)](https://unlicense.org)
[![Package on Crates.io](https://img.shields.io/crates/v/asimov-serpapi-module.svg)](https://crates.io/crates/asimov-serpapi-module)
[![Package on PyPI](https://img.shields.io/pypi/v/asimov-serpapi-module.svg)](https://pypi.org/project/asimov-serpapi-module)
[![Package on RubyGems](https://img.shields.io/gem/v/asimov-serpapi-module.svg)](https://rubygems.org/gems/asimov-serpapi-module)
[![Package on NPM](https://img.shields.io/npm/v/asimov-serpapi-module.svg)](https://npmjs.com/package/asimov-serpapi-module)

[ASIMOV] module for data import powered by the [SerpApi] search data platform.

## ✨ Features

- Imports structured data from DuckDuckGo, Google, and Bing search results.
- Collects the raw JSON data via the SerpApi real-time API (requires an API key).
- Constructs a semantic knowledge graph based on the [KNOW] ontology.
- Supports plain JSON output as well as [RDF] output in the form of [JSON-LD].
- Distributed as a standalone static binary with zero runtime dependencies.

## 🛠️ Prerequisites

- [Rust] 1.85+ (2024 edition) if building from source code

## ⬇️ Installation

### Installation from PyPI

```bash
pip install -U asimov-serpapi-module
```

### Installation from RubyGems

```bash
gem install asimov-serpapi-module
```

### Installation from NPM

```bash
npm install -g asimov-serpapi-module
```

### Installation from Source Code

```bash
cargo install asimov-serpapi-module
```

## 👉 Examples

```bash
export SERPAPI_KEY="..."
```

### Fetching DuckDuckGo Results

```bash
asimov-serpapi-fetcher https://duckduckgo.com/?q=Isaac+Asimov   # JSON
asimov-serpapi-importer https://duckduckgo.com/?q=Isaac+Asimov  # JSON-LD
```

### Fetching Google Results

```bash
asimov-serpapi-fetcher https://www.google.com/search?q=Isaac+Asimov   # JSON
asimov-serpapi-importer https://www.google.com/search?q=Isaac+Asimov  # JSON-LD
```

### Fetching Bing Results

```bash
asimov-serpapi-fetcher https://www.bing.com/search?q=Isaac+Asimov   # JSON
asimov-serpapi-importer https://www.bing.com/search?q=Isaac+Asimov  # JSON-LD
```

## ⚙ Configuration

### Environment Variables

- `SERPAPI_KEY`: (required) the [SerpApi API key] to use

## 📚 Reference

### Installed Binaries

- `asimov-serpapi-fetcher`: collects JSON data from the SerpApi real-time API
- `asimov-serpapi-importer`: collects and transforms JSON into JSON-LD

### Supported Engines

Engine  | URL Prefix | JSON | RDF
:------ | :--------- | :--: | :--:
Bing | `https://www.bing.com/search?q=` | ✅ | ✅
DuckDuckGo | `https://duckduckgo.com/?q=` | ✅ | ✅
Google | `https://www.google.com/search?q=` | ✅ | ✅
<img width="100" height="1"/> | <img width="550" height="1"/> | <img width="50" height="1"/> | <img width="50" height="1"/>

## 👨‍💻 Development

```bash
git clone https://github.com/asimov-modules/asimov-serpapi-module.git
```

---

[![Share on X](https://img.shields.io/badge/share%20on-x-03A9F4?logo=x)](https://x.com/intent/post?url=https://github.com/asimov-modules/asimov-serpapi-module&text=asimov-serpapi-module)
[![Share on Reddit](https://img.shields.io/badge/share%20on-reddit-red?logo=reddit)](https://reddit.com/submit?url=https://github.com/asimov-modules/asimov-serpapi-module&title=asimov-serpapi-module)
[![Share on Hacker News](https://img.shields.io/badge/share%20on-hn-orange?logo=ycombinator)](https://news.ycombinator.com/submitlink?u=https://github.com/asimov-modules/asimov-serpapi-module&t=asimov-serpapi-module)
[![Share on Facebook](https://img.shields.io/badge/share%20on-fb-1976D2?logo=facebook)](https://www.facebook.com/sharer/sharer.php?u=https://github.com/asimov-modules/asimov-serpapi-module)
[![Share on LinkedIn](https://img.shields.io/badge/share%20on-linkedin-3949AB?logo=linkedin)](https://www.linkedin.com/sharing/share-offsite/?url=https://github.com/asimov-modules/asimov-serpapi-module)

[ASIMOV]: https://github.com/asimov-platform
[JSON-LD]: https://json-ld.org
[KNOW]: https://github.com/know-ontology
[NPM]: https:/npmjs.org
[Python]: https://python.org
[RDF]: https://github.com/rust-rdf
[Ruby]: https://ruby-lang.org
[Rust]: https://rust-lang.org
[SerpApi]: https://serpapi.com
[SerpApi API key]: https://serpapi-python.readthedocs.io/en/latest/#serpapi.Client