Skip to content
OhSpotted
Documentation

SDKs

Call the OhSpotted API from your language with typed methods, your key read from the environment and retries handled. Open source, under the MIT license.

Install

Go

No dependencies outside the standard library. Go 1.22 or newer.

Terminal
go get github.com/ohspotted/ohspotted-go
ohspotted/ohspotted-go

Java

A parameter builder for each method. Java 17 or newer.

Not on Maven Central: build it from its repository with Maven.

ohspotted/ohspotted-java

MCP server

The hosted server's tools, run on your machine over stdio. Node.js 20 or newer.

Terminal
npx -y @ohspotted/mcp
ohspotted/ohspotted-mcp

Quick start

Create an API key in your dashboard and set it as OHSPOTTED_API_KEY: every client reads it from there and sends it as a Bearer token. This script follows a LinkedIn page, then reads what changed on your pages.

Node.js
import { OhSpottedClient } from "@ohspotted/sdk";

// Reads your API key from OHSPOTTED_API_KEY.
const client = new OhSpottedClient();

// Follow a LinkedIn page: its first read takes the starting picture.
const { data: target } = await client.addTarget({ url: "https://www.linkedin.com/company/linkedin" });
console.log(target.id, target.name, target.status);

// What changed on all your pages since, newest first (pages are read once a day).
const { data: feed } = await client.listSignals({ unread: 1, limit: 20 });
for (const signal of feed.signals) console.log(signal.target_name, signal.kind, signal.after);

// Your credits, and how many pages you can still follow.
const { data: usage } = await client.getUsage();
console.log(usage.credits, usage.targets, usage.target_limit);
Python
from ohspotted import OhSpottedClient

# Reads your API key from OHSPOTTED_API_KEY.
with OhSpottedClient() as client:
    # Follow a LinkedIn page: its first read takes the starting picture.
    target = client.add_target(url="https://www.linkedin.com/company/linkedin").data
    print(target["id"], target["name"], target["status"])

    # What changed on all your pages since, newest first (pages are read once a day).
    feed = client.list_signals(unread=1, limit=20).data
    for signal in feed["signals"]:
        print(signal["target_name"], signal["kind"], signal["after"])

    # Your credits, and how many pages you can still follow.
    usage = client.get_usage().data
    print(usage["credits"], usage["targets"], usage["target_limit"])

Methods

One method per endpoint, named after its operation in the API reference, with the same parameter names. Java and PHP use the Node.js names, Go the same in PascalCase (AddTarget), .NET with Async (AddTargetAsync), and Ruby the Python names.

Client methods
Node.jsPythonEndpointDoes
getUsageget_usageGET /usageGet your plan and credits
listTargetslist_targetsGET /targetsList the pages you follow
addTargetadd_targetPOST /targetsFollow a page
getTargetget_targetGET /targets/{id}Get a page you follow
updateTargetupdate_targetPATCH /targets/{id}Pause, resume, mute or mark a page as seen
removeTargetremove_targetDELETE /targets/{id}Stop following a page
listTargetSignalslist_target_signalsGET /targets/{id}/signalsRead what changed on a page
listSignalslist_signalsGET /signalsRead what changed on all your pages
markSignalsSeenmark_signals_seenPOST /signals/seenMark everything as seen

Errors and retries

A failed request throws an error with the HTTP status and the API's error code, such as no_credits or target_limit: OhSpottedApiError (status, errorCode) in Node.js, OhSpottedAPIError (status, error_code) in Python. Network errors and 408, 500, 502, 503 and 504 answers are retried up to 3 times; 429 and other errors aren't, since rate limits last until the hour is over.

Start spotting

Create an account and get your free credits to try the API.