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
-
Unsolved "The account does not have access to that quota" - API v1 URL Metrics
Hi! On one of our servers we get the message "The account does not have access to that quota" when pulling data for v1 URL Metrics endpoint in the API.
API | | aheitzman
This only happens on one specific server, others have worked flawlessly. Any idea of what might be going on? Thanks0 -
Location Data Batch Updates via the MOZ API
According to the MOZ API documentation, I am able to update multiple Locations in a batch in order to create or update their location data, currently 130 locations. I have successfully created a batch and the API returned the $id, as I expected. Yet, it doesn't make clear how the multiple locations I want to update are supposed to be sent back to the API. I was expecting an upload of a CSV file or JSON data, and not Query Parameter as noted in the docs. When including a JSON file, properly formatted, as a binary upload, the response is still expecting a locations parameter. See error here: { "status":"MISSING_PARAMETER", "message":"locations missing. ", "response": { "locations":"MISSING_PARAMETER" } } https://moz.com/developers/docs/local/api#_api_batch__id-PATCH
API | | yuca.pro1 -
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 -
Moz Api Integration with Google Data Studio
I want to automate my competition research process. Right now my competition research is completely manual which is ok if working in a small project. Usually, start looking at Google for the best sites for a specific niche. In an excel sheet insert the URL in a column and start to put information in next columns, information such as DA, PA, backlinks, page speed, schemas validation and stuff like that. As I mentioned for a small project I usually take 10 websites as a reference to analyze how difficult can be rank a website. The problem starts when I have to scale when I have to evaluate 100 or 200 or even more websites in different niches or target location or industry. Does not make sense keep doing manually. So my question is there any way to connect the Moz API to Google Data Studio or Google Sheet
API | | Roman-Delcarmen2 -
Mozscape API Updates (Non-updates!) - becoming a joke!
This is the 3rd month in succession where the Mozscape index has been delayed. Myself and clients are losing patience with this, as I am sure many others must be. Just what do you suppose we tell clients waiting for that data? We have incomplete and sometimes skewed metrics to report on, delays which then get delayed further, with nothing but the usual 'we are working on it' and 'bear with us'. It's becoming obvious you fudged the index update back in January (see discussion here with some kind of explanation finally from Rand: https://moz.com/community/q/is-everybody-seeing-da-pa-drops-after-last-moz-api-update), and seems you have been fumbling around ever since trying to fix it, with data all over the place, shifting DA scores and missing links from campaign data. Your developers should be working around the clock to fix this, because this is a big part of what you're selling in your service, and as SEO's and marketers we are relying on that data for client retention and satisfaction. Will you refund us all if we should lose clients over this?! .. I don't think so! With reports already sent out the beginning of the month with incomplete data, I told clients the index would refresh April 10th as informed from the API updates page, only to see it fudged again on day of release with the index being rolled back to previous. So again, I have to tell clients there will be more delays, ...with the uncertainty of IF it WILL EVEN get refreshed when you say it will. It's becoming a joke.. really!
API | | GregDixson2 -
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