This is the multi-page printable view of this section.
Click here to print.
Return to the regular view of this page.
Social Media & Email Addresses API Reference
These endpoints let you extract journalist’s first name, last name, email address, social media handles from any webpage
These group of endpoints are of particular interest to users working in PR & outreach, content marketing tec.
You build your own journalist database by roughly using the workflow below:
1 - Extract All Social Media Handles & URLs
A Specrom News API endpoint for extracting all social media handles and URLs from a webpage
This endpoint lets you quickly extract all the major social media handles found on the webpage.
Generally speaking, you will be able to find author’s social media handles apart from the social media handles of the news outlet themselves using this endpoint.
import requests
url = "https://specrom-news-api.p.rapidapi.com/"
payload = {
"api_type": "extract_social_media_handles",
"url": "https://www.wsj.com/articles/a-powerful-force-teslas-momentum-leads-stock-market-surge-11595151001"
}
headers = {
"content-type": "application/json",
"X-RapidAPI-Key": "API_Key",
"X-RapidAPI-Host": "specrom-news-api.p.rapidapi.com"
}
response = requests.request("POST", url, json=payload, headers=headers)
print(response.text)
POST / HTTP/1.1
Content-Type: application/json
X-Rapidapi-Key: API_Key
X-Rapidapi-Host: specrom-news-api.p.rapidapi.com
Host: specrom-news-api.p.rapidapi.com
Content-Length: 192
{
"api_type": "extract_social_media_handles",
"url": "https://www.wsj.com/articles/a-powerful-force-teslas-momentum-leads-stock-market-surge-11595151001"
}
Parameter |
Description |
api_type |
extract_social_media_handles |
url |
URL of the webpage |
Output
[
"https://www.instagram.com/wsj/",
"@WSJ",
"https://www.snapchat.com/discover/Wall-Street-Journal/4806310285",
"https://www.youtube.com/user/WSJDigitalNetwork",
"https://twitter.com/WSJ",
"https://www.facebook.com/wsj"
]
2 - Extract Name and Spam Score For Each Email Address
A Specrom News API endpoint for extracting names and a spam score for input email address
We have a vast email database containing over 31 million email addresses. This API endpoint will return full name (if available) along with a label for spam_email and generic_email.
import requests
url = "https://specrom-news-api.p.rapidapi.com/"
payload = {
"api_type": "extract_name_and_spam_classification_from_email_address",
"email_address": "jay@jaympatel.com"
}
headers = {
"content-type": "application/json",
"X-RapidAPI-Key": "API_Key",
"X-RapidAPI-Host": "specrom-news-api.p.rapidapi.com"
}
response = requests.request("POST", url, json=payload, headers=headers)
print(response.text)
POST / HTTP/1.1
Content-Type: application/json
X-Rapidapi-Key: API_Key
X-Rapidapi-Host: specrom-news-api.p.rapidapi.com
Host: specrom-news-api.p.rapidapi.com
Content-Length: 192
{
"api_type": "extract_name_and_spam_classification_from_email_address",
"email_address": "jay@jaympatel.com"
}
Parameter |
Description |
api_type |
extract_name_and_spam_classification_from_email_address |
email_address |
Email address |
Output
{
"Response":
{"first_name":"Jay",
"last_name":"Patel",
"domain":"jaympatel.com",
"spam_status":"Negative",
"generic_email":"Negative"
},
"email_address":"jay@jaympatel.com"
}
This endpoint returns a JSON object containing the following elements:
Parameter |
Description |
first_name |
First name (if available, otherwise NA) |
last_name |
Last name (if available, otherwise NA) |
spam_status |
This returns the spammy behaviour of the email address and it can be “Negative” or “Positive”. Email addresses that are considered spammy will have very low sender reputation |
generic_email |
If an email inbox is generic such as info, help, noreply etc. it will return “Positive” otherwise it will return “Negative” |
3 - Extract Email Address By URL
A Specrom News API endpoint for extracting email address from a webpage using a fast regex
Extract email addresses found in any webpage by inputting a URL. This is an excellent way to build a journalist email database.
Once you have email addresses, use our email address to name endpoint to query our database and get full names and a spam score.
import requests
url = "https://specrom-news-api.p.rapidapi.com/"
payload = {
"api_type": "email_extraction",
"url": "https://www.wsj.com/articles/a-powerful-force-teslas-momentum-leads-stock-market-surge-11595151001"
}
headers = {
"content-type": "application/json",
"X-RapidAPI-Key": "API_Key",
"X-RapidAPI-Host": "specrom-news-api.p.rapidapi.com"
}
response = requests.request("POST", url, json=payload, headers=headers)
print(response.text)
POST / HTTP/1.1
Content-Type: application/json
X-Rapidapi-Key: API_Key
X-Rapidapi-Host: specrom-news-api.p.rapidapi.com
Host: specrom-news-api.p.rapidapi.com
Content-Length: 192
{
"api_type": "email_extraction",
"url": "https://www.wsj.com/articles/a-powerful-force-teslas-momentum-leads-stock-market-surge-11595151001"
}
Parameter |
Description |
api_type |
email_extraction |
url |
URL of the webpage where you want to extract email address |
Output
["amrith.ramkumar@wsj.com"]