Streams

The Data Stream API lets you conveniently access data and metadata of all Data Streams. Each stream can be accessed via its unique stream id.

You can access almost any available Data Stream even if you are not subscribed to it!

The API provides most functions but is limited to a maximum of 10 records per stream.

TL;DR

The Fusionbase API provides a streamlined way to interact with data streams, offering three primary endpoints: /base, /data, and /search. Each endpoint serves a distinct purpose, enabling users to access metadata, retrieve and query data, and perform searches within the data streams.

For the /data and /search endpoints the default response type is msgpack, JSON is available using the GET parameter format=json

import requests

headers = {
    'x-api-key': 'YOUR_API_KEY',
}

response = requests.get('https://api.fusionbase.com/api/v2/stream/base/STREAM_ID', headers=headers, params=params)
assert response.code == 200, "CONNECTION_ERROR"

data_stream = response.json()
print(data_stream)

Data Structure

All Data Streams in Fusionbase, independent of the source or content follow the same data structure.

The table below gives you a full overview of all attributes, their description and data types.

Name
Description
Data Type

_key

Unique identifier of the stream

String

name

Name of the stream by language

Object

description

Description of the stream by language

Object

meta

Various meta information: is_active: Stream still actively updated entry_count: Number of records main_property_count: Number of properties, i.e., columns

Object

source

Information about the data source

Object

data_item_collections

Data property and schema information. This contains attribute names and the corresponding data types

List

data_version

The current version of the data

String

data_updated_at

The date when the data of the stream has been last updated

Datetime

data

The data of the stream based on the query input

List

created_at

Date and time when the stream was created on Fusionbase

Datetime

updated_at

Date and time when the stream was last updated either by it's data or metadata

Datetime

Example

Let's assume we would like to retrieve the latest automotive recalls in Germany. Luckily, we found a real-time automotive recalls Data Stream in the Fusionbase Data Hub.

The Data Stream API will return the stream in the above mentioned structure which looks like the following:

Fusionbase Specific Columns

Fusionbase adds three additional metadata columns to each Data Stream. These columns may make your live easier in certain scenarios.

Fusionbase ID

The Fusionbase ID fb_id is a hash value based on all data values in the same row. You can see it as a primary and unique key for each record.

Fusionbase Datetime

The Fusionbase Datetime fb_datetime is an ISO formatted timestamp that represents the exact date and time when the record was added to the Data Stream by Fusionbase.

Fusionbase Data Version

The Fusionbase Data Version fb_data_version is automatically added to any new record or batch of records that are added to the Data Stream. The version corresponds to the fb_datetime but offers more query functionalities via the API.

Last updated

Was this helpful?