Sketchfab 3d Ai Model Search avatar
Sketchfab 3d Ai Model Search

Pricing

Pay per usage

Go to Apify Store
Sketchfab 3d Ai Model Search

Sketchfab 3d Ai Model Search

This Apify Actor queries the Sketchfab API smartly using Gemini 2.5 flash and lang-graph to search 3D models using filters like keywords, users, tags, categories, dates, downloadability, animation, polygons, PBR, rigging, formats, licenses, collections, and sorting, returning clean JSON results.

Pricing

Pay per usage

Rating

0.0

(0)

Developer

Amon Sharma

Amon Sharma

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

a day ago

Last modified

Share

🚀 Sketchfab Ultimate Search Actor - AI-Powered with LangGraph

A production-grade Apify Actor that searches for 3D models on Sketchfab using the ULTIMATE COMBINED STRATEGY: Query + Tags + Categories + Pagination. Features AI-powered natural language processing (LangGraph + Google Gemini) that converts even long paragraphs into SEO-optimized search parameters.

✨ Key Features

  • 🔥 Ultimate Search Strategy: Combines q (SEO query) + tags + categories for best results
  • 🤖 AI-Powered NLP: Long user text → concise SEO query + precise tags via Google Gemini
  • 📄 Full Pagination Support: Cursor-based pagination with next/previous navigation
  • 🧠 LangGraph State Machine: Intelligent routing and conditional execution
  • ⚡ Smart Defaults: downloadable=true by default, auto-category detection
  • 📊 Structured Output: Pydantic models ensure type-safe, validated results

🎯 How It Works

The Ultimate Search Strategy

User Input (even long text)
┌─────────────────────────────────────┐
│ 🤖 AI Processing (Gemini 2.0) │
│ │
│ "I need a really cool futuristic │
│ sports car from cyberpunk with │
│ neon lights, low poly for Unity" │
│ │
│ ▼ BREAKDOWN ▼ │
│ │
│ q: "cyberpunk sports car" │
│ tags: ["cyberpunk", "low-poly", │
│ "game-ready", "neon"] │
│ categories: ["cars-vehicles"] │
│ downloadable: true │
└─────────────────────────────────────┘
┌─────────────────────────────────────┐
│ 🔍 Sketchfab API │
│ │
│ GET /v3/search?type=models │
│ &q=cyberpunk+sports+car │
│ &tags=cyberpunk,low-poly,... │
│ &categories=cars-vehicles │
│ &downloadable=true │
│ &count=24 │
│ &cursor=<pagination> │
└─────────────────────────────────────┘
┌─────────────────────────────────────┐
│ 📊 Results + Pagination Info │
│ │
│ • 24 models per page │
│ • next_cursor for more results │
│ • previous_cursor to go back │
└─────────────────────────────────────┘

LangGraph Workflow

┌─────────────────────────────────────────────────────────────┐
│ LANGGRAPH WORKFLOW │
├─────────────────────────────────────────────────────────────┤
│ │
│ ┌─────────┐ │
│ │ INPUT │ (query + pagination params)
│ └────┬────┘ │
│ │ │
│ ▼ │
│ ┌─────────────┐ │
│ │ ROUTER │──── useAI=true? ────┐ │
│ └─────────────┘ │ │
│ │ │ │
│ │ useAI=false │ │
│ ▼ ▼ │
│ ┌──────────────┐ ┌───────────────┐ │
│ │ MANUAL │ │ AI PROCESS │ │
│ │ PROCESSING │ │ Long text → │ │
│ │ │ │ SEO q + tags │ │
│ └──────┬───────┘ └───────┬───────┘ │
│ │ │ │
│ └─────────┬─────────────────┘ │
│ ▼ │
│ ┌────────────────┐ │
│ │ SKETCHFAB API │ (with pagination)
│ └───────┬────────┘ │
│ ▼ │
│ ┌────────────────┐ │
│ │ OUTPUT │ │
│ │ (Dataset + │ │
│ │ Pagination) │ │
│ └────────────────┘ │
│ │
└─────────────────────────────────────────────────────────────┘

🔧 Usage

Set useAI: true and describe what you're looking for (even long descriptions work!):

{
"useAI": true,
"naturalQuery": "I need a really cool futuristic sports car that looks like something from cyberpunk 2077 with neon lights and maybe some damage on it, low poly would be nice for my game project in Unity",
"googleApiKey": "your-gemini-api-key",
"count": 24
}

The AI automatically converts this to:

{
"q": "cyberpunk sports car",
"tags": ["cyberpunk", "low-poly", "game-ready", "neon", "futuristic"],
"categories": ["cars-vehicles"],
"downloadable": true
}

Mode 2: Manual Filters

Set useAI: false (or omit it) and use traditional filters:

{
"useAI": false,
"q": "robot warrior",
"tags": ["sci-fi", "mech"],
"categories": ["science-technology"],
"animated": true,
"downloadable": true,
"count": 24
}

Pagination: Getting More Results

Use the cursor parameter to navigate through pages:

{
"useAI": false,
"q": "cars",
"cursor": "cD0yNA==",
"count": 24
}

The response includes pagination info:

