OpenAPI Specification
openapi: 3.1.0
info:
title: TechCrunch WordPress REST Authors Posts API
description: TechCrunch is built on WordPress and exposes the standard WordPress REST API, providing JSON endpoints for accessing posts, categories, tags, authors, pages, and other content types. The API is available at the /wp-json/wp/v2/ base path and supports filtering, pagination, searching, and sorting across all TechCrunch content. TechCrunch uses a headless WordPress architecture with a React frontend, making the REST API the primary data layer for content delivery.
version: v2
contact:
name: TechCrunch
url: https://techcrunch.com/contact-us/
license:
name: Terms of Service
url: https://techcrunch.com/terms-of-service/
servers:
- url: https://techcrunch.com/wp-json/wp/v2
description: TechCrunch WordPress REST API
tags:
- name: Posts
description: Article and post content
paths:
/posts:
get:
operationId: listPosts
summary: List Posts
description: Retrieve a paginated list of published posts from TechCrunch. Supports filtering by author, category, tag, date range, and full-text search.
tags:
- Posts
parameters:
- name: page
in: query
schema:
type: integer
default: 1
description: Current page of the collection.
- name: per_page
in: query
schema:
type: integer
default: 10
maximum: 100
description: Maximum number of items to be returned in result set.
- name: search
in: query
schema:
type: string
description: Limit results to those matching a string.
- name: after
in: query
schema:
type: string
format: date-time
description: Limit response to posts published after a given ISO8601 date.
- name: before
in: query
schema:
type: string
format: date-time
description: Limit response to posts published before a given ISO8601 date.
- name: author
in: query
schema:
type: array
items:
type: integer
description: Limit result set to posts assigned to specific authors.
- name: categories
in: query
schema:
type: array
items:
type: integer
description: Limit result set to posts assigned to specific category IDs.
- name: tags
in: query
schema:
type: array
items:
type: integer
description: Limit result set to posts assigned to specific tag IDs.
- name: orderby
in: query
schema:
type: string
enum:
- author
- date
- id
- include
- modified
- parent
- relevance
- slug
- include_slugs
- title
default: date
description: Sort collection by object attribute.
- name: order
in: query
schema:
type: string
enum:
- asc
- desc
default: desc
description: Order sort attribute ascending or descending.
- name: _fields
in: query
schema:
type: string
description: Limit response to specific fields. Separate multiple fields with commas.
- name: _embed
in: query
schema:
type: boolean
description: Embed linked resources in the response.
responses:
'200':
description: List of posts
headers:
X-WP-Total:
schema:
type: integer
description: Total number of posts.
X-WP-TotalPages:
schema:
type: integer
description: Total number of pages.
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/Post'
'400':
$ref: '#/components/responses/BadRequest'
/posts/{id}:
get:
operationId: getPost
summary: Get Post
description: Retrieve a specific published post by its unique ID.
tags:
- Posts
parameters:
- $ref: '#/components/parameters/id'
- name: _fields
in: query
schema:
type: string
description: Limit response to specific fields.
- name: _embed
in: query
schema:
type: boolean
description: Embed linked resources.
responses:
'200':
description: Post object
content:
application/json:
schema:
$ref: '#/components/schemas/Post'
'404':
$ref: '#/components/responses/NotFound'
components:
schemas:
WPError:
type: object
properties:
code:
type: string
message:
type: string
data:
type: object
properties:
status:
type: integer
RenderedValueWithProtected:
type: object
properties:
rendered:
type: string
protected:
type: boolean
RenderedValue:
type: object
properties:
rendered:
type: string
Post:
type: object
properties:
id:
type: integer
date:
type: string
format: date-time
description: The date the post was published in the site's timezone.
date_gmt:
type: string
format: date-time
description: The date the post was published in GMT.
guid:
$ref: '#/components/schemas/RenderedValue'
modified:
type: string
format: date-time
modified_gmt:
type: string
format: date-time
slug:
type: string
status:
type: string
enum:
- publish
- future
- draft
- pending
- private
type:
type: string
example: post
link:
type: string
format: uri
title:
$ref: '#/components/schemas/RenderedValue'
content:
$ref: '#/components/schemas/RenderedValueWithProtected'
excerpt:
$ref: '#/components/schemas/RenderedValueWithProtected'
author:
type: integer
description: The ID for the author of the post.
featured_media:
type: integer
description: The ID of the featured media for the post.
comment_status:
type: string
enum:
- open
- closed
ping_status:
type: string
enum:
- open
- closed
sticky:
type: boolean
template:
type: string
format:
type: string
enum:
- standard
- aside
- chat
- gallery
- link
- image
- quote
- status
- video
- audio
categories:
type: array
items:
type: integer
tags:
type: array
items:
type: integer
yoast_head_json:
type: object
description: Yoast SEO metadata
additionalProperties: true
responses:
NotFound:
description: Resource not found
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
BadRequest:
description: Bad request
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
parameters:
id:
name: id
in: path
required: true
schema:
type: integer
description: Unique identifier for the resource.