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
-
Moz tools are returning "url is inaccessible"
Hello everyone, I have been trying to use the on page grader tool and I have also tried to do a site crawl test, and both tools have come back with a "Sorry, but that URL is inaccessible" error. This has not been a problem before. Any ideas why this is happening eg what is blocking it. The url is www.livinghouse.co.uk any help for a novice would be appreciated. PS. I have had another tool also not giving any results, so I assume its something on the site which is blocking the tools. Could this also block Google? Thanks Giles
Moz Pro | | livinghouse0 -
Why would my site return an error when using Open Site Explorer to crawl it?
I have built several new sites over the last few months for others, but recently built a new one for myself. I have gone through most of the checklists from this site to address on-page SEO, and now I am looking at link building. When using Open Site Explorer, I receive an error saying that no information about the URL is available, even when I add competitor sites. Wondering if this is a common issue and if there is a convenient remedy? thanks!
Moz Pro | | MindSpark0 -
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 -
Crawl Diagnostics returning duplicate content based on session id
I'm just starting to dig into crawl diagnostics and it is returning quite a few errors. Primarily, the crawl is indicating duplicate content (page titles, meta tags, etc), because of a session id in the URL. I have set-up a URL parameter in Google Webmaster Tools to help Google recognize the existence of this session id. Is there any way to tell the SEOMoz spider the same thing? I'd like to get rid of these errors since I've already handled them for the most part.
Moz Pro | | csingsaas0 -
How do I collect all links through the SEOMoz API?
How do I collect all links through the SEOMoz API? Yes, I know how to pull url metrics info but want to pull the inbound links only via php script w/out having to go to the OSE page to pull. any suggestions would be great!
Moz Pro | | destdigi0 -
Can I calculate "Keyword Difficulty" metric using Mozscape API data?
We already have a web application that pulls certain metrics about websites using the Mozscape API, but we are wanting to extend the usefulness of this application to enable users of the app to pull "Keyword Difficulty" metrics in bulk, instead of one at a time (or 5 at a time). I wouldn't mind the 5 at a time limitation if we could just automate the API calls and let the tool pull data for 50 or so keywords without user-interaction. I know that it's a "formula", but I don't know what SEOMoz uses for it's formula. Has anyone figured out a way to calculate this, based on the Mozscape API data? Has anyone ever tried to reverse engineer this metric?
Moz Pro | | brchap0 -
Seomoz keyword difficulty api
Is there a way to get this from an api or a better method than pasting 5 keywords at a time into the keyword difficulty tool to get these numbers?
Moz Pro | | insitegoogle0 -
Opensiteexplorer details in API
Is there a way to access opensiteexplorer result details via seomoz's API? Most interested in the social media results
Moz Pro | | fuzzlepop0