{
"_metadata": true,
"pagination": {
"has_next": true,
"has_previous": true,
"next_cursor": "cD00OA==",
"previous_cursor": null,
"next_url": "https://api.sketchfab.com/v3/search?count=24&cursor=cD00OA==&q=cars&type=models",
"previous_url": "https://api.sketchfab.com/v3/search?count=24&q=cars&type=models"
}
}

🌟 Natural Language Examples

Natural Language QueryAI Generates
"low poly car for my mobile game, something cartoony"q: "cartoon car", tags: ["low-poly", "cartoon", "game-ready"]
"realistic human character with rig for blender, CC0"q: "realistic human character", tags: ["realistic", "rigged"], rigged: true, license: "CC0"
"best high quality medieval fantasy weapons"q: "medieval fantasy weapon", tags: ["medieval", "fantasy", "detailed"], staffpicked: true
"sci fi robot mech warrior"q: "sci-fi mech robot", tags: ["sci-fi", "mech", "robot"]
"tree"q: "tree", tags: ["tree", "nature"], categories: ["nature-plants"]

📥 Input Parameters

AI Configuration

ParameterTypeDefaultDescription
useAIbooleanfalseEnable AI-powered NLP mode
naturalQuerystring-Plain English description (supports long text!)
googleApiKeystring-Google Gemini API key (or set GOOGLE_API_KEY env var)

Pagination

ParameterTypeDefaultDescription
countinteger24Number of results per page (max 24)
cursorstring-Cursor for pagination (from previous response)

Search Filters

ParameterTypeDescription
qstringSearch query (SEO-optimized, 2-5 words recommended)
tagsarrayTag slugs (e.g., ["low-poly", "game-ready"])
categoriesarrayCategory slugs (e.g., ["cars-vehicles"])

Quality Filters

ParameterTypeDefaultDescription
downloadablebooleantrueOnly downloadable models
animatedboolean-Only animated models
riggedboolean-Only rigged models
staffpickedboolean-Staff-picked only
soundboolean-Models with sound

Technical Filters

ParameterTypeDescription
pbr_typestringPBR workflow (metalness, specular, true)
file_formatstringFile format (gltf, fbx, blend, obj)
licensestringLicense (CC0, CC-BY, CC-BY-NC, etc.)
min_face_countintegerMinimum polygon faces
max_face_countintegerMaximum polygon faces
sort_bystringSort by (likes, views, recent)
dateintegerModels from last X days

Available Categories

animals-pets, architecture, art-abstract, cars-vehicles,
characters-creatures, cultural-heritage-history, electronics-gadgets,
fashion-style, food-drink, furniture-home, music, nature-plants,
news-politics, people, places-travel, science-technology,
sports-fitness, weapons-military

📤 Output Structure

Each run outputs to the dataset:

1. Metadata Record

{
"_metadata": true,
"search_params": {
"q": "cyberpunk sports car",
"tags": ["cyberpunk", "low-poly"],
"categories": ["cars-vehicles"],
"downloadable": true
},
"ai_powered": true,
"original_query": "I need a futuristic sports car...",
"generated_q": "cyberpunk sports car",
"generated_tags": ["cyberpunk", "low-poly", "game-ready"],
"result_count": 24,
"pagination": {
"has_next": true,
"has_previous": false,
"next_cursor": "cD0yNA==",
"next_url": "https://api.sketchfab.com/v3/search?..."
}
}

2. Model Records

{
"uid": "abc123...",
"name": "Cyberpunk Car",
"user": { "username": "artist123", "displayName": "Artist" },
"thumbnails": { "images": [...] },
"viewerUrl": "https://sketchfab.com/3d-models/...",
"isDownloadable": true,
"faceCount": 5000,
"license": { "slug": "cc-by-4.0" }
}

🏗️ Technical Architecture

Stack

  • Runtime: Python 3.11+
  • Framework: Apify SDK 3.x
  • AI/ML: LangChain + LangGraph + Google Gemini 2.0 Flash
  • HTTP: HTTPX (async)
  • Validation: Pydantic 2.x

Key Components

ComponentPurpose
SketchfabSearchParamsPydantic model for structured output
GraphStateLangGraph state with pagination support
SEARCH_SYSTEM_PROMPTAI prompt for SEO-optimized search generation
ai_processing_nodeConverts long text → q + tags + categories
sketchfab_api_nodeAPI call with cursor pagination
extract_pagination_infoParses next/previous cursors

🚀 Deployment

# Login to Apify
apify login
# Run locally
apify run
# Deploy to cloud
apify push

🔐 Environment Variables

VariableDescription
GOOGLE_API_KEYGoogle Gemini API key (alternative to input param)

📚 Resources

🏆 Built for Apify Challenge

This Actor demonstrates:

  • Ultimate Search Strategy: q + tags + categories combined
  • AI-Powered SEO: Long text → optimized search params
  • Full Pagination: Cursor-based next/previous navigation
  • LangGraph Architecture: Intelligent state machine routing
  • Smart Defaults: downloadable=true, auto-category detection
  • Production-Ready: Error handling, fallbacks, logging

Made with 💜 for intelligent 3D model discovery. Search smarter, not harder!