Embeds

The Embeds API converts URLs into embedded videos, images and rich article previews.

Get embed

Get an embed by id.

GET /api/embeds/{id}
Path parameters
id integer required

Id of embed.

Response codes

200 Success

{
  "id": "integer",
  "type": "string",
  "title": "string",
  "description": "string",
  "author_name": "string",
  "author_url": "string",
  "provider_name": "string",
  "provider_url": "string",
  "cache_age": "integer",
  "thumbnail_url": "string",
  "thumbnail_width": "integer",
  "thumbnail_height": "integer",
  "url": "string",
  "width": "integer",
  "height": "integer",
  "html": "string",
  "original_url": "string"
}

404 Not Found

Code sample
curl https://{WEAVY-SERVER}/api/embeds/1
-H "Authorization: Bearer {ACCESS-TOKEN | API-KEY}"

Create embed

Create an embed for the given url.

POST /api/embeds
Body parameters
url string required

The URL to retrieve embedding information for.

Response codes

201 Created

{
  "id": "integer",
  "type": "string",
  "title": "string",
  "description": "string",
  "author_name": "string",
  "author_url": "string",
  "provider_name": "string",
  "provider_url": "string",
  "cache_age": "integer",
  "thumbnail_url": "string",
  "thumbnail_width": "integer",
  "thumbnail_height": "integer",
  "url": "string",
  "width": "integer",
  "height": "integer",
  "html": "string",
  "original_url": "string"
}

400 Bad Request

Code sample
curl https://{WEAVY-SERVER}/api/embeds
-H "Authorization: Bearer {ACCESS-TOKEN | API-KEY}"
--json "{ 'url': 'https://weavy.com' }"
Weavy Docs