@idiomark/adapter-behance
Behance adapter for Idiomark extraction using web scraping.
Important Note
Behance does not have a public API. This adapter uses web scraping to extract personality-relevant signals from public Behance profiles. The adapter:
- Uses conservative rate limiting to avoid being blocked
- Implements intelligent caching to minimize requests
- Handles HTML parsing with fallbacks for structure changes
- Respects robots.txt and best practices
Use responsibly and be aware that scraping may violate Behance's Terms of Service. This adapter is intended for educational and research purposes only.
Features
- User Profile: Display name, bio, location, skills, employment info
- Projects: Creative works with descriptions, tags, tools, fields, and styles
- Comments: Feedback and discussions on projects
- Collections: Curated project collections with themes
- Engagement Metrics: Views, appreciations, comments, followers
- Creative Signals: Color preferences, tool usage, style patterns
- Collaboration Data: Team projects vs. solo work analysis
Authentication
Behance adapter uses username-based authentication (public profiles only).
import { BehanceAdapter } from '@idiomark/adapter-behance'
const adapter = new BehanceAdapter({
username: 'behance_username'
// Optional: sessionCookie for authenticated requests
})
Rate Limits
Since Behance has no official API, the adapter implements conservative rate limiting:
- Default: 30 requests per minute
- Configurable: Adjust via
requestsPerMinuteoption - Automatic waiting: Pauses when approaching limits
- Respects 429 responses: Waits and retries on rate limit errors
Warning: Aggressive scraping may result in IP bans or account restrictions. Always use the minimum rate necessary.
Usage
import { BehanceAdapter } from '@idiomark/adapter-behance'
const adapter = new BehanceAdapter({
username: 'creative_user'
}, {
requestsPerMinute: 20, // Conservative limit
cacheEnabled: true,
respectRateLimit: true
})
// Authenticate (verifies profile exists)
const authenticated = await adapter.authenticate()
// Fetch data
const data = await adapter.fetchData({
limit: 100,
startDate: new Date('2024-01-01'),
endDate: new Date('2024-12-31'),
includeReplies: true
})
// Extract raw text for analysis
const result = await adapter.extractRawText({ limit: 100 })
// Extract personality signals specifically from Behance data
const signals = await adapter.extractPersonalitySignals()
console.log(signals.creativity)
console.log(signals.skills)
console.log(signals.collaboration)
Configuration Options
interface BehanceAdapterConfig {
maxRetries?: number // Default: 3
retryDelay?: number // Default: 1000ms
requestTimeout?: number // Default: 30000ms
userAgent?: string // Custom user agent
respectRateLimit?: boolean // Default: true
requestsPerMinute?: number // Default: 30
cacheEnabled?: boolean // Default: true
}
Data Types
| Type | Description |
|---|---|
profile | User profile information, bio, skills |
project | Creative projects with descriptions and metadata |
comment | Comments and discussions on projects |
collection | Curated collections of projects |
Personality Signals
The adapter extracts specific personality signals relevant to creative professionals:
Creativity Indicators
- Tags & Fields: Domains of expertise (UI/UX, Illustration, Branding, etc.)
- Tools: Software proficiency (Photoshop, Illustrator, Figma, etc.)
- Styles: Visual style preferences
- Color Preferences: Dominant colors in work
Work Style
- Freelance vs. Company: Employment preference
- Collaboration Ratio: Team vs. solo projects
- Project Volume: Output frequency
- Engagement: How audience responds to work
Skills Analysis
- Primary Skills: Top domains of expertise
- Tool Proficiency: Software expertise
- Creative Domains: Industry specializations
Social Presence
- Follower Count: Audience size
- Engagement Rate: Views/Appreciations per project
- Comment Activity: Community interaction
API Methods
Core Methods
authenticate()- Verify profile exists and is accessiblefetchData(options)- Fetch all relevant data for personality analysisnormalize(raw)- Normalize raw content to standard format
Data Fetching
fetchUserProfile()- Fetch user profile informationfetchProjects(options)- Fetch user's creative projectsfetchProjectComments(options)- Fetch comments on projectsfetchCollections(options)- Fetch curated collectionsextractPersonalitySignals()- Extract Behance-specific personality data
Utility
extractRawText(options)- Extract raw text for analysishealthCheck()- Check if profile is accessiblereset()- Clear cache and reset stategetMetrics()- Get request/cache statisticsdispose()- Clean up resources
Limitations
- No Official API: All data is scraped from public pages
- Rate Sensitive: May be blocked if used aggressively
- Structure Changes: HTML structure changes may break scraping
- Authenticated Content: Private/mature content not accessible
- Dynamic Content: Some content loads via JavaScript and may be missed
Best Practices
- Use Conservative Limits: Start with 10-20 requests per minute
- Enable Caching: Reduce duplicate requests
- Handle Errors Gracefully: Profiles may be private or deleted
- Monitor for Blocks: Watch for 429 or 403 responses
- Respect Privacy: Only scrape public profiles
- Add Delays: Space out requests over time
Legal Notice
Web scraping may violate Behance's Terms of Service. This adapter is provided for:
- Educational purposes
- Research on publicly available data
- Personal use on your own profile
Always:
- Check Behance's ToS before using
- Respect robots.txt
- Use minimum necessary rate limits
- Consider using official APIs when available
Example: Full Workflow
import { BehanceAdapter } from '@idiomark/adapter-behance'
async function analyzeBehanceUser(username: string) {
const adapter = new BehanceAdapter(
{ username },
{ requestsPerMinute: 15 }
)
// Check accessibility
const health = await adapter.healthCheck()
if (!health.healthy) {
throw new Error('Profile not accessible')
}
// Extract personality signals
const signals = await adapter.extractPersonalitySignals()
if (!signals) {
throw new Error('Could not extract signals')
}
// Analyze creative style
console.log('Primary Domains:', signals.skills.domains)
console.log('Work Style:', signals.workStyle)
console.log('Collaboration Ratio:', signals.collaboration)
// Fetch detailed content
const projects = await adapter.fetchProjects({ limit: 50 })
console.log(`Analyzed ${projects.length} projects`)
// Extract text for NLP analysis
const textData = await adapter.extractRawText({ limit: 100 })
console.log(`Extracted ${textData.rawContent.length} text samples`)
return signals
}
Data Privacy
This adapter only accesses:
- Public profile information
- Publicly shared projects
- Public comments and discussions
No private or authenticated content is accessed.
Troubleshooting
Profile Not Found
- Verify username is correct
- Check if profile is public
- Confirm account is active
Rate Limiting
- Reduce
requestsPerMinute - Enable caching
- Add delays between batches
Missing Data
- Some content loads dynamically (JavaScript)
- Mature/private content inaccessible
- HTML structure may have changed
Build Issues
cd packages/adapters/behance
npm install
npm run build
License
MIT
Contributing
When modifying this adapter:
- Test rate limiting behavior
- Verify HTML parsing with multiple profiles
- Add fallbacks for structure changes
- Update documentation for new features
- Test with both active and inactive profiles
Resources
Related Adapters
@idiomark/adapter-dribbble- Similar creative platform@idiomark/adapter-github- For developer portfolios@idiomark/adapter-linkedin- For professional profiles