{"id":37232018,"url":"https://github.com/sharpapi/laravel-content-detect-urls","last_synced_at":"2026-01-15T03:46:59.899Z","repository":{"id":332442544,"uuid":"1131197539","full_name":"sharpapi/laravel-content-detect-urls","owner":"sharpapi","description":"Laravel package for SharpAPI.com - laravel-content-detect-urls","archived":false,"fork":false,"pushed_at":"2026-01-09T16:12:10.000Z","size":4,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-01-13T22:59:29.564Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","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/sharpapi.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-01-09T16:12:07.000Z","updated_at":"2026-01-09T16:12:14.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/sharpapi/laravel-content-detect-urls","commit_stats":null,"previous_names":["sharpapi/laravel-content-detect-urls"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/sharpapi/laravel-content-detect-urls","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sharpapi%2Flaravel-content-detect-urls","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sharpapi%2Flaravel-content-detect-urls/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sharpapi%2Flaravel-content-detect-urls/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sharpapi%2Flaravel-content-detect-urls/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sharpapi","download_url":"https://codeload.github.com/sharpapi/laravel-content-detect-urls/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sharpapi%2Flaravel-content-detect-urls/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28442350,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-15T00:55:22.719Z","status":"online","status_checked_at":"2026-01-15T02:00:08.019Z","response_time":62,"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":[],"created_at":"2026-01-15T03:46:59.284Z","updated_at":"2026-01-15T03:46:59.888Z","avatar_url":"https://github.com/sharpapi.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# AI URL Detector for Laravel\n\n[![Latest Version on Packagist](https://img.shields.io/packagist/v/sharpapi/laravel-content-detect-urls.svg?style=flat-square)](https://packagist.org/packages/sharpapi/laravel-content-detect-urls)\n[![Total Downloads](https://img.shields.io/packagist/dt/sharpapi/laravel-content-detect-urls.svg?style=flat-square)](https://packagist.org/packages/sharpapi/laravel-content-detect-urls)\n\nThis package provides a Laravel integration for the SharpAPI URL Detection service. It allows you to automatically detect and extract URLs from text content, which is perfect for content moderation, data extraction, and link validation.\n\n## Installation\n\nYou can install the package via composer:\n\n```bash\ncomposer require sharpapi/laravel-content-detect-urls\n```\n\n## Configuration\n\nPublish the config file with:\n\n```bash\nphp artisan vendor:publish --tag=\"sharpapi-content-detect-urls\"\n```\n\nThis is the contents of the published config file:\n\n```php\nreturn [\n    'api_key' =\u003e env('SHARP_API_KEY'),\n    'base_url' =\u003e env('SHARP_API_BASE_URL', 'https://sharpapi.com/api/v1'),\n    'api_job_status_polling_wait' =\u003e env('SHARP_API_JOB_STATUS_POLLING_WAIT', 180),\n    'api_job_status_polling_interval' =\u003e env('SHARP_API_JOB_STATUS_POLLING_INTERVAL', 10),\n    'api_job_status_use_polling_interval' =\u003e env('SHARP_API_JOB_STATUS_USE_POLLING_INTERVAL', false),\n];\n```\n\nMake sure to set your SharpAPI key in your .env file:\n\n```\nSHARP_API_KEY=your-api-key\n```\n\n## Usage\n\n```php\nuse SharpAPI\\ContentDetectUrls\\ContentDetectUrlsService;\n\n$service = new ContentDetectUrlsService();\n\n// Detect URLs in text\n$detectedUrls = $service-\u003edetectUrls(\n    'Check out these websites: example.com, https://github.com, and www.laravel.com/docs'\n);\n\n// $detectedUrls will contain a JSON string with the detected URLs\n```\n\n## Parameters\n\n- `text` (string): The text content to analyze for URLs\n\n## Response Format\n\nThe response is a JSON string containing an array of detected URLs with their protocols:\n\n```json\n[\n  {\n    \"url\": \"http://example.com\",\n    \"protocol\": \"http\"\n  },\n  {\n    \"url\": \"https://github.com\",\n    \"protocol\": \"https\"\n  },\n  {\n    \"url\": \"http://www.laravel.com/docs\",\n    \"protocol\": \"http\"\n  }\n]\n```\n\n## Features\n\n- Automatically detects URLs in text content\n- Works with various URL formats (with or without protocol, with or without www)\n- Identifies the protocol for each URL\n- Handles URLs with different TLDs (.com, .org, .io, etc.)\n- Useful for content moderation, data extraction, and link validation\n\n## Credits\n\n- [Dawid Makowski](https://github.com/dawidmakowski)\n- [All Contributors](../../contributors)\n\n## License\n\nThe MIT License (MIT). Please see [License File](LICENSE.md) for more information.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsharpapi%2Flaravel-content-detect-urls","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsharpapi%2Flaravel-content-detect-urls","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsharpapi%2Flaravel-content-detect-urls/lists"}