The Moz Q&A Forum

    • Forum
    • Questions
    • My Q&A
    • Users
    • Ask the Community

    Welcome to the Q&A Forum

    Browse the forum for helpful insights and fresh discussions about all things SEO.

    1. SEO and Digital Marketing Q&A Forum
    2. Categories
    3. API
    4. Need help understanding API

    Need help understanding API

    API
    3 3 345
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as question
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • LindsayE
      LindsayE last edited by

      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??

      H1q5XccR8

      1 Reply Last reply Reply Quote 0
      • tawnycase
        tawnycase last edited by

        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!

        1 Reply Last reply Reply Quote 1
        • StephanSolomonidis
          StephanSolomonidis last edited by

          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.

          1 Reply Last reply Reply Quote 0
          • 1 / 1
          • First post
            Last post
          • API ACCESS to COMPETITOR DATA
            Martijn_Scheijbeler
            Martijn_Scheijbeler
            0
            3
            218

          • Connect to API
            Mr.Suren
            Mr.Suren
            0
            6
            671

          • API for crawl reports?
            IanWatson
            IanWatson
            0
            3
            206

          • API Limit Question
            hectormainar
            hectormainar
            0
            3
            1.4k

          • Does on-page grader have an API ?
            BlueprintMarketing
            BlueprintMarketing
            0
            5
            864

          • How to get backlinks with the API
            DavidLee
            DavidLee
            0
            25
            4.4k

          • Moz API, "Keyword Difficulty" and Bing Search Volume? And API "rows" and "requests"
            DavidLee
            DavidLee
            0
            4
            1.3k

          • How to best use MOZ api?
            JoelDay
            JoelDay
            0
            2
            153

          Get started with Moz Pro!

          Unlock the power of advanced SEO tools and data-driven insights.

          Start my free trial
          Products
          • Moz Pro
          • Moz Local
          • Moz API
          • Moz Data
          • STAT
          • Product Updates
          Moz Solutions
          • SMB Solutions
          • Agency Solutions
          • Enterprise Solutions
          • Digital Marketers
          Free SEO Tools
          • Domain Authority Checker
          • Link Explorer
          • Keyword Explorer
          • Competitive Research
          • Brand Authority Checker
          • Local Citation Checker
          • MozBar Extension
          • MozCast
          Resources
          • Blog
          • SEO Learning Center
          • Help Hub
          • Beginner's Guide to SEO
          • How-to Guides
          • Moz Academy
          • API Docs
          About Moz
          • About
          • Team
          • Careers
          • Contact
          Why Moz
          • Case Studies
          • Testimonials
          Get Involved
          • Become an Affiliate
          • MozCon
          • Webinars
          • Practical Marketer Series
          • MozPod
          Connect with us

          Contact the Help team

          Join our newsletter
          Moz logo
          © 2021 - 2026 SEOMoz, Inc., a Ziff Davis company. All rights reserved. Moz is a registered trademark of SEOMoz, Inc.
          • Accessibility
          • Terms of Use
          • Privacy