DEV Community

Victor Peter
Victor Peter

Posted on • Edited on

Get information about any school's LinkedIn profile by making a simple HTTP request to Proxycurl request

Introduction

As a web scraper, data scientist, or hobbyist, you may want to know more about a school by simply making an API call but don't know which API can offer that service. Proxycurl has an API called the School API. This API is used to get information about a school as long as the school has a profile on LinkedIn.

The School API has an endpoint called the School Profile endpoint which is used to fetch information about a school's name, description, website URL, locations, etc.

How to Interact with the School Profile Endpoint

You can interact with the School Profile endpoint by simply making a GET request to https://nubela.co/proxycurl/api/linkedin/school with the following parameters:
url (required): the URL of the school profile, for example, https://www.linkedin.com/school/national-university-of-singapore.
use_cache (optional): This parameter accepts either an "if-present" (default value) value or an "if-recent" *value. *"if-present" fetches the profile from cache regardless of the age of the profile. If the profile is not available in cache, API will attempt to source the profile from external sources.
The "if-recent" value is used the API will make its best effort to return a fresh profile no older than 29 days. This costs an extra 1 credit.
Note: Each successful request made with the School Profile endpoint costs 1 credit.
Here is how to make the API call using JavaScript's fetch API:

const parameters = new URLSearchParams({
 url: 'https://www.linkedin.com/school/national-university-of-singapore',
 use_cache: 'if-present'
});
fetch("https://nubela.co/proxycurl/api/linkedin/profile/resolve?" + parameters, {
 method: "GET",
 headers: {
 Authorization: "Bearer <your API key>"
 }
});
Enter fullscreen mode Exit fullscreen mode

Here is how to make the API call using Python's requests package:

import requests
response = requests.get("https://nubela.co/proxycurl/api/linkedin/profile/resolve",
 params = {
 'url': 'https://www.linkedin.com/school/national-university-of-singapore',
 'use_cache': 'if-present'
 },
 headers={'Authorization': 'Bearer <your API key>'})
Enter fullscreen mode Exit fullscreen mode

The response should look similar to this:

{
    "background_cover_image_url": "https://media-exp1.licdn.com/dms/image/C4D1BAQH9RnIm5udicQ/company-background_10000/0/1519796779731?e=1654585200\u0026v=beta\u0026t=OpKFclmBc0ERcn8EiRImFXJrsVmNXlXOD9JpJx5NJQA",
    "company_size": [
        5001,
        10000
    ],
    "company_size_on_linkedin": 15199,
    "company_type": "EDUCATIONAL_INSTITUTION",
    "description": "At NUS, we are shaping the future through our people and our pursuit of new frontiers in knowledge. In a single century, we have become a university of global influence and an Asian thought leader. Our location at the crossroads of Asia informs our mission and gives us a tremendous vantage point to help create opportunities and address the pressing issues facing Singapore, Asia and the world.\r\rAt NUS, we believe in education, research and service that change lives.",
    "follower_count": 470304,
    "founded_year": 1905,
    "hq": {
        "city": "Singapore",
        "country": "SG",
        "is_hq": true,
        "line_1": "21 Lower Kent Ridge Road, Singapore",
        "postal_code": "119077",
        "state": null
    },
    "industry": "Higher Education",
    "linkedin_internal_id": "5524",
    "locations": [
        {
            "city": "Singapore",
            "country": "SG",
            "is_hq": true,
            "line_1": "21 Lower Kent Ridge Road, Singapore",
            "postal_code": "119077",
            "state": null
        }
    ],
    "name": "National University of Singapore",
    "profile_pic_url": "https://media-exp1.licdn.com/dms/image/C4D0BAQGvBq9cz6AIIQ/company-logo_400_400/0/1519856127538?e=1661990400\u0026v=beta\u0026t=K6ND2NedE8iKNY9YKoQXhDCl773XebFKY0VbX-5sATA",
    "search_id": "5524",
    "similar_companies": [
        {
            "industry": "Education Management",
            "link": "https://www.linkedin.com/school/nus-business-school/",
            "location": null,
            "name": "NUS Business School"
        },
        {
            "industry": "Higher Education",
            "link": "https://www.linkedin.com/school/nusfass/",
            "location": null,
            "name": "NUS Faculty of Arts and Social Sciences"
        },
        {
            "industry": "Research",
            "link": "https://www.linkedin.com/company/solar-energy-research-institute-of-singapore-seris",
            "location": null,
            "name": "Solar Energy Research Institute of Singapore"
        },
        {
            "industry": "Higher Education",
            "link": "https://www.linkedin.com/school/duke-nus/",
            "location": null,
            "name": "Duke-NUS Medical School"
        },
        {
            "industry": "Professional Training \u0026 Coaching",
            "link": "https://www.linkedin.com/company/iss_nus",
            "location": null,
            "name": "Institute of Systems Science, National University of Singapore"
        },
        {
            "industry": "Higher Education",
            "link": "https://www.linkedin.com/company/nusfst",
            "location": null,
            "name": "NUS Department of Food Science and Technology"
        },
        {
            "industry": "Education Management",
            "link": "https://www.linkedin.com/company/centre-for-future-ready-graduates",
            "location": null,
            "name": "NUS Centre for Future-ready Graduates"
        }
    ],
    "specialities": [
        "education",
        "research",
        "broad-based curriculum",
        "cross-faculty enrichment"
    ],
    "tagline": null,
    "universal_name_id": "national-university-of-singapore",
    "updates": [],
    "website": "http://nus.edu.sg"
}
Enter fullscreen mode Exit fullscreen mode

Conclusion

As we can see, a simple API request to Proxycurl's School Profile endpoint can give us information about the school's profile we are working with. More at https://nubela.co/blog/linkdb-an-exhaustive-dataset-of-linkedin-members-and-companies/

Top comments (0)