Post's ID pattern?

Each post has an ID and I would like to know how they were assigned. Is there a pattern? Why are the ID’s not being incremented by 1 every posts? It would be easier..My ID’s go from 9867, to 9869, to 9864, etc.. I can’t seem to find a pattern.

I could use “The Loop”, but I’m doing that from another site. I want to include the last 30 posts of my wordpress site, so I need to find a pattern in the url to get the last 30 posts.

Solutions Collecting From Web of "Post's ID pattern?"

Each auto-draft gets its own ID, each revision, each nav item, page, custom post type …

The actual ID of a post should be irrelevant, this is really just needed for the database and ugly permalinks.

You cannot get the last 30 items by inspecting the post ID only.

Install a REST API on the other site and a rule to get the last x items.

Use the RSS feed – typically at http:/sitename/feed.

You can set the number of items the fed contains by changing the value Syndication feeds show the most recent in Settings > Reading