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
-
How to cost is calculated in Moz API for fetching only backlinks
I am unable to understand which particular API used to get the backlinks. And how cost is calculated. Suppose I Hit the API one time it gave me 100 backlinks of a particular domain. Does that mean i used 100 rows?
API | | maxfun00070 -
API for discovered and lost linking domains
Hello, Currently you do not have discovered and lost metrics available via the Links API, maybe there are some workaround to get this metrics? For us, it is very important to use API, or calculate it some mathematics way. Thank!
API | | OlegKireyenka0 -
What is the metric to check link state and link type for MOZ API ?
Kindly do not share the website url related to url and link metrics,instead of mention the correct metric for link state and link type. Thanks!
API | | rogerdavid0 -
Is everybody seeing DA/PA-drops after last MOZ-api update?
Hi all, I was wondering what happend at the last MOZ-update. The MOZ-health page has no current errors and i've checked a lot of websites probably about 50 a 60 from our customers and from our competitiors and everybody seems to have a decrease in DA's / PA's. Not just a couple went up and down like normally would happen, but all seems to have dropped.... Is anyone seeing the same in their campaigns? Greetings,
API | | NielsVos
Niels3 -
MozBar not working and Help is asking for to login
I can not use MozBar, receive a pop up about API credentials and when I go to Moz Help am asked to login but my credentials do not work. moz-login-issue-2016.09.28.png
API | | Stacious0 -
Does on-page grader have an API ?
Hi, I would very much like to include the on-page grader output into my SEO tools. Is there an API for that? thanks James
API | | KMdayJob0 -
Pulling large amounts of data from moz api
Hi i'm looking to pull large amounts of data from the moz and semrush api. I have been using seotools addon for excel to extract data but excel is slow, sometimes crashes and not very reliable. Can anyone recommend any other tools i can use, to pull huge amounts of data? Any suggestions would be highly appreciated! Cheers, RM
API | | MBASydney0 -
About Expiry of MOZ API authentication and MOZ API call in .NET application
MOZ API signed authentication is getting expire after particular time, and coming up with the error "Authentication has expired , Re-send your authentication". **right now we are getting new authentication details using ** https://moz.com/products/api/keys after doing login. but, how do we get new credentials (authentication details) , by doing MOZ API call using c# or any other programming language, we are using this API in .NET. Also, How we can increase the session expiry time. i think it is concerned with the Sample Expires of Signed authentication , but we are unable to change it , as it is coming with the authentication failed.
API | | BenuAggarwal0