API url_metrics Error deserializing POST body
-
Getting error in https://lsapi.seomoz.com/v2/url_metrics API
I'm using Basic Auth for authentication.
{ "name": "Bad Request", "message": "Error deserializing POST body"}
-
Hi - thanks for reaching out to us.
In Postman, if you click on raw instead of form-data in Body, you can get results using the syntax found here: https://moz.com/help/links-api/making-calls/url-metrics. In your example, you could write:
{
"targets":["facebook.com"]
}
This should successfully return results for you. If you continue to run into issues, I would suggest reaching out to support at help@moz.com.
thanks!
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
-
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?? H1q5XccR8
API | | LindsayE0 -
Error when generating secret API key
Hi, I am trying to generate an API key for the past 24 hours and I keep on getting the same vague explanation (attached below) of the error. Help Hub had no responses regarding the error also. "Oops - Something went wrong while trying to get your API Credentials. Please try again or check out the Help Hub if you are still experiencing issues." Appreciate any assistance on solving this issue. Thanks! Ian
API | | kwaken0 -
API - Row Limit Question
Hi, I'm new to using Moz, and have just got a "Low volume" API account set up. My question is, because ive not yet reached my maximum "Rows per month" limit, what behaviour happens when i reach it? Do i get an error code, if so what, and whats the status code. If not, does my account keep downloading the rows and i get charged extra (in accordance with the cost of the additional rows)? Or is the whole additional rows think like a bolt on? Basically i want to make sure i dont get charged extra each month, and i need the status code returned to handled this in my app. I couldnt see anything explicit in the documents. Cheers
API | | MattHopkins0 -
Is it possible to send a string/id to an api call and return it?
I am integrating your mozscape API into a project of mine and I am in need of seeing if I can send and return a variable with an associated call. For instance when I am sending some batch URL's I am requesting the [upa] and [pda] back. I am also requesting the [uu] (canonical URL) but it always seems to come back blank. So the issue I am having is if I send a batch of urls to the API how do I know how to associate a [upa] or [pda] with a link? My thoughts are if I could send a ID with a link and return that ID back then I know how to associate the [upa] or [pda] with that particular link. Anyone know?
API | | cbielich1 -
Pulling large amounts of data from moz api
Hi i'm looking to pull large amounts of data from the moz and semrush api. I have been using seotools addon for excel to extract data but excel is slow, sometimes crashes and not very reliable. Can anyone recommend any other tools i can use, to pull huge amounts of data? Any suggestions would be highly appreciated! Cheers, RM
API | | MBASydney0 -
Cannot get the API to work when using an EC2 server
Hi I've created a script that I'd like to use to check a list of domains using the Moz API. It works totally fine on my local machine. However, when I run it from my EC2 instance, it fails every time. To be specific, the response is always empty (the response is an empty json array) when the request is sent from EC2. Is, for some reason, EC2 blocked by the Moz API? Many thanks for your help, Andrew
API | | csandrew0