Let's say I have 10 company names.
How to find their "nearly-exact" linkedin url?
ex.
A company is named "ABC Corp", its' linkedin url might be "https://www.linkedin.com/company/abc-corp"
but it's not accurate.
There's a way to improve the precision by use google to search linkedin+company name to find the result, but the error rate is still high.
is there any better solution?
The link you'd fetch would be https://www.linkedin.com/search/results/all/?keywords=COMPANY_NAME_HERE which searches for the company name.
Then, you can use beautiful soup to scrape the first result which is usually the company you are looking for
To do this via web/iOS/Android.
https://www.linkedin.com/help/linkedin/answer/3881/find-an-organization-s-page-on-linkedin?lang=en
Type the company, university, or high school name into the Search bar at the top of your LinkedIn homepage.
Click Companies or Schools at the top of the search results page.
Click Locations, Industry, or Company size to filter the results for a company. (optional)
Click on the correct organization name in the results list that appears.
To do this via the API
I'm assuming this is what you're looking for.
LinkedIn marketing API provides an Organization Search API for this use case. You can search using just keywords by calling the search API.
eg:
GET https://api.linkedin.com/v2/search?q=companiesV2&baseSearchParams.keywords=LinkedIn%20Corporation
However, if you happen to know information like the company's region/industry/company size etc. you can specify those as facets (think of these like filters)
eg:
GET https://api.linkedin.com/v2/search?q=companiesV2&baseSearchParams.keywords=LinkedIn%20Corporation&companySearchParams.facetIndustry%5B0%5D=6&companySearchParams.facetCompanySize%5B0%5D=H&companySearchParams.facetCompanyCountryRegion%5B0%5D=us:84
Documentation: https://learn.microsoft.com/en-us/linkedin/marketing/integrations/community-management/organizations/organization-search
Related
The Goal and the Problem
I am working on a sharing solution in our React-based video and audio search apps. My goal is that when sharing a single item from a search result set to a social media app (e.g. Facebook, Messenger, LinkedIn, Twitter) and then clicked by someone else, the user lands within our search app/experience with only a single result showing (the shared item), which is done using query parameters in our search apps. Imagine using Google image search, and creating a little share icon on each search result so that when hovered/clicked/tapped and shared to social media then clicked by someone on said social media channel, the user lands in Google image search with just that single shared item in the result set.
We've been challenged to find a third party solution that uses custom query parameters for share links on each search result to help us achieve our goal. They all seem to use the base url structure (window.location.origin + window.location.pathname e.g. https://www.clipstock.com/audio) which won't work properly to show a single search result within our search experience which needs a query parameter as shown in the example below. Note: this url approach works fine for sharing a full page "node" with just the single video or audio result on the page, which we're also doing separately.
We've built a custom solution in our React based search apps that does achieve our goal of having the user land within our search app with just a single search result although we expect our custom solution to break if/when sharing urls in social apps update which seems to happen yearly or so. We figure a third party JavaScript library or third party social share service will fix these issues faster and cheaper without our development time if/when the sharing URLs break.
Has anyone seen a third party solution to this?
Examples
Example link for landing on a single search result in our audio search app, achieved by the search query q="Reunited" in the url: https://www.clipstock.com/audio?q=%22Reunited%22&size=n_12_n
Example share link of our custom solution for sharing the above search result on Facebook today, which seems to change by the year (note the https://www.facebook.com/sharer/sharer.php?u= part of the url, which is the part that may break from Facebook updates): https://www.facebook.com/sharer/sharer.php?u=https://www.clipstock.com/audio?q=%22Reunited%22&size=n_12_n
Example link of a single video clip node page, which works well with any third party sharing solution, although isn't the goal of this question which is to land in our search app(s) with just the single shared item in the result set which is achieved using query parameters as seen in the examples above: https://www.clipstock.com/clip/young-male-swimmer-diving-starting-block-olympic-size-pool-lanes-slow-motion
The below approach to sharing works for us, although is the custom sharing solution we created that may break over the years. In this example, on mobile, the Facebook app opens, and on non-mobile, the Facebook web app opens, which is our goal. Either of the Facebook share urls (and the share urls for each other social media app like Messenger, LinkedIn, Twitter) could change over time since they're essentially API integrations and we think it would be cheaper & faster to invest in a third party sharing solution than to monitor for these breaks and fix the breaks ourselves.
Note: some setup code in the below example is not included such as the DrupalContext. We aren't getting errors in the code, rather, we're looking for a third-party solution so that we don't have to maintain custom code.
const drupalContext = useContext(DrupalContext);
const queryString = type === "sfx" ? drupalContext.sfxQueryString : "";
const baseUrl = window.location.origin.concat(window.location.pathname);
const sharingLink =
type === "video"
? baseUrl.concat("?q=").concat(nodeId)
: baseUrl
.concat("?q=")
.concat(encodeURI('"'))
.concat(encodeURI(title))
.concat(encodeURI('"'))
.concat(queryString);
const shareViaFacebook = () => {
let shareUrl = "";
if (platform?.os?.family === ("iOS" || "Android" || "Windows Phone")) {
shareUrl = "fb://share/?link=" + sharingLink;
} else {
shareUrl = "https://www.facebook.com/sharer/sharer.php?u=" + sharingLink;
}
window.open(shareUrl);
};
We've created similar shareVia... methods for each social media app we're sharing to which currenly consists of Facebook, Messenger, LinkedIn, Twitter, Email, and "Copy Link". Email and "Copy Link" are what we're going to fall back to using if we can't find a reliable third-party solution (removing Facebook, Messenger, LinkedIn, and Twitter sharing options) since Email and "Copy Link" reliably work and we don't expect these two options to break over time.
As i am creating application like uber ola and using autocomplete api for address this one https://maps.googleapis.com/maps/api/place/autocomplete/json which is not return all location such as search Gwalior railway station but it does-not show right prediction.I want to search all address search like we do in google maps.Kindly help me which api should i use to achieve from any google rest api.Thanks in advance.
You need to use Places API of Google.
Here is an example for search
https://maps.googleapis.com/maps/api/place/textsearch/json?query=railway+station+in+gwalior&key=<YourKey>
The above API will provide you the paginated results in size of 20 and along with details of each. If you need further details you can use the following API along with the places ID which is returned from the above API response.
https://maps.googleapis.com/maps/api/place/details/json?placeid=<getThisFromResponseOfPreviousAPI>&fields=name,formatted_address,address_component,geometry&key=<YourKey>
I'm using an API in JSON format to display the standings of sports teams in a league. Here's an example of the JSON data I'm working with:
{ "data":[
{
"position":1,
"team_id":53,
"team_name":"Celtic",
"group_id":null,
"group_name":null,
"overall":{
"games_played":25,
"won":18,
"draw":6,
"lost":1,
"goals_scored":54,
"goals_against":17
},
"home":{
"games_played":13,
"won":9,
"draw":4,
"lost":0,
"goals_scored":30,
"goals_against":8
},
"away":{
"games_played":12,
"won":9,
"draw":2,
"lost":1,
"goals_scored":24,
"goals_against":9
},
"total":{
"goal_difference":"+37",
"points":60
},
"result":"Promotion - Premiership (Championship Group)",
"points":60,
"recent_form":"WWWDW",
"status":"same"
}
]}
I have a way to associate the team_ID with specific team data from the API. What I'm trying to do is to make the teams in my Standings tables clickable, so when the user clicks on a team, they can go to a page where I display data for that specific team (the info would, of course, be extracted from the API). Now, I'm developing the website on top of WordPress, and I'm wondering how I can auto-generate pages for every team, so that site users can go to specific team pages directly from the Standings tables.
It's not convenient for me to manually create pages with a piece of code and upload them to the FTP server for each team, because there'll be so many teams (eventually thousands of teams), and it's definitely not feasible.
Can anyone please guide me on the way to auto-create pages for the teams so my team links don't return 404 Not Found pages? An important point is that I'm using JavaScript to manipulate the data.
I'm using the team_id property in the API to create my team links, but I don' know how to use my team_id to automatically create team pages on my WordPress site.
Please help if you can. :)
You can use ajax method on click team-id, in ajax call function, check, is this team-id exists or not, if exists redirect to respective page or not create a new page and display require information.
I have worked same type project, I am using CPT method for the game and used the custom taxonomy for team and player.
How can I determine if a user that is logged into my app is a Teacher or a Student?
I can successfully log in to my app using a Google Classroom test account, but when I look at the information retrieved, I see nothing in regards to role. I've looked through the API but so far I've only seen calls related to getting courses and rosters. I tried the user profile call, but the info returned did not include a role.
At a basic level, I just want to do loggedInUser.role === teacher.
Edit:
Updated for clarification. I am not looking for courses.students or courses.teachers. I consider those roster information. I already have a profile from a logged in user. I shouldn't have to see what role they are by listing teachers in a course.
Via the Classroom API, you can only determine if a user is a teacher or a student relative to a particular course. (It's possible for a user to be a teacher in one course, and a student in another.)
If you need to determine if a user is a real-world teacher or student, you need to do this via a mechanism separate from Classroom.
You might also like to star this issue to learn about any possible improvements to the API.
You're looking for courses.students and courses.teachers:
https://developers.google.com/classroom/reference/rest/v1/courses.students
https://developers.google.com/classroom/reference/rest/v1/courses.teachers
Once you have a course ID you can query these using the "list" request:
https://developers.google.com/classroom/reference/rest/v1/courses.teachers/list
https://developers.google.com/classroom/reference/rest/v1/courses.students/list
In android I could use google play services and geo location functions to get a user to type a string like "London, England" or "McDonalds" etc.., and have the service take that string and return a set of Location Objects. Each one has a city,address,country,lat,long etc... details.
I'm now making a web app version of it and I want to know if its possible to do this in HTML/html5 with any plugins preferable by trusted companies like Google.
Thanks.
I have to question if you even looked ;)
https://developers.google.com/maps/documentation/javascript/tutorial
The Maps service was born on the web, of course that exists!