cc0lib logo

cc0-lib public API

cc0-lib Public API allows developers to access and retrieve data from our extensive library of content. With this API, you can search for items based on various parameters such as title, tag, type, filetype, and ENS.

main endpoint

GET /api/data

query parameters

This endpoint will return all items in the library if no query parameters are specified. only a single query parameter can be used at a time in a request.

Rate Limiting

To ensure fair usage and optimal performance, the API enforces rate limiting. Each user is limited to 10 requests per 10 seconds.

Response Structure

example response

{
  "query": {
    "title": "example"
  },
  "count": 1,
  "types": [
    "type1"
  ],
  "fileTypes": [
    "fileType1"
  ],
  "tags": [
    "tag1",
    "tag2",
    "tag3"
  ],
  "date": "2023-07-12T05:15:47Z",
  "data": [
    {
      "id": "data1",
      "Source": "https://example.com",
      "Type": "type1",
      "Social Link": "https://twisder.com/example",
      "ENS": "example.eth",
      "Description": "Sample description",
      "Thumbnails": [
        {
          "name": "sample.svg",
          "url": "https://sample.com/sample.svg",
          "rawUrl": "https://sample.com/sample.svg"
        }
      ],
      "Tags": [
        "tag1",
        "tag2",
        "tag3"
      ],
      "ID": 370,
      "Title": "sample title",
      "File": "https://example.com/sample.svg",
      "Filetype": "svg"
    }
  ]
}

random endpoint

GET /api/random

This random endpoint will return a random item from the library. no query parameters needed.

Rate Limiting

To ensure fair usage and optimal performance, the API enforces rate limiting. Each user is limited to 5 requests per 10 seconds.

Response Structure

example response

{
  "image": {
    "url": "https://sample.com/sample.svg"
  },
  "data": {
    "id": "data1",
    "Source": "https://example.com",
    "Type": "type1",
    "Social Link": "https://twisder.com/example",
    "ENS": "example.eth",
    "Description": "Sample description",
    "Thumbnails": [
      {
        "name": "sample.svg",
        "url": "https://sample.com/sample.svg",
        "rawUrl": "https://sample.com/sample.svg"
      }
    ],
    "Tags": [
      "tag1",
      "tag2",
      "tag3"
    ],
    "ID": 370,
    "Title": "sample title",
    "File": "https://example.com/sample.svg",
    "Filetype": "svg"
  }
}