Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feat] Issue to retrieve similar link URLs given a URL. #1064

Open
Madhuvod opened this issue Jan 14, 2025 · 0 comments
Open

[Feat] Issue to retrieve similar link URLs given a URL. #1064

Madhuvod opened this issue Jan 14, 2025 · 0 comments

Comments

@Madhuvod
Copy link

Madhuvod commented Jan 14, 2025

Problem Description
I find it hard to retrieve similar company links that are competitors to a company, given a particular company URL. I have been using the search endpoint for this but it just gives me responses which includes LinkedIn urls, YouTube urls, blogposts etc, but I just need company website url.

Proposed Feature
search is using keyword search. maybe neural search would help

Alternatives Considered
I need help from you guys giving me alternative solutions to find similar company URL's using any endpoint of firecrawl.

my current code:

 import requests

url = "https://api.firecrawl.dev/v1/search"

headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

company_name = "Rollout AI"
keywords = "AI website builder"

query = f"Find companies similar to {company_name} that compete in the same market space as {keywords}"

payload = {
    "query": query,
    "limit": 10,
    "lang": "en", 
    "timeout": 60000,
    "scrapeOptions": {}
}

response = requests.post(url, json=payload, headers=headers)

if response.status_code == 200:
    data = response.json()
    if data.get("success"):
        results = data.get("data", [])
        similar_company_urls = [result["url"] for result in results]
        print("Similar Company URLs:")
        for url in similar_company_urls:
            print(url)
    else:
        print("Search request was not successful.")
        print(data.get("warning", "No warning provided."))
else:
    print(f"Failed to retrieve data. Status code: {response.status_code}")

also, I dont want to input dynamic keywords in the query. is there a way I can just give the website url of the main company, so that I automatically get the competitors urls

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant