Title: Fetching posts using API
Last modified: January 31, 2019

---

# Fetching posts using API

 *  Resolved [someshj](https://wordpress.org/support/users/someshj/)
 * (@someshj)
 * [7 years, 4 months ago](https://wordpress.org/support/topic/fetching-posts-using-api/)
 * Hi, I am using weDocs for the documentation. I am trying to fetch post using 
   the API, which is not working.
 * While editing I am seeing the post URL as:
    `<<host>>/wp-admin/post.php?action
   =edit&post=554`
 * But while making the API call, I am getting the following response:
 *     ```
       curl -i <<host>>/wp-json/wp/v2/posts/554
       HTTP/1.1 404 Not Found
       Date: Thu, 31 Jan 2019 10:16:30 GMT
       <<some more headers>>
       Content-Type: application/json; charset=UTF-8
   
       {"code":"rest_post_invalid_id","message":"Invalid post ID.","data":{"status":404}}
       ```
   
 * Can you point out if I am making any mistake.

The topic ‘Fetching posts using API’ is closed to new replies.

 * ![](https://ps.w.org/wedocs/assets/icon-256x256.png?rev=2281297)
 * [weDocs: AI Powered Knowledge Base, Docs, Documentation, Wiki & AI Chatbot](https://wordpress.org/plugins/wedocs/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wedocs/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wedocs/)
 * [Active Topics](https://wordpress.org/support/plugin/wedocs/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wedocs/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wedocs/reviews/)

## Tags

 * [api](https://wordpress.org/support/topic-tag/api/)

 * 0 replies
 * 1 participant
 * Last reply from: [someshj](https://wordpress.org/support/users/someshj/)
 * Last activity: [7 years, 4 months ago](https://wordpress.org/support/topic/fetching-posts-using-api/)
 * Status: resolved