Skip to content

API reference · API keys

oEmbed for a show.fm page ​

  • Method: GET
  • Path: /v1/oembed
  • Operation ID: oembed
  • Tags: oEmbed

An embeddable player for a podcast or episode listen URL.

Make a request ​

Set these environment variables before running a sample. Each language reads the same values; no identifier needs replacing inside the code.

VariableValue to supply
LISTEN_URLThe full public podcast or episode listen-page URL to embed.

Samples run on your server: curl 7.76+, Node.js 22+ (TypeScript via your TypeScript runner), Python 3, or PHP 8 with the cURL extension.

bash
: "${LISTEN_URL:?Set LISTEN_URL in your environment}"

curl --fail-with-body --silent --show-error --get \
  "https://api.show.fm/v1/oembed" \
  --data-urlencode "url=${LISTEN_URL}"
ts
function env(name: string): string {
  const value = process.env[name];
  if (!value) throw new Error(`Set ${name} in your environment`);
  return value;
}

async function main() {
  const url = new URL(`https://api.show.fm/v1/oembed`);
  url.searchParams.set("url", env("LISTEN_URL"));

  const response = await fetch(url, {
    signal: AbortSignal.timeout(30_000)
  });
  if (!response.ok) {
    throw new Error(`HTTP ${response.status}: ${await response.text()}`);
  }
  console.log(JSON.stringify(await response.json(), null, 2));
}

main().catch(error => {
  console.error(error);
  process.exitCode = 1;
});
js
function env(name) {
  const value = process.env[name];
  if (!value) throw new Error(`Set ${name} in your environment`);
  return value;
}

async function main() {
  const url = new URL(`https://api.show.fm/v1/oembed`);
  url.searchParams.set("url", env("LISTEN_URL"));

  const response = await fetch(url, {
    signal: AbortSignal.timeout(30_000)
  });
  if (!response.ok) {
    throw new Error(`HTTP ${response.status}: ${await response.text()}`);
  }
  console.log(JSON.stringify(await response.json(), null, 2));
}

main().catch(error => {
  console.error(error);
  process.exitCode = 1;
});
python
import os
import json
from urllib.parse import quote, urlencode
from urllib.request import Request, urlopen
from urllib.error import HTTPError

url = f'https://api.show.fm/v1/oembed'
url += "?" + urlencode({
    "url": os.environ["LISTEN_URL"],
})
request = Request(url)
try:
    with urlopen(request, timeout=30) as response:
        print(json.dumps(json.load(response), indent=2))
except HTTPError as error:
    raise RuntimeError(f"HTTP {error.code}: {error.read().decode()}") from error
php
<?php
function requiredEnv(string $name): string {
    $value = getenv($name);
    if ($value === false || $value === '') {
        throw new RuntimeException("Set $name in your environment");
    }
    return $value;
}

$url = "https://api.show.fm" . "/v1/oembed";
$url .= '?' . http_build_query([
    "url" => requiredEnv("LISTEN_URL"),
], '', '&', PHP_QUERY_RFC3986);
$curl = curl_init($url);
curl_setopt_array($curl, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_TIMEOUT => 30,
]);
$body = curl_exec($curl);
if ($body === false) {
    throw new RuntimeException(curl_error($curl));
}
$status = curl_getinfo($curl, CURLINFO_HTTP_CODE);
if ($status < 200 || $status >= 300) {
    throw new RuntimeException("HTTP $status: $body");
}
echo json_encode(json_decode($body, false, 512, JSON_THROW_ON_ERROR), JSON_PRETTY_PRINT | JSON_THROW_ON_ERROR) . PHP_EOL;

Base URL ​

  • https://api.show.fm

Authentication ​

No authentication required.

Query parameters ​

  • url (required): string

    A show.fm listen URL.

  • maxwidth: integer

  • maxheight: integer

Responses ​

Browse the documented response statuses, headers and body fields.

200 OK ​

Response body ​

Content type: application/json

schema: Oembed, no additional properties

  • author_name (required): string
  • cache_age (required): integer, minimum: -9007199254740991, maximum: 9007199254740991
  • documentation (required): string
  • height (required): integer, minimum: -9007199254740991, maximum: 9007199254740991
  • html (required): string
  • provider_name (required): string
  • provider_url (required): string
  • title (required): string
  • type (required): string, const: "rich"
  • version (required): string, const: "1.0"
  • width (required): integer, minimum: -9007199254740991, maximum: 9007199254740991
  • thumbnail_height: integer, minimum: -9007199254740991, maximum: 9007199254740991
  • thumbnail_url: string
  • thumbnail_width: integer, minimum: -9007199254740991, maximum: 9007199254740991

400, 404, 429 ​

  • 400 invalid_request.
  • 404 not_found. Unknown or non-public content, including scheduled, unpublished, archived or deleted episodes.
  • 429 rate_limited.

Response body ​

Content type: application/json

schema: Error, no additional properties

  • error (required): object, no additional properties
    • code (required): string, possible values: "invalid_request", "not_found", "unavailable", "unauthorized", "invalid_api_key", "insufficient_scope", "forbidden", "plan_upgrade_required", "rate_limited", "service_unavailable", "internal_error", "not_implemented"

    • message (required): string

    • details: array

      Items:

      no additional properties

      • field (required): string

      • message (required): string

      • reason: string

        A stable reason a client may branch on, for example outside_retention.

    • docs_url: string

    • request_id: string

Was this page helpful?