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. Moz Tools
    4. Mozscape API call returning no json

    Mozscape API call returning no json

    Moz Tools
    4 3 651
    • 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.
    • GBC
      GBC last edited by

      Hi - I'm having issues getting started with the Mozscape API. I'm putting the following into my browser:

      http://[member-ID]:[secret key]@lsapi.seomoz.com/linkscape/url-metrics/greatbritishchefs.com

      According to the blog posts I'm reading I should get loads of json script returned but all I'm getting is {}

      Does anybody have any pointers as to what I might be doing wrong?

      Thanks

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

        I just submitted a YOUmoz post on this topic. Hopefully it runs the gauntlet and is approved.

        The Mozscape API used to provide everything if you did not provide a Cols parameter to the request. Now you need to send a Cols value with the summed up total of all the bit flags you want the request to return. You can find all of the URL Metrics bit flags and their values here.

        Here's an example using your URL and these bit flags: Title (1), URL (4), External Links (32).

        http://[member-ID]:[secret key]@lsapi.seomoz.com/linkscape/url-metrics/greatbritishchefs.com?Cols=37

        The value 37 represents the bit flags you want to get back added together like so:

        Title (1) + URL (4) + External Links (32) = 37

        Hope this helps!

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

          Hi - I usually use the URL format shown here:

          http://www.seomoz.org/api/keys

          They have a "sample request" shown here, that you can use to get started.  I know they recently stopped supporting the old API format, and it caused a bunch of the scripts I run to stop working.  One of the tricky things about the new API format is the 'cols' parameter, where you specify the data that you want returned.  They added this to restrict the amount of data that is returned.  Before it returned a bunch of data, that maybe users were not really interested in - and so it used more of their server resources and bandwidth.

          You can see details about how to use the 'cols' parameter for URL metrics here:

          http://apiwiki.seomoz.org/url-metrics

          You have to add up the bit values for the fields that you want to have returned.  So for instance, if you want only the 'external links' data (32) and the 'mozrank' data (16384), you'd set the cols flag to be 16416  ... (32 + 16384).

          Hope that helps ~

          GeorgeAndrews 1 Reply Last reply Reply Quote 1
          • GeorgeAndrews
            GeorgeAndrews @AgentsofValue last edited by

            Looks like AoV and I posted at the same time. AoV is exactly right. We're both pretty much saying the same thing. Add a Cols parameter and you should be good to go.

            Good luck! 🙂

            1 Reply Last reply Reply Quote 0
            • 1 / 1
            • First post
              Last post
            • I cant generate my Mozscape API
              ChiarynMiranda
              ChiarynMiranda
              1
              4
              200

            • Linkscape API Sort calls
              Peterli
              Peterli
              0
              2
              85

            • Mozscape API Problem With Credentials
              Calvin5
              Calvin5
              0
              5
              1.8k

            • Free API
              KeriMorgret
              KeriMorgret
              0
              2
              774

            • SEOmoz API - Links and Anchor Text Calls
              AlexThomas
              AlexThomas
              0
              3
              850

            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