Mozscape API call returning no json
-
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
-
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!
-
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 ~
-
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!
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 Need Moz SEO Wordpress Plugin With API
Re: Moz WordPress Plugin? Hi guys,
Moz Pro | | mrezair
I need some Moz SEO Wordpress Plugins For my website working with Moz API. I've already found Moz DA-PA Checker plugin Moz DA-PA Checker But Need SEO Plugins too. Any Suggestion will be appreciated.0 -
SEOMoz API not working for Scrapebox
I want to import SEOMoz data to list of URLs I have using scrapbox. I added in my credentials according to the API but am getting error 401 as the status of all my links. Any idea why and what I should be doing?
Moz Pro | | theLotter0 -
Is there any way to get historical API data?
I'm looking for a way of requesting domain authority and some other stats via the API for several previous months. I noticed on here: http://apiwiki.seomoz.org/what-is-the-mozscape-api
Moz Pro | | ReallyEasyCart
It says "SEOmoz PRO members now have access to historical API linking data - read about this great new feature on our blog!" but i could not find this blog post anywhere and maybe I'm misreading this line anyway.0 -
Mozscape API Problem With Credentials
Yello everyone 🙂 Yesterday I generated Access ID and Secret Key to try the API, but it didn't work. It's said that it might need 5 minutes, so I gave it something like 8 hours but it still didn't work afterwards. I used the PHP sample and I checked it with the Sample Expires value and it produces the same Signature parameter as in the Sample Valid API Signature, so the PHP code sample and the Sample Valid API Signature are in sync. In case you wonder - yes I changed the PHP sample by adding the valid strings for $accessID and $secretKey - I'm a long time programmer and I know what I'm doing with it. I tried also the example URL from Sample Valid API Signature couple of times, refreshing each time to get new Expire parameter, but it's not working too. Both the PHP sample and the Sample Valid API Signature are giving me this: **{ "status" : "401", "error_message" : "Your authentication failed. Check your authentication details and try again. For more information on signed authentication, see: http://apiwiki.seomoz.org/w/page/29574176/SignedAuthentication" }** I am new here and if there is another place to look for support please just point it out and excuse me for wasting your time - I just couldn't see it and I really tried. Thank you for your time to read this! Calvin Your Access ID:
Moz Pro | | Calvin50 -
Adding canonical still returns duplicate pages
According to SEOmoz, several of my campaigns show that I have duplicate pages (SEOmoz Errors). Upon reading more about how to resolve the issue, I followed SEOmoz's suggestion to add rel='canonical' <links>to each page. After the next SEOmoz crawl, the number of SEOmoz Errors related to duplicate pages remained the same and the number of SEOmoz notices shot up indicating that it recognized that I added rel='canonical'.</links> I'm still puzzled as to why the SEOmoz errors did not go down with respect to duplicate page errors after I added rel='canonical', especially since SEOmoz noticed that I added them. Can anyone explain this to me? Thanks,
Moz Pro | | MOZ2
Scott.0 -
Why do you call it a Campaign?
I'm trying out PRO and have a simple question. Why do you call the main organizational unit in this tool a "Campaign"? "Campaign" makes me think of advertising or direct mail - run over a specific period of time to a specific audience. But, "Campaign" in SEOmoz PRO seems to mean a collection of keywords plus a domain. Is the idea that I'm investing time an money in this collection of keywords in some sort of a structured campaign (using SEO techniques) and then using PRO to track performance against a baseline? By the way, the tool seems great and I love the useful data it provides. I guess I'm really trying to understand the SEO mindset the underpins the design of PRO. Thanks for any help!
Moz Pro | | dbmmark0 -
Mozcape API Batching URLs LIMIT
Guys, there's an example to batching URLs using PHP: http://apiwiki.seomoz.org/php Which is the maximum number of URLs I can add to that batch?
Moz Pro | | Srvwiz0 -
Rank Tracker via API
Hello SEOMoz, The functionality of the Rank Tracker Tool is excellent - I was wondering if it might be coming to the API so we can do some deeper analysis? Thanks!
Moz Pro | | igzebedze0