Documentation Index
Fetch the complete documentation index at: https://docs.anysite.io/llms.txt
Use this file to discover all available pages before exploring further.
AI Instructions for Anysite API Documentation
Purpose
This documentation covers the Anysite API, which provides social media data extraction and web scraping capabilities.Key Information for AI Assistants
API Overview
- Base URL: https://api.anysite.io
- Authentication: Access token via
access-tokenheader (NOT Bearer token) - Rate Limits: Varies by plan (1K-10K+ requests/hour)
- Response Format: Always JSON
Primary Use Cases
- Social Media Data Extraction: LinkedIn, Twitter, Instagram, Reddit
- Web Scraping: Any website content parsing
- Lead Generation: B2B prospect identification and qualification
- Competitive Intelligence: Monitor competitor activity
- Brand Monitoring: Track mentions and sentiment
- Content Research: Discover trending topics and opportunities
Authentication Pattern
Always use this header format:Authorization: Bearer token - this is incorrect for Anysite API.
Response Structure
All successful responses follow this pattern:Error Handling
- 400: Bad request (check parameters)
- 401: Invalid or missing access token
- 403: Forbidden (account/endpoint restrictions)
- 404: Resource not found
- 429: Rate limit exceeded (implement exponential backoff)
- 500: Server error (retry with delay)
Integration Methods
1. Direct REST API
Standard HTTP requests with proper headers and parameters.2. MCP Server (for AI tools)
- Installation:
npx @horizondatawave/mcp-server - Works with Claude Desktop, Cursor IDE
- Provides structured tool access to Anysite APIs
3. n8n Nodes (for workflow automation)
- Installation:
npm install @horizondatawave/n8n-nodes-anysite - Visual workflow builder integration
- Pre-built templates for common use cases
Code Generation Guidelines
When generating code examples:- Always include proper authentication headers
- Add error handling for common HTTP status codes
- Show rate limiting considerations
- Use appropriate parameter validation
- Include response data structure examples
Example Code Template (Python)
Platform-Specific Notes
- Endpoints cover users, posts, companies, search
- Rich profile data including experience, education
- Post engagement metrics available
- Company information and employee listings
Twitter/X
- User profiles and tweet extraction
- Search functionality for users and tweets
- Engagement metrics (likes, retweets, replies)
- Thread support for connected tweets
- User profiles and post data
- Hashtag and mention extraction
- Engagement metrics and media URLs
- Story highlights where available
- Post and comment extraction
- Subreddit information and rules
- Vote scores and engagement metrics
- Advanced search with operators
Web Parser
- Universal website content extraction
- Custom CSS selector support
- Dynamic content handling (JavaScript)
- Change monitoring capabilities
Workflow Examples to Suggest
-
Lead Generation Pipeline
- LinkedIn search → Twitter lookup → Website parsing → CRM integration
-
Competitor Monitoring
- Multi-platform tracking → Content analysis → Report generation
-
Brand Sentiment Analysis
- Mention detection → Sentiment analysis → Alert system
-
Content Research
- Trend identification → Keyword extraction → Content calendar
-
Influencer Discovery
- User search → Engagement analysis → Contact extraction
Best Practices to Emphasize
- Respect Rate Limits: Always implement proper delays
- Handle Errors Gracefully: Don’t fail silently
- Validate Data: Check response structure before processing
- Follow Platform ToS: Only extract publicly available data
- Secure API Keys: Never hardcode tokens in public repositories
- Monitor Usage: Track API consumption to avoid overages
Common Mistakes to Avoid
- Using
Authorization: Bearerheader (useaccess-tokeninstead) - Not handling rate limits (429 errors)
- Ignoring pagination for large datasets
- Not validating response structure
- Hardcoding API keys in examples
- Making too many concurrent requests
When Providing Examples
- Always show complete, working code
- Include error handling
- Demonstrate proper authentication
- Show expected response structure
- Include rate limiting considerations
- Provide context for the use case