Problem I am having is no matter what I try I only end up with 20 results. It does say in the documentation that there is a default limit of 20 records. In the documentation there is a parameter name titled “limit” so I figured this was easy to set. For whatever reason I can’t seem to get more then 20 records. Below is the curl command I am using.
Hey thanks for the quick response. The ? was actually a typo. I was trying several different combinations without any luck. I copy and pasted exactly what you responded with only changing the api key. Still only received 20 records. There has got to be a bug in the API parameters. I don’t know what else to try at this point. Do you know of another way to get a list of all BlogIDs and published URLs? I have 545 blog posts total. Thanks again
Each request would only return the number of posts set in limit= (defaulting to 20), so you’d need to use the offset=parameter to get the next set of posts, until the offset would put you over the total_count returned in each response.
If you are seeing 100 with the demo key, but only 20 with your API key, can you send me your Hub ID? I’d need to take a look at the data in your specific portal.
In the example URL you have, you have two ? in the URL, when the second one should be a &.
In general, you should keep the limit at 100 or lower to prevent timeouts, but you can use the offset= parameter to page through all of the results. https://api.hubapi.com/content/api/v2/blog-posts?hapikey=demo&limit=100 https://api.hubapi.com/content/api/v2/blog-posts?hapikey=demo&limit=100&offset=100 https://api.hubapi.com/content/api/v2/blog-posts?hapikey=demo&limit=100&offset=200