Menu

Reference

API reference

The base address, the shape of every request and response, and where each endpoint's fields are listed.

Copy as MarkdownOpen in ChatGPT (opens in a new tab)Open in Claude (opens in a new tab)

Text
https://api.millionshort.com

The API is JSON over HTTPS. Every path starts with /v1. This is version 1.0.0.

Endpoints

EndpointWhat it doesCredits
POST /v1/searchSearch one to five sources and get one ranked list1 per source, plus 0.5 per 10 results after the first 10
GET /v1/sourcesThe sources, page types and topics a search acceptsFree
POST /v1/domainPopularity and risk for up to 25 sites1 per call
POST /v1/keys/agentA short-lived trial key for an agent. Needs no keyFree

The fields of an endpoint are listed on the Parameters page of its own section: Search, Extract, Monitor, Map, Crawl, Places, Agent.

The other endpoints and building blocks, each described with its section:

EndpointWhat it does
POST /v1/extractA page as clean text
POST /v1/extract/batchThe same for up to 1,000 pages, as a job
/v1/monitorsWatch a search or a page and be told what changed
/v1/webhooksWhere monitors, batches, crawls and agent runs deliver events
/v1/spacesSaved scopes for search: create, list, read, change, delete and import. Free
space on POST /v1/searchSearch with a saved scope
POST /v1/mapThe URLs of a site, from its sitemaps, its links and our index
POST /v1/crawlA site's pages as clean text, as a job: start, poll, list and cancel
POST /v1/placesBusinesses and points of interest by what they are and where, as data
POST /v1/agentA question in, an answer with a checked quote for every statement out, as a job you start and then poll

The endpoints has all six at a glance.

openapi.json is the machine-readable description of the four endpoints in the first table. The others are described field by field on their Parameters pages.

Authentication

Send your key as a bearer token on every call:

Example
Shell
curl https://api.millionshort.com/v1/sources \
  -H "Authorization: Bearer $MILLIONSHORT_API_KEY"

Keys start with ms-. Authentication covers creating and revoking keys, the trial key, and what works with no key.

Requests

Responses

Every success has the same four parts:

JSON
{
  "data": { "sources": [], "page_types": [], "topics": [] },
  "usage": { "credits": 0, "cost_usd": 0, "breakdown": { "sources": 0 } },
  "warnings": [],
  "request_id": "req_..."
}
PartWhat it is
dataThe answer. Its shape depends on the endpoint
usageWhat the call cost: credits, cost_usd, and a breakdown by line item
warningsNotices that did not fail the call, each with a code and a message
request_idIdentifies the call. Quote it when you contact us

The SDKs unwrap data: results and summary sit directly on the object a search returns, with usage, warnings and the request id beside them.

Every failure has one shape too, with a stable code to branch on:

JSON
{
  "error": {
    "code": "RATE_LIMITED",
    "message": "Too many requests. Try again in 12 seconds.",
    "retry_after_seconds": 12,
    "details": {}
  },
  "request_id": "req_..."
}

Errors lists every code and says which to retry. A call that ends in an error is never charged.

Status codes

StatusMeaning
200Success. Read warnings as well as data
400The request is wrong: INVALID_PARAM or UNSUPPORTED_OPTION. Do not retry it unchanged
401No key, or a key that is malformed, revoked or expired
403Dashboard sign-up only (ACCOUNT_NOT_ELIGIBLE). Not returned by /v1 calls
404No such endpoint or resource
429RATE_LIMITED or CAPACITY: wait Retry-After seconds. INSUFFICIENT_CREDITS: add credits
500Our fault. Retry with a growing pause
502SEARCH_UNAVAILABLE: search could not be served right now. Retry after Retry-After seconds

Headers

Every /v1 response that passed the rate limiter carries these headers:

HeaderMeaning
X-RateLimit-LimitRequests allowed per minute
X-RateLimit-RemainingRequests left in the current window
X-RateLimit-ResetUnix time at which the window is full again
Retry-AfterOn a 429 or a 502: seconds to wait before sending the call again

Credits and limits has each plan's numbers.

Credits

One credit is $0.001. Each endpoint's page says what a call costs, every response says what it did cost in usage, and a call that fails costs nothing. Credits and limits has the rules and worked examples.

Clients

Call the API from a server. Do not put a key in code that runs in a browser or a mobile app.

This page as Markdown ยท llms.txt