Skip to main content
Glama

scrape_linkedin

Extract LinkedIn profile details, posts, and comments programmatically by providing a profile URL. Integrates with RapidAPI, costing 2 credits per request, for efficient data retrieval and analysis.

Instructions

Retrieves detailed profile data and posts with comments from a LinkedIn profile URL using RapidAPI. Each request costs 2 credits.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
linkedin_urlYesThe LinkedIn profile URL to scrape.

Implementation Reference

  • The main async handler function that executes the LinkedIn profile scraping logic using the Linkd API.
    export const scrapeLinkedinTool = async ({ linkedin_url, }: ScrapeLinkedinParams) => { const apiUrl = new URL("https://search.linkd.inc/api/enrich/scrape"); apiUrl.searchParams.append("linkedin_url", linkedin_url); const response = await makeLinkdRequest(apiUrl.toString(), {}); const responseData = await response.json(); if (responseData.error) { throw new Error( `Failed to scrape LinkedIn profile: ${JSON.stringify(responseData.error)}` ); } return { content: [ { type: "text" as const, text: `profile scraping completed successfully: ${JSON.stringify(responseData, null, 2)}` } ] }; };
  • Zod schema defining the single input parameter 'linkedin_url' for the tool.
    export const scrapeLinkedinSchema = { linkedin_url: z.string().describe("The LinkedIn profile URL to scrape."), };
  • Registration of the scrape_linkedin tool on the MCP server using server.tool().
    server.tool( scrapeLinkedinName, scrapeLinkedinDescription, scrapeLinkedinSchema, scrapeLinkedinTool );

Other Tools

Related Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/automcp-app/linkd-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server