Skip to main content

Overview

Tags help categorize and discover content on FoN. Users can add tags when uploading or update them later.

Adding Tags

During Upload

Include tags as a comma-separated string:
curl -X POST https://api.fucksornot.com/api/v1/upload \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -F "upload_type=image" \
  -F "description=New gadget" \
  -F "tags=gadget,tech,electronics" \
  -F "file=@image.jpg"

After Upload

Add tags to an existing upload:
curl -X POST https://api.fucksornot.com/api/uploads/UPLOAD_ID/tags \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"tags": ["new-tag", "another-tag"]}'

Tag Properties

PropertyTypeDescription
idUUIDUnique identifier
namestringDisplay name
slugstringURL-friendly version
upload_countintegerNumber of uploads with this tag

Tag Limits

  • Maximum 10 tags per upload
  • Tags are normalized to lowercase
  • Special characters are removed

Listing Tags

Get all tags with upload counts:
curl https://api.fucksornot.com/api/tags?page=1&limit=20 \
  -H "Authorization: Bearer YOUR_JWT_TOKEN"
Response:
{
  "tags": [
    {
      "id": "tag-uuid",
      "name": "gadget",
      "slug": "gadget",
      "upload_count": 150
    }
  ],
  "page": 1,
  "limit": 20
}

Searching Tags

Find tags matching a query:
curl "https://api.fucksornot.com/api/tags/search?q=tech&limit=10"
Response:
{
  "tags": [
    {
      "id": "tag-uuid",
      "name": "tech",
      "slug": "tech"
    },
    {
      "id": "tag-uuid-2",
      "name": "technology",
      "slug": "technology"
    }
  ]
}

Filtering by Tags

Get uploads with specific tags:
curl "https://api.fucksornot.com/api/uploads/filtered?tags=gadget,tech"
Exclude certain tags:
curl "https://api.fucksornot.com/api/uploads/filtered?tags=gadget&excludeTags=nsfw"

Getting Upload Tags

Retrieve tags for a specific upload:
curl https://api.fucksornot.com/api/uploads/UPLOAD_ID/tags
Response:
{
  "tags": [
    {
      "id": "tag-uuid",
      "name": "gadget",
      "slug": "gadget"
    }
  ]
}

AI-Suggested Tags

FoN can suggest tags for an upload using AI:
curl -X POST https://api.fucksornot.com/api/tags/suggest \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"uploadId": "upload-uuid"}'
Response:
{
  "suggestedTags": ["electronics", "gadget", "tech"]
}

Best Practices

Choose tags that accurately describe the content for better discoverability.
Search for existing tags before creating new ones to avoid duplicates.
Use 3-5 relevant tags rather than maxing out at 10 with irrelevant ones.