{"id":30694666,"url":"https://github.com/schalkneethling/linklens","last_synced_at":"2025-10-07T02:18:37.858Z","repository":{"id":306270987,"uuid":"1025597009","full_name":"schalkneethling/linklens","owner":"schalkneethling","description":"Accepts a URL, returns the title, description and SocialShare image","archived":false,"fork":false,"pushed_at":"2025-07-24T14:26:04.000Z","size":62,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-09-02T06:43:24.097Z","etag":null,"topics":["metadata-extraction","microservice","netlify-functions","typescript","web-scraping"],"latest_commit_sha":null,"homepage":"https://link-lens.netlify.app/api/link-lens","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/schalkneethling.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-07-24T13:52:31.000Z","updated_at":"2025-07-24T21:38:49.000Z","dependencies_parsed_at":"2025-07-24T19:15:03.018Z","dependency_job_id":"7d0deedd-7efb-43cf-b866-255a7b79beae","html_url":"https://github.com/schalkneethling/linklens","commit_stats":null,"previous_names":["schalkneethling/linklens"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/schalkneethling/linklens","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/schalkneethling%2Flinklens","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/schalkneethling%2Flinklens/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/schalkneethling%2Flinklens/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/schalkneethling%2Flinklens/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/schalkneethling","download_url":"https://codeload.github.com/schalkneethling/linklens/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/schalkneethling%2Flinklens/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278708004,"owners_count":26031932,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-07T02:00:06.786Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["metadata-extraction","microservice","netlify-functions","typescript","web-scraping"],"created_at":"2025-09-02T06:43:23.042Z","updated_at":"2025-10-07T02:18:37.836Z","avatar_url":"https://github.com/schalkneethling.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# LinkLens\n\n[![Netlify Status](https://api.netlify.com/api/v1/badges/d1999470-27b2-4258-a3b9-165e9cc666e2/deploy-status)](https://app.netlify.com/projects/link-lens/deploys)\n\nA microservice that accepts a URL and returns the title, description, and social share image (Open Graph image) from the webpage.\n\n## Overview\n\nLinkLens is a lightweight web scraping service built with TypeScript and deployed on Netlify Functions. It extracts essential metadata from web pages, making it ideal for generating link previews, social media cards, or any application that requires displaying webpage information.\n\n## Features\n\n- **Fast and Lightweight**: Built on Netlify Functions for quick response times\n- **Rich Metadata Extraction**: Extracts title, description, and Open Graph images\n- **TypeScript**: Fully typed for a better development experience\n- **Serverless**: No server maintenance required\n- **CORS Enabled**: Ready for cross-origin requests\n\n## API Usage\n\n### Endpoint\n\n```\nGET /api/link-lens?url={URL}\n```\n\n### Request\n\nSend a GET request with the URL as a query parameter:\n\n```\nGET /api/link-lens?url=https://example.com\n```\n\n### Response\n\nThe service returns a JSON response with the extracted metadata:\n\n```json\n{\n  \"title\": \"Example Page Title\",\n  \"description\": \"This is the page description or meta description\",\n  \"image\": \"https://example.com/og-image.jpg\"\n}\n```\n\n### Example Usage\n\n```javascript\nconst url = encodeURIComponent(\"https://example.com\");\nconst response = await fetch(`/api/link-lens?url=${url}`);\n\nconst data = await response.json();\nconsole.log(data.title, data.description, data.image);\n```\n\n## Local Development\n\n### Prerequisites\n\n- Node.js 22+\n- npm or yarn\n\n### Setup\n\n1. Clone the repository:\n\n   ```bash\n   git clone https://github.com/schalkneethling/linklens.git\n   cd linklens\n   ```\n\n2. Install dependencies:\n\n   ```bash\n   npm install\n   ```\n\n3. Start the development server:\n   ```bash\n   npm run dev\n   ```\n\n### Available Scripts\n\n- `npm run build` - Build the project for production\n- `npm run lint:eslint` - Run ESLint\n- `npm run prettier:lint` - Check code formatting\n- `npm run prettier:format` - Format code with Prettier\n- `npm run build:ts` - Compile TypeScript\n\n## Deployment\n\nThis project is configured for deployment on Netlify Functions. The main function is located at `netlify/functions/link-lens.mts`.\n\n### Netlify Deployment\n\n1. Connect your repository to Netlify\n2. Set the build command: `npm run build`\n3. Set the publish directory: `public` (if applicable)\n4. Deploy!\n\nThe function will be available at `https://your-site.netlify.app/api/link-lens`\n\n## Contributing\n\nWe welcome contributions! Here's how you can help:\n\n### Development Process\n\n1. Fork the repository\n2. Create a feature branch: `git checkout -b feature/amazing-feature`\n3. Make your changes\n4. Run tests and linting: `npm run lint:eslint \u0026\u0026 npm run prettier:lint`\n5. Commit your changes: `git commit -m 'Add amazing feature'`\n6. Push to the branch: `git push origin feature/amazing-feature`\n7. Open a Pull Request\n\n### Code Style\n\n- Use TypeScript for all new code\n- Follow ESLint configuration\n- Format code with Prettier\n- Write clear commit messages\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n## Author\n\n**Schalk Neethling**\n\n## Acknowledgments\n\n- Built with [Cheerio](https://cheerio.js.org/) for HTML parsing\n- Deployed on [Netlify Functions](https://www.netlify.com/products/functions/)\n- Powered by [TypeScript](https://www.typescriptlang.org/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fschalkneethling%2Flinklens","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fschalkneethling%2Flinklens","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fschalkneethling%2Flinklens/lists"}