Need help understanding API
-
I know what information I need to pull... I know I need APIs to do it... I just don't know how to pull it or where. I have tools like Screaming Frog, Scrapebox, SEMRush, Moz, Majestic, etc. I need to find out how to type in a query and pull the top 10 ranking specs like DA, PA, Root Domains, Word Count, Trust Flow, etc.
Here is a screenshot of info I manually pulled...
https://screencast.com/t/H1q5XccR8 (I can't hyperlink it... it's giving me an error)
How do I auto pull this info??
-
There's no single API that does all of this but you can chain a couple of them together to get what you want. As Tawny pointed out, it's a technical task and you may need the help of a web developer.
As you have access to SEMRush, you can use their "organic results" API call which, given the keyword you're interested in, will return the top ranking URLs. You can see the documentation specific to that call here. So that gets you from your starting point (being interested in a query) to having the top URLs. You can limit the number of rows returned by the SEMRush API—sounds like you'd only want the first 10 rows (i.e. the top 10 results for the keyword).
Now taking that list you can send it to the Moz API's UrlMetrics call. This will give you back DA, PA, Trust Flow, and so on, for each URL.
Neither tool will tell you the word count. If you need to calculate that, you'll have to crawl the pages somehow. It depends whether you really need to completely automate everything. If "semi-automation" is good enough, I'd suggest that your script, after fetching the top ranking URLs from SEMRush, writes them out to a CSV as well. Then you can use Screaming Frog in list mode to crawl all of the URLs listed in the CSV. So everything would be automated except for gathering the word counts. You'd have to stitch together the results from your Screaming Frog crawl with the data you had back from Moz.
If everything must be automated, and you really need word count or other on-page information, your script will also need to crawl the pages. And for this you'll certainly need a developer familiar with technologies like Selenium, for crawling and scraping web pages. In almost all use cases, that's overkill, so I'd suggest focussing on the SEMRush and Moz APIs for now.
-
Hey there!
Tawny from Moz's Help Team here.
Our API doesn't contain all those metrics — what we're able to pull in through the Mozscape API is the same kind of data you'd be able to get through Open Site Explorer, but in bulk. You can read about all the different kinds of data you can collect with the API over here, in our Help Hub pages: https://moz.com/help/guides/moz-api/mozscape/api-reference
You can read more about how to use it and get started from this page: https://moz.com/help/guides/moz-api/mozscape/getting-started-with-mozscape/create-and-manage-your-account
The API is a pretty technical tool, so you may need a web developer's help to interpret the responses you get. If you have any more questions, feel free to reach out to us at help@moz.com and we'll do our best to answer any questions you might have.
Cheers!
Got a burning SEO question?
Subscribe to Moz Pro to gain full access to Q&A, answer questions, and ask your own.
Browse Questions
Explore more categories
-
Moz Tools
Chat with the community about the Moz tools.
-
SEO Tactics
Discuss the SEO process with fellow marketers
-
Community
Discuss industry events, jobs, and news!
-
Digital Marketing
Chat about tactics outside of SEO
-
Research & Trends
Dive into research and trends in the search industry.
-
Support
Connect on product support and feature requests.
Related Questions
-
Unknown data items in Links API response
So I'm on the documentation page at https://moz.com/help/links-api/making-calls/url-metrics . I've copied the bit fields table into a spreadsheet. I've removed all the "deprecated" items and have totalled up the remaining items making a Cols= value of 182537205900657000. For want of better knowledge, I've used that same value for LinkCols=, SourceCols= and TargetCols=. The request url ends up being (anonymized): http://lsapi.seomoz.com/linkscape/links/fordanddoonan.com.au?Cols=182537205900657000&AccessID=xxx&Expires=1557458487346&Signature=xxx&SourceCols=182537205900657000&TargetCols=182537205900657000&LinkCols=182537205900657000&Limit=1000&Scope=page_to_domain&Filter=external My question is, what do I make of all the extra fields that I get in the json packet what should I do to remove them? These extra fields are: lrid, lsrc, ltgt, luufq, luueid, lufeid, luujid, luumrp, luumrr, luflan, lufspf, lufsplc, lufspp, lufsps, lufspsc, luus, lufuid, lupuid, lufipl, luupa, lupda, luued, lufed, luped, lupib, luulc, flan, fspf, fsplc, fspp, fsps Is it simply a case of limiting the values of TargetCols, LinkCols and SourceCols? If so, to what?
API | | StevePoul1 -
MOZ API - Search Visibility
Hello there, We are looking to see if we can recreate the Search Visibility report through the API. We are wondering which API parameters and metrics we should use to recreate the report? Also, we want to distinguish between traffic coming from desktops and mobile traffic. Is this possible with the API? Which type of account do we need to use for these functionalities: the free account or paid account? We are currently using a free account. Also: we are wondering if can access historical data with the API? For instance: we want to determine the domain authority from October 2016 off on. Is this possible? Thanks in advance! Kind regards, Bart Minten
API | | thomas.deruiter0 -
API Access Change
I'm not sure, but I seem to remember that there was a certain number of API calls that USED to be included with my MOZ Pro level subscription and as I check it now, the API access is a separate subscription. Was there a recent change or has my memory finally started going?
API | | SWGroves0 -
Seo moz api request problem [401 error_message Your authentication failed]
Hello Team, I have moz pro account. I'm getting following error for seomoz call using your API: {"status":"401","error_message":"Your authentication failed. Check your authentication details and try again. For more information on signed authentication, see: http://apiwiki.moz.com/signed-authentication"} The link that we are using is:
API | | eBrandz
http://lsapi.seomoz.com/linkscape/url-metrics/ And following bits are requested during the call: 68719476736 34359738368 32 2048 16384 The error is intermittent. It comes and goes. There were no issues with results 3 days ago. I suddenly started getting this error. Could you please investigate into it and let me know the cause of issues and its correctiveness. It will great if you can provide us a support email Id for immediate response. Thanks,0 -
Does any one know if there is a tool out there built with the Moz API where you can feed in a large list of URLs and get back Domain Authority?
Does any one know if there is a tool out there built with the Moz API where you can feed in a large list of URLs and get back Domain Authority? Has anyone used the API for something like this before? Thanks! Max
API | | Porch0 -
Will the MOZ API display
will the MOZ API display rank, social and page data So I can create my own dashboard? We are looking to head off the 100% not provided and need to add to our reporting program. I was hoping the MOZ API would allow us to integrate the page views per url with ranking data that the campaigns provide. We are also interested in adding the social metrics for twitter and facebook to our client facing portal. any help or ideas would be greatly appreciated. Thanks
API | | OPM0 -
MOZ API Developer
Hi Moz Fans, Can you recommend someone who can develop an app/tool as similar to Hubspots Marketing Grader Functionality http://marketing.grader.com/ using MOZ API? I appreciate all your help guys Thanks, Tony
API | | chickenjoy20